Skip to content

Commit

Permalink
add debug messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
stacey-gammon committed Feb 23, 2017
1 parent f4011ce commit 2d44889
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
4 changes: 2 additions & 2 deletions test/functional/apps/dashboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bdd.describe('dashboard app', function () {
return remote.setWindowSize(1200,800);
});

require('./_dashboard');
//require('./_dashboard');
require('./_dashboard_save');
require('./_dashboard_time');
// require('./_dashboard_time');
});
31 changes: 19 additions & 12 deletions test/support/page_objects/dashboard_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,19 @@ export default class DashboardPage {
PageObjects.common.debug('Go to dashboard landing page');
const onPage = await this.onDashboardLandingPage();
if (!onPage) {
await PageObjects.common.try(async () =>
await PageObjects.common.findByCssSelector('a[href="#/dashboard"]').click()
);
await PageObjects.common.try(async () => {
const goToDashboardLink = await PageObjects.common.findByCssSelector('a[href="#/dashboard"]');
PageObjects.common.debug('Clicking dashboard landing page link');
await goToDashboardLink.click();
await PageObjects.common.sleep(1000);
});
// Once the searchFilter can be found, we know the page finished loading.
await PageObjects.common.try(async () => await PageObjects.common.findTestSubject('searchFilter'));
await PageObjects.common.try(async () => {
const searchFilter = await PageObjects.common.findTestSubject('searchFilter');
PageObjects.common.debug('Search Filter object found: ' + searchFilter);
});
}
PageObjects.common.debug('Leaving go to dashboard landing page');
}

clickNewDashboard() {
Expand Down Expand Up @@ -192,15 +199,15 @@ export default class DashboardPage {

await this.gotoDashboardLandingPage();

const searchBox = await PageObjects.common.findTestSubject('searchFilter');
await searchBox.click();

// Note: this replacement of - to space is to preserve original logic but I'm not sure why or if it's needed.
await searchBox.type(dashName.replace('-',' '));
await PageObjects.common.try(async () => {
const searchFilter = await PageObjects.common.findTestSubject('searchFilter');
PageObjects.common.debug('searchForDashboardWithName: search Filter object found: ' + searchFilter);
await searchFilter.click();
// Note: this replacement of - to space is to preserve original logic but I'm not sure why or if it's needed.
await searchFilter.type(dashName.replace('-',' '));
});

await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.common.sleep(1000);
return await PageObjects.header.isGlobalLoadingIndicatorHidden();
return await PageObjects.header.waitUntilLoadingHasFinished();
}

async getDashboardCountWithName(dashName) {
Expand Down

0 comments on commit 2d44889

Please sign in to comment.