mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Synthetics] E2e test update test logic to remove flakiness !! (#209554)
## Summary E2e test update test logic to remove flakiness !!
This commit is contained in:
parent
dd21a92ab9
commit
0f5a523deb
1 changed files with 8 additions and 3 deletions
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { journey, step, before, after } from '@elastic/synthetics';
|
||||
import { journey, step, before, after, expect } from '@elastic/synthetics';
|
||||
import { syntheticsAppPageProvider } from '../../page_objects/synthetics_app';
|
||||
import { SyntheticsServices } from '../services/synthetics_services';
|
||||
|
||||
|
@ -51,10 +51,15 @@ journey(`CustomStatusAlert`, async ({ page, params }) => {
|
|||
await page.getByTestId('createNewStatusRule').click();
|
||||
|
||||
await page.getByTestId('ruleNameInput').fill('Synthetics status rule');
|
||||
let requestMade = false;
|
||||
page.on('request', (request) => {
|
||||
if (request.url().includes('api/alerting/rule') && request.method() === 'POST') {
|
||||
requestMade = true;
|
||||
}
|
||||
});
|
||||
await page.getByTestId('saveRuleButton').click();
|
||||
await page.getByTestId('confirmModalConfirmButton').click();
|
||||
|
||||
await page.waitForSelector(`text='Created rule "Synthetics status rule"'`);
|
||||
expect(requestMade).toBe(true);
|
||||
});
|
||||
|
||||
step('verify rule creation', async () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue