Fix tests

This commit is contained in:
Jason Stoltzfus 2023-02-06 12:07:08 -05:00
parent ca505c5cfc
commit 85a1eac2ac
7 changed files with 16 additions and 12 deletions

View file

@ -172,7 +172,7 @@ Object {
class="emotion-euiScreenReaderOnly"
id="generated-id"
>
You are in a dialog. To close this dialog, hit escape.
You are in a dialog. Press Escape, or tap/click outside the dialog to close.
</p>
<div>
<div

View file

@ -1834,7 +1834,7 @@ Object {
class="emotion-euiScreenReaderOnly"
id="generated-id"
>
You are in a dialog. To close this dialog, hit escape.
You are in a dialog. Press Escape, or tap/click outside the dialog to close.
</p>
<div>
<div

View file

@ -495,7 +495,7 @@ Object {
class="emotion-euiScreenReaderOnly"
id="generated-id"
>
You are in a dialog. To close this dialog, hit escape.
You are in a dialog. Press Escape, or tap/click outside the dialog to close.
</p>
<div>
<div
@ -775,7 +775,7 @@ Object {
class="emotion-euiScreenReaderOnly"
id="generated-id"
>
You are in a dialog. To close this dialog, hit escape.
You are in a dialog. Press Escape, or tap/click outside the dialog to close.
</p>
<div>
<div

View file

@ -24,7 +24,7 @@ exports[`<Settings /> can navigate Autoplay Settings 1`] = `
class="emotion-euiScreenReaderOnly"
id="generated-id"
>
You are in a dialog. To close this dialog, hit escape.
You are in a dialog. Press Escape, or tap/click outside the dialog to close.
</p>
<div>
<div
@ -125,7 +125,7 @@ exports[`<Settings /> can navigate Autoplay Settings 2`] = `
class="emotion-euiScreenReaderOnly"
id="generated-id"
>
You are in a dialog. To close this dialog, hit escape.
You are in a dialog. Press Escape, or tap/click outside the dialog to close.
</p>
<div>
<div
@ -378,7 +378,7 @@ exports[`<Settings /> can navigate Toolbar Settings, closes when activated 1`] =
class="emotion-euiScreenReaderOnly"
id="generated-id"
>
You are in a dialog. To close this dialog, hit escape.
You are in a dialog. Press Escape, or tap/click outside the dialog to close.
</p>
<div>
<div
@ -479,7 +479,7 @@ exports[`<Settings /> can navigate Toolbar Settings, closes when activated 2`] =
class="emotion-euiScreenReaderOnly"
id="generated-id"
>
You are in a dialog. To close this dialog, hit escape.
You are in a dialog. Press Escape, or tap/click outside the dialog to close.
</p>
<div>
<div
@ -665,7 +665,7 @@ exports[`<Settings /> can navigate Toolbar Settings, closes when activated 3`] =
class="emotion-euiScreenReaderOnly"
id="generated-id"
>
You are in a dialog. To close this dialog, hit escape.
You are in a dialog. Press Escape, or tap/click outside the dialog to close.
</p>
<div>
<div

View file

@ -427,7 +427,9 @@ describe('Field Renderers', () => {
userEvent.click(screen.getByTestId('DefaultFieldRendererOverflow-button'));
expect(
screen.getByText('You are in a dialog. To close this dialog, hit escape.')
screen.getByText(
'You are in a dialog. Press Escape, or tap/click outside the dialog to close.'
)
).toBeInTheDocument();
expect(screen.getByTestId('more-container').textContent).toEqual('item6item7');
});

View file

@ -76,7 +76,8 @@ describe('JourneyScreenshotPreview', () => {
);
const img = getByAltText('First step');
const euiPopoverMessage = 'You are in a dialog. To close this dialog, hit escape.'; // Helps to detect if popover is open
const euiPopoverMessage =
'You are in a dialog. Press Escape, or tap/click outside the dialog to close.'; // Helps to detect if popover is open
expect(queryByText(euiPopoverMessage)).toBeNull();
fireEvent.mouseEnter(img);
await waitFor(() => getByText(euiPopoverMessage));

View file

@ -83,7 +83,8 @@ describe('JourneyStepScreenshotContainer', () => {
);
const img = getByAltText('First step');
const euiPopoverMessage = 'You are in a dialog. To close this dialog, hit escape.';
const euiPopoverMessage =
'You are in a dialog. Press Escape, or tap/click outside the dialog to close.';
expect(queryByText(euiPopoverMessage)).toBeNull();
fireEvent.mouseEnter(img);
await waitFor(() => getByText(euiPopoverMessage));