Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dreamerkumar/d2a8e55c5cf4dd64950c1ffcfb701d05 to your computer and use it in GitHub Desktop.
Save dreamerkumar/d2a8e55c5cf4dd64950c1ffcfb701d05 to your computer and use it in GitHub Desktop.
e2e protractor test showing how to wait for the browser to reload after mocking an api causes this reload
this.Given(/^My api is mocked with "([^"]*)" mock data$/, function (mockName) {
return mocks.mocking_json[mockName]().then(function () {
return browser.wait(function () {
return myPage.$myWaitElement.isPresent();
}, 30000)
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment