Skip to content

Commit

Permalink
Added debug output of actual URL in route expects.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeramysoucy committed Jul 22, 2022
1 parent c74286a commit f52def9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions x-pack/test/functional/apps/spaces/spaces_selection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,16 @@ export default function spaceSelectorFunctionalTests({

// change spaces with nav menu
await PageObjects.spaceSelector.openSpacesNav();
await PageObjects.spaceSelector.goToSpecificSpace(anotherSpaceId);
await PageObjects.spaceSelector.expectHomePage(anotherSpaceId);
await PageObjects.spaceSelector.goToSpecificSpace(space5Id);
await PageObjects.spaceSelector.expectHomePage(space5Id);

await PageObjects.spaceSelector.openSpacesNav();
await PageObjects.spaceSelector.goToSpecificSpace(defaultSpaceId);
await PageObjects.spaceSelector.expectHomePage(defaultSpaceId);

await PageObjects.spaceSelector.openSpacesNav();
await PageObjects.spaceSelector.goToSpecificSpace(space5Id);
await PageObjects.spaceSelector.expectHomePage(space5Id);
await PageObjects.spaceSelector.goToSpecificSpace(anotherSpaceId);
await PageObjects.spaceSelector.expectHomePage(anotherSpaceId);
});
});

Expand Down
2 changes: 2 additions & 0 deletions x-pack/test/functional/page_objects/space_selector_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export class SpaceSelectorPageObject extends FtrService {
this.log.debug(`expectRoute(${spaceId}, ${route})`);
await this.find.byCssSelector('[data-test-subj="kibanaChrome"] nav:not(.ng-hide) ', 20000);
const url = await this.browser.getCurrentUrl();
this.log.debug(`URL: ${url})`);
if (spaceId === 'default') {
expect(url).to.contain(route);
} else {
Expand All @@ -51,6 +52,7 @@ export class SpaceSelectorPageObject extends FtrService {
this.log.debug(`expectSpace(${spaceId}`);
await this.find.byCssSelector('[data-test-subj="kibanaChrome"] nav:not(.ng-hide) ', 20000);
const url = await this.browser.getCurrentUrl();
this.log.debug(`URL: ${url})`);
if (spaceId === 'default') {
expect(url).to.not.contain(`/s/${spaceId}`);
} else {
Expand Down

0 comments on commit f52def9

Please sign in to comment.