Skip to content

Commit

Permalink
Fix discover preserve url (#63580) (#63664)
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 authored Apr 16, 2020
1 parent a50a867 commit 7664274
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions x-pack/test/functional/apps/discover/preserve_url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { FtrProviderContext } from '../../ftr_provider_context';
export default function({ getService, getPageObjects }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const PageObjects = getPageObjects(['common', 'discover', 'spaceSelector', 'header']);
const appsMenu = getService('appsMenu');
const globalNav = getService('globalNav');

describe('preserve url', function() {
Expand All @@ -26,8 +25,7 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.common.navigateToApp('discover');
await PageObjects.discover.saveSearch('A Search');
await PageObjects.common.navigateToApp('home');
await appsMenu.clickLink('Discover');
await PageObjects.discover.waitUntilSearchingHasFinished();
await PageObjects.header.clickDiscover();
const activeTitle = await globalNav.getLastBreadcrumb();
expect(activeTitle).to.be('A Search');
});
Expand All @@ -42,15 +40,15 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.spaceSelector.expectHomePage('another-space');

// other space
await appsMenu.clickLink('Discover');
await PageObjects.header.clickDiscover();
await PageObjects.discover.saveSearch('A Search in another space');

await PageObjects.spaceSelector.openSpacesNav();
await PageObjects.spaceSelector.clickSpaceAvatar('default');
await PageObjects.spaceSelector.expectHomePage('default');

// default space
await appsMenu.clickLink('Discover');
await PageObjects.header.clickDiscover();
await PageObjects.discover.waitUntilSearchingHasFinished();
const activeTitleDefaultSpace = await globalNav.getLastBreadcrumb();
expect(activeTitleDefaultSpace).to.be('A Search');
Expand All @@ -60,7 +58,7 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.spaceSelector.expectHomePage('another-space');

// other space
await appsMenu.clickLink('Discover');
await PageObjects.header.clickDiscover();
await PageObjects.discover.waitUntilSearchingHasFinished();
const activeTitleOtherSpace = await globalNav.getLastBreadcrumb();
expect(activeTitleOtherSpace).to.be('A Search in another space');
Expand Down

0 comments on commit 7664274

Please sign in to comment.