Skip to content
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

Add tests for disclosure/disclosure-faq.html #846

Merged
merged 1 commit into from
Aug 29, 2018

Conversation

spectranaut
Copy link
Contributor

Tests written, only blocking on acceptance of race condition PR: #837

@spectranaut spectranaut changed the base branch from master to bocoup August 20, 2018 13:10
@mcking65
Copy link
Contributor

@tatermelon, @jessebeach, @sh0ji, this is ready for review.

@spectranaut spectranaut force-pushed the bocoup-disclosure-faq branch from c0b7319 to 5e28051 Compare August 20, 2018 21:07
@spectranaut spectranaut changed the title WIP: add tests for disclosure/disclosure-faq.html Add tests for disclosure/disclosure-faq.html Aug 20, 2018
@mcking65
Copy link
Contributor

@spectranaut, looks like we are getting the session errors. I'm restarting the build another time to see if it happens again.

Copy link
Contributor

@jessebeach jessebeach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few nits. Nothing major.


let buttons = await t.context.session.findElements(By.css(ex.buttonSelector));
for (let button of buttons) {
await button.click();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, I thought having an await in a for..of loop would cause a problem, but the Iteration Protocol handles it automatically. Very readable, very nice.

let answers = await t.context.session.findElements(By.css(ex.buttonSelector));
for (let answer of answers) {
t.true(
await answer.isDisplayed(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might fail if true isn't asynchronous. Maybe pull the await to the line above, store the result and then call true with the variable as the first argument. If this pattern is prevalent, it might be a source of your timing issues.

await button.sendKeys(Key.ENTER);

t.true(
await waitAndCheckExpandedTrue(t, button),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto to above and for all the rest below.

@mcking65 mcking65 merged commit 0fa9977 into w3c:bocoup Aug 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants