Skip to content

Commit

Permalink
Stabilize dashboard save modal functional test (elastic#52761) (elast…
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 authored Dec 12, 2019
1 parent 5ad2732 commit 2249908
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/functional/apps/dashboard/dashboard_save.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export default function ({ getPageObjects }) {
await PageObjects.dashboard.clickNewDashboard();
await PageObjects.dashboard.enterDashboardTitleAndClickSave(dashboardName, { waitDialogIsClosed: false });

await PageObjects.dashboard.ensureDuplicateTitleCallout();
await PageObjects.dashboard.clickSave();

// This is important since saving a new dashboard will cause a refresh of the page. We have to
Expand Down
4 changes: 4 additions & 0 deletions test/functional/page_objects/dashboard_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,10 @@ export function DashboardPageProvider({ getService, getPageObjects }) {
}
}

async ensureDuplicateTitleCallout() {
await testSubjects.existOrFail('titleDupicateWarnMsg');
}

/**
* @param dashboardTitle {String}
*/
Expand Down

0 comments on commit 2249908

Please sign in to comment.