mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Synthetics] adjust alert toggle test (#134374)
* 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>
This commit is contained in:
parent
adb61f74eb
commit
fb238214f8
1 changed files with 6 additions and 6 deletions
|
@ -15,8 +15,7 @@ import {
|
|||
import { ToggleAlertFlyoutButtonComponent } from './toggle_alert_flyout_button';
|
||||
import { ToggleFlyoutTranslations } from './translations';
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/134310
|
||||
describe.skip('ToggleAlertFlyoutButtonComponent', () => {
|
||||
describe('ToggleAlertFlyoutButtonComponent', () => {
|
||||
describe('when users have write access to uptime', () => {
|
||||
it('enables the button to create a rule', () => {
|
||||
const { getByText } = render(
|
||||
|
@ -30,15 +29,16 @@ describe.skip('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