-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: switch e2e tests to async/await #4705
Conversation
Switches to using async/await in the e2e tests. This should make it a bit easier to deal with Protractor's async APIs.
|
||
|
||
describe('scroll blocking', () => { | ||
beforeEach(() => browser.get('/block-scroll-strategy')); | ||
afterEach(() => clickOn('disable')); | ||
|
||
it('should not be able to scroll programmatically along the x axis', async (done) => { | ||
it('should not be able to scroll programmatically along the x axis', asyncSpec(async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to @vikerman this asyncSpec
wrapper should be unnecessary w/ jasminewd2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm looks like it. Initially, I was playing around with passing in the done
function and calling it at the end, which ended up timing out for failures, because I wasn't wrapping it in a try/catch and calling done.fail
. I guess that was overriding the custom handling from jasminewd
. I've removed the asyncSpec
now and it behaves as expected.
LGTM for the code changes, but what's up w/ the screenshot diffs here? |
Poke @tinayuangao on the screenshot stuff; not clear to me what's happening on the results page |
LGTM. The screenshot tests failed because we changed the test name, so the test images are unavailable to old test names. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Switches to using async/await in the e2e tests. This should make it a bit easier to deal with Protractor's async APIs.
Note: The CI failures are unrelated to the changes in this PR and are the same as the ones from #4702 and #4703.