Skip to content

Commit

Permalink
Fix a bug in importSanity test.
Browse files Browse the repository at this point in the history
1. CSS selector is not correct.
2. Old assert expression passes test which should be failed.
Add one more checking point to fix it.
  • Loading branch information
henrywang authored and martinpitt committed Oct 23, 2018
1 parent 358d4e2 commit 127c1e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions test/end-to-end/pages/editBlueprint.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ module.exports = class EditBlueprintPage extends MainPage {
// Component list item root element
this.componentListItemRootElement = `${this.blueprintInputRootElement} .cmpsr-list-pf__compacted .list-pf-item`;
// ---- Page element selector ---- //
// Component number
this.componentNumber = '.cmpsr-blueprint__inputs__pagination span:nth-of-type(2)';
// Edit Blueprint label
this.varEditBlueprint = 'Edit Blueprint';
this.labelEditBlueprint = `${this.navBarRootElement} li strong`;
Expand Down
4 changes: 2 additions & 2 deletions test/end-to-end/specs/test_importSanity.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ describe('Imported Content Sanity Testing', () => {
// list item and total number are rendered at the same time
browser.waitForVisible(editBlueprintPage.componentListItemRootElement);

const actualText = browser.getText(editBlueprintPage.componentListItemRootElement);
const actualText = browser.getText(editBlueprintPage.componentNumber);

assert(actualText !== '1 - 50 of 0');
assert(actualText !== '1 - 50 of 0' && actualText.startsWith('1 - 50 of'));
});
});

0 comments on commit 127c1e7

Please sign in to comment.