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

Unexpected behavior note follow up #596

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

evmiguel
Copy link
Contributor

@evmiguel evmiguel commented Apr 4, 2023

This PR encompasses @alflennik's commits with a merge to main and a few other changes. w3c/aria-at#802 must also be merged alongside this change. When this is merged, #450 can be deleted.

Steps to test:

  • Run migration
  • Open a test run in the Test Queue
  • Select, "Yes, there were additional unexpected behaviors." for one of the commands
  • Select some checkboxes
  • Observe that the explanation text box is enabled
  • Try selecting 'Other' and submitting
    • Observe that it is required

unexpectedBehaviors.push({ id: 'AT_CRASHED' });
if (i === 4)
unexpectedBehaviors.push({ id: 'BROWSER_CRASHED' });
if (i === 0) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

REVIEWERS: this is the main concern here. Why does graphql expect a string while the TestRenderer expect an object with an id?

@evmiguel evmiguel requested review from howard-e and removed request for howard-e April 4, 2023 20:16
)
return testResult;
) {
// Mapping unexpected behaviors to expected TestRenderer downstream format
Copy link
Contributor Author

Choose a reason for hiding this comment

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

REVIEWERS: I had to do this so that the TestRenderer would receive consistent data.

@evmiguel evmiguel marked this pull request as ready for review April 5, 2023 20:13
Copy link
Contributor

@ccanash ccanash left a comment

Choose a reason for hiding this comment

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

I tested out and it works

)
),
fragment(
// TODO: Figure out why this isn't appearing
Copy link
Contributor

Choose a reason for hiding this comment

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

Did I write this lol? Can we remove this comment or is it still relevant?

Copy link
Contributor

@alflennik alflennik left a comment

Choose a reason for hiding this comment

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

Thank you for reviving this ancient PR, thinking of the conflicts you probably had to fix makes me sweat! I did notice one issue when testing it, which is the case where I select that "Yes, there were unexpected behaviors" and then fail to specify any of the radio buttons. When I hit submit, the toggle switches from "Yes" to "No", but more importantly the error is not focused or scrolled to, forcing me to look over all the forms trying to find the one that didn't work.

? scenarioResult.unexpectedBehaviors.map(
behavior => behavior.id
)
: scenarioResult.unexpectedBehaviors
Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense! This could be simplified slightly to scenarioResult.unexpectedBehaviors ?? scenarioResult.unexpectedBehaviors.map(behavior => behavior.id)

@alflennik
Copy link
Contributor

One important note is that the unexpected behavior note PR for the aria-at repo will also need to be updated. I wouldn't expect as many merge conflicts, which is good. It's important to make sure the test runner is the same to prevent any very confusing issues from popping up.

@evmiguel
Copy link
Contributor Author

evmiguel commented May 3, 2023

Thank you for reviving this ancient PR, thinking of the conflicts you probably had to fix makes me sweat! I did notice one issue when testing it, which is the case where I select that "Yes, there were unexpected behaviors" and then fail to specify any of the radio buttons. When I hit submit, the toggle switches from "Yes" to "No", but more importantly the error is not focused or scrolled to, forcing me to look over all the forms trying to find the one that didn't work.

The error is scrolled to and required is shown, when adding inputs in order. As for the toggling, the app is written in such a way that if you submit, "Yes", but there are no radio buttons, the default is set to "No". What is the intended behavior?

@evmiguel
Copy link
Contributor Author

evmiguel commented May 8, 2023

@alflennik You should now be able to observe that when you select "Yes" with no unexpected behaviors and submit the form, the page scrolls to the required element and "Yes" is not toggled to "No".

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