Skip to content

Commit

Permalink
Adding test for nav being shown
Browse files Browse the repository at this point in the history
  • Loading branch information
ycombinator committed May 18, 2017
1 parent 6334019 commit 5351e61
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
11 changes: 11 additions & 0 deletions test/functional/apps/management/_getting_started.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ export default ({ getService, getPageObjects }) => {
const isLoaded = await PageObjects.gettingStarted.doesContainerExist();
expect(isLoaded).to.be(false);
});

describe('when a user directly navigates to the Getting Started page', () => {
beforeEach(async () => {
await PageObjects.gettingStarted.navigateTo();
});

it('the kibana chrome (which contains the global nav) is visible', async () => {
const isChromeVisible = await PageObjects.common.isChromeVisible();
expect(isChromeVisible).to.be(true);
});
});
});
});
};
4 changes: 4 additions & 0 deletions test/functional/page_objects/common_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,10 @@ export function CommonPageProvider({ getService, getPageObjects, getPageObject }
log.debug(`exists? ${exists}`);
return exists;
}

async isChromeVisible() {
return await testSubjects.exists('kibanaChrome');
}
}

return new CommonPage();
Expand Down
11 changes: 0 additions & 11 deletions test/functional/page_objects/getting_started_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,10 @@ export function GettingStartedPageProvider({ getService, getPageObjects }) {
});
}

async optOutLinkExists() {
log.debug('Checking if opt-out link exists');
return await testSubjects.exists('lnkGettingStartedOptOut');
}

async navigateTo() {
log.debug('Navigating directly to Getting Started page');
await PageObjects.common.navigateToUrl('settings', 'kibana/getting_started');
}

async optOut() {
log.debug('Opting out of Getting Started page');
await this.navigateTo();
await this.clickOptOutLink();
}
}

return new GettingStartedPage();
Expand Down

0 comments on commit 5351e61

Please sign in to comment.