Skip to content

Commit

Permalink
addressing review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bhavyarm committed Feb 21, 2020
1 parent 056fb5a commit cab78c9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
8 changes: 1 addition & 7 deletions test/accessibility/apps/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
const clonedDashboardName = 'Dashboard Listing A11y Copy';

before(async () => {
// await esArchiver.loadIfNeeded('logstash_functional');
// await kibanaServer.uiSettings.update({
// defaultIndex: 'logstash-*',
// });
await PageObjects.common.navigateToUrl('home', 'tutorial_directory/sampleData');
await PageObjects.home.addSampleDataSet('flights');
});
Expand Down Expand Up @@ -134,9 +130,7 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
});

it('Exit out of full screen mode', async () => {
const logoButton = await PageObjects.dashboard.getExitFullScreenLogoButton();
await logoButton.moveMouseTo();
await PageObjects.dashboard.clickExitFullScreenTextButton();
await PageObjects.dashboard.exitFullScreenMode();
await a11y.testAppSnapshot();
});

Expand Down
4 changes: 1 addition & 3 deletions test/functional/apps/dashboard/full_screen_mode.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ export default function({ getService, getPageObjects }) {
});

it('exits when the text button is clicked on', async () => {
const logoButton = await PageObjects.dashboard.getExitFullScreenLogoButton();
await logoButton.moveMouseTo();
await PageObjects.dashboard.clickExitFullScreenTextButton();
await PageObjects.dashboard.exitFullScreenMode();
await retry.try(async () => {
const isChromeVisible = await PageObjects.common.isChromeVisible();
expect(isChromeVisible).to.be(true);
Expand Down
6 changes: 6 additions & 0 deletions test/functional/page_objects/dashboard_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ export function DashboardPageProvider({ getService, getPageObjects }: FtrProvide
await this.waitForRenderComplete();
}

public async exitFullScreenMode() {
const logoButton = await this.getExitFullScreenLogoButton();
await logoButton.moveMouseTo();
await this.clickExitFullScreenTextButton();
}

public async getDashboardIdFromCurrentUrl() {
const currentUrl = await browser.getCurrentUrl();
const urlSubstring = 'kibana#/dashboard/';
Expand Down

0 comments on commit cab78c9

Please sign in to comment.