Skip to content

Commit

Permalink
Fix e2e test hooks that made e2e tests flaky
Browse files Browse the repository at this point in the history
  • Loading branch information
slaweet committed Jan 19, 2018
1 parent 8f922e0 commit 7bbd231
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions test/e2e/step_definitions/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,18 @@ function takeScreenshot(screnarioSlug, callback) {
}

defineSupportCode(({ Before, After, registerListener }) => {
Before('@pending', (scenario, callback) => {
callback(null, 'pending');
});

Before((scenario, callback) => {
browser.ignoreSynchronization = true;
browser.driver.manage().window()
.setSize(browser.params.screenWidth, browser.params.screenHeight);
browser.get(browser.params.baseURL);
localStorage.clear();
localStorage.setItem('showNetwork', 'true');
browser.get(browser.params.baseURL);
callback();
});

Before('@pending', (scenario, callback) => {
callback(null, 'pending');
browser.get(browser.params.baseURL).then(callback);
});

After((scenario, callback) => {
Expand Down

0 comments on commit 7bbd231

Please sign in to comment.