mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
* synthetics - adjust alert toggle test
* Update x-pack/plugins/synthetics/public/legacy_uptime/components/overview/alerts/toggle_alert_flyout_button.test.tsx
* Update toggle_alert_flyout_button.test.tsx
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit fb238214f8
)
Co-authored-by: Dominique Clarke <dominique.clarke@elastic.co>
This commit is contained in:
parent
94d89a832f
commit
98e4bfd4b0
1 changed files with 5 additions and 4 deletions
|
@ -29,15 +29,16 @@ describe('ToggleAlertFlyoutButtonComponent', () => {
|
|||
});
|
||||
|
||||
it("does not contain a tooltip explaining why the user can't create alerts", async () => {
|
||||
const { getByText, findByText } = render(
|
||||
const { getByText, queryByText } = render(
|
||||
<ToggleAlertFlyoutButtonComponent setAlertFlyoutVisible={jest.fn()} />,
|
||||
{ core: makeUptimePermissionsCore({ save: true }) }
|
||||
);
|
||||
userEvent.click(getByText('Alerts and rules'));
|
||||
userEvent.hover(getByText(ToggleFlyoutTranslations.openAlertContextPanelLabel));
|
||||
await expect(() =>
|
||||
findByText('You need read-write access to Uptime to create alerts in this app.')
|
||||
).rejects.toEqual(expect.anything());
|
||||
await new Promise((r) => setTimeout(r, 250)); // wait for the default time for tooltips to show up
|
||||
await expect(
|
||||
queryByText('You need read-write access to Uptime to create alerts in this app.')
|
||||
).not.toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue