Skip to content

Commit

Permalink
Add a functional test
Browse files Browse the repository at this point in the history
  • Loading branch information
Maja Grubic committed Oct 13, 2021
1 parent 2713bfc commit c1ba94e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/functional/apps/discover/_chart_hidden.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});

it('persists hidden chart option on the saved search ', async function () {
await PageObjects.discover.saveSearch('chart hidden yyy');
const savedSearchTitle = 'chart hidden';
await PageObjects.discover.saveSearch(savedSearchTitle);

await PageObjects.discover.toggleChartVisibility();
expect(await PageObjects.discover.isChartVisible()).to.be(true);
Expand All @@ -64,7 +65,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.header.waitUntilLoadingHasFinished();
expect(await PageObjects.discover.isChartVisible()).to.be(true);

await PageObjects.discover.loadSavedSearch('chart hidden yyy');
await PageObjects.discover.loadSavedSearch(savedSearchTitle);
expect(await PageObjects.discover.isChartVisible()).to.be(false);
});
});
Expand Down

0 comments on commit c1ba94e

Please sign in to comment.