Skip to content

Commit

Permalink
[Synthetics] E2e tests update flakiness !! (elastic#206257)
Browse files Browse the repository at this point in the history
## Summary

E2e tests update flakiness !!
  • Loading branch information
shahzad31 authored and viduni94 committed Jan 23, 2025
1 parent 45af2ee commit 4b987d8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ const createMonitorJourney = ({
monitorType
);
expect(hasFailure).toBeFalsy();
await page.click('text=Update monitor');
await page.waitForTimeout(1000);
await page.getByTestId('syntheticsMonitorConfigSubmitButton').click();
await page.waitForSelector('text=Monitor updated successfully.');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,13 @@ export function syntheticsAppPageProvider({
},

async navigateToAddMonitor() {
await page.goto(addMonitor, {
waitUntil: 'networkidle',
});
if (await page.isVisible('[data-test-subj="syntheticsAddMonitorBtn"]')) {
await page.click('[data-test-subj="syntheticsAddMonitorBtn"]');
} else {
await page.goto(addMonitor, {
waitUntil: 'networkidle',
});
}
},

async ensureIsOnMonitorConfigPage() {
Expand Down

0 comments on commit 4b987d8

Please sign in to comment.