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

test: update e2es to use the new insightsUserConfiguration controller for setting high-contrast mode #1730

Conversation

dbjorge
Copy link
Contributor

@dbjorge dbjorge commented Nov 21, 2019

Description of changes

This updates all the existing E2E tests to use the new insightsUserConfiguration controller in the background page to set high-contrast mode for accessibility tests, rather than using the details page UI to do it. This:

  • Cuts 2-3min off e2e runtime
  • Removes a bunch of operations that would otherwise be opportunities for flakiness
  • Cooperates better with upcoming permissions changes that would otherwise prevent the use of the details view UI without popping the popup UI first

Mechanically, this allows for a bunch of simplification of the existing tests, since they no longer need to spawn separate browser instances/pages in a lot of cases; there was a pattern of having 2 top level describe blocks for "normal mode" vs "high contrast" mode that I've eliminated and replaced with updating a11y tests to just do it.each over the 2 HC states.

As part of this, I updated the guidance content tests to work more similar to every other test case, where we do a11y scans in both HC/non-HC modes but only snapshot the components in one of the 2 modes. This is where most of the "30k lines deleted" comes from.

Pull request checklist

  • [n/a] Addresses an existing issue: #0000
  • Ran yarn fastpass
  • [n/a] Added/updated relevant unit test(s) (and ran yarn test)
  • [n/a] Verified code coverage for the changes made. Check coverage report at: <rootDir>/test-results/unit/coverage
  • PR title AND final merge commit title both start with a semantic tag (fix:, chore:, feat(feature-name):, refactor:). Check workflow guide at: <rootDir>/docs/workflow.md
  • [n/a] (UI changes only) Added screenshots/GIFs to description above
  • [n/a] (UI changes only) Verified usability with NVDA/JAWS

@dbjorge dbjorge requested a review from a team as a code owner November 21, 2019 19:52
Copy link
Contributor

@smoralesd smoralesd left a comment

Choose a reason for hiding this comment

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

This is a great improvement to our e2e!!! Kudos.

@smoralesd smoralesd self-requested a review November 21, 2019 20:28
@smoralesd smoralesd closed this Nov 21, 2019
@smoralesd smoralesd reopened this Nov 21, 2019
Copy link
Contributor

@smoralesd smoralesd left a comment

Choose a reason for hiding this comment

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

A couple of minor/not-high-priority comments, LGTM otherwise

@dbjorge dbjorge merged commit 096bf61 into microsoft:master Nov 25, 2019
@dbjorge dbjorge deleted the e2e-use-user-config-controller-for-high-contrast branch November 25, 2019 22:43
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.

None yet

2 participants