Skip to content

Commit

Permalink
[Synthetics] Fix slow flaky test (#141672)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 authored Sep 23, 2022
1 parent 02a07f3 commit 2cea293
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('Manage ML Job', () => {
});

it('does not display an informative tooltip', async () => {
const { getByText, findByText } = render(
const { getByText, queryByText } = render(
<ManageMLJobComponent hasMLJob={true} onEnableJob={jest.fn()} onJobDelete={jest.fn()} />,
{
state: makeMlCapabilities(),
Expand All @@ -57,10 +57,9 @@ describe('Manage ML Job', () => {
await waitForEuiPopoverOpen();

userEvent.hover(getByText(labels.ENABLE_ANOMALY_ALERT));

await expect(() =>
findByText('You need write access to Uptime to create anomaly alerts.')
).rejects.toEqual(expect.anything());
expect(
await queryByText('You need write access to Uptime to create anomaly alerts.')
).toBeNull();
});
});

Expand Down

0 comments on commit 2cea293

Please sign in to comment.