stabilize dashboard snapshot toast closing (#58709)
This commit is contained in:
parent
5d6248d9d9
commit
e4f4ac7cfa
|
@ -50,7 +50,7 @@ export default function({ getService, getPageObjects, updateBaselines }) {
|
|||
await PageObjects.dashboard.clickNewDashboard();
|
||||
await PageObjects.timePicker.setLogstashDataRange();
|
||||
await dashboardAddPanel.addVisualization('Rendering Test: tsvb-ts');
|
||||
await PageObjects.common.closeToast();
|
||||
await PageObjects.common.closeToastIfExists();
|
||||
|
||||
await PageObjects.dashboard.saveDashboard('tsvb');
|
||||
await PageObjects.dashboard.clickFullScreenMode();
|
||||
|
@ -73,7 +73,7 @@ export default function({ getService, getPageObjects, updateBaselines }) {
|
|||
await PageObjects.dashboard.clickNewDashboard();
|
||||
await PageObjects.timePicker.setLogstashDataRange();
|
||||
await dashboardAddPanel.addVisualization('Rendering Test: area with not filter');
|
||||
await PageObjects.common.closeToast();
|
||||
await PageObjects.common.closeToastIfExists();
|
||||
|
||||
await PageObjects.dashboard.saveDashboard('area');
|
||||
await PageObjects.dashboard.clickFullScreenMode();
|
||||
|
|
|
@ -435,6 +435,13 @@ export function CommonPageProvider({ getService, getPageObjects }: FtrProviderCo
|
|||
return title;
|
||||
}
|
||||
|
||||
async closeToastIfExists() {
|
||||
const toastShown = await find.existsByCssSelector('.euiToast');
|
||||
if (toastShown) {
|
||||
await this.closeToast();
|
||||
}
|
||||
}
|
||||
|
||||
async clearAllToasts() {
|
||||
const toasts = await find.allByCssSelector('.euiToast');
|
||||
for (const toastElement of toasts) {
|
||||
|
|
Loading…
Reference in a new issue