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

Generation of tests and review pages script improvements #451

Merged
merged 46 commits into from
Jun 29, 2021

Conversation

howard-e
Copy link
Contributor

Preview Tests - from forked repository

  • NOTE: This is a duplicate of Generated tests and review pages output improvements #441 which was merged but reverted due to lack of Windows support. Existing discussions may continue here.
  • NOTE2: Would recommend filtering out *.css, *.html and *.json files for the review to make it easier to navigate. Those are generated files which have been moved.
  • NOTE3: See docs/LOCAL_DEVELOPMENT.md for information on new/updated script usages.
    • Commands of note:
      • npm run build to update build folder with generated tests and review pages for all test plans
      • npm run validate to check if there are any validation errors for the test plans
      • npm run build --testplan=<test_plan>, eg. npm run build --testplan=checkbox to update build folder with a generated test and review page for a specific test plan
      • npm run validate --validate=<test_plan>, eg. npm run validate --testplan=checkbox to check if there are any validation errors for a specific test plan

This addresses a few issues identified with the automation/workflow scripts flow. See #384.

Test Plans generation script noisy output

When running npm run create-all-tests to generate test plans, many of the messages were unnecessary when one of the main goals was only understanding if anything unexpected had happened.

Verbose Output

An image of the verbose output the create-all-tests script was originally producing

The decision taken here was to completely silence the output except for displaying errors and providing a summary of how many tests have been generated.
A note on how many log lines have been suppressed along with instructions on how to view those messages is provided which means the original verbose output is now behind a --verbose flag.

Non-Verbose Output

Summarized non-verbose output of create-all-tests which show how much test plans were successfully processed, how many validation errors were found in other test plans as well as relevant messages covering that error and a help message indicating how to view this output in a verbose mode if wanted

Conflicts created by generated files from PR action + local development changes

  • The generated output for the npm run create-all-tests and npm run review-tests will continue to work as normal. The only difference is that the files they generated are now stored in a build folder. This means means there will no longer be a chance for merge conflicts to occur on those in-line generated files when having to push/pull to/from the repository.
  • These files are updated via a GitHub Action with npm run build which will then be referenced in the PR's Preview Tests link instead.
  • This may also require persons pulling in the latest commit from the base branch (which the PR will also notify you of) before merging to avoid any possible merge conflicts but overall, the merge conflicts situation should be somewhat mitigated for the time being.

howard-e and others added 30 commits May 26, 2021 14:33
Updated create-all-tests script to add verbose flag and provide summary of runs
* WIP - pre-push test

* Revert "WIP - pre-push test"

This reverts commit 42b40d6

* adding tests folder level .gitignore

* after untrack

* added additional command to generate-and-commit-files workflow script

* Generate test and review files automatically

* workflow tweak

* Generate test and review files automatically

* workflow tweak

* Generate test and review files automatically

* workflow tweak

* Generate test and review files automatically

* workflow tweak

* Generate test and review files automatically

* Generate test and review files automatically

* workflow tweak

* Generate test and review files automatically

* workflow tweak

* workflow step rename

* added tests/.gitignore

* Generate test and review files automatically

* untracked files

* Generate test and review files automatically

* misc

* Generate test and review files automatically

* adjusted generate-and-commit-files.yml for CI

* Generate test and review files automatically

* updated workflow action

* untracked files

* Generate test and review files automatically

* misc

* Generate test and review files automatically

* Update test-03-navigate-to-unchecked-checkbox-interaction.html

* Generate test and review files automatically

* Create test-03-navigate-to-unchecked-checkbox-interaction.html

* Generate test and review files automatically

* misc

* Generate test and review files automatically

* after untrack

* modified gitignore

* untrack files

* testing .gitattributes

* Generate test and review files automatically

* .gitattributes

* Generate test and review files automatically

* misc

* Generate test and review files automatically

* misc

* Generate test and review files automatically

* misc

* Generate test and review files automatically

* adjusted .gitattributes

* Generate test and review files automatically

* misc

* Generate test and review files automatically

* misc

* misc

* adjusted gitignore

* after untrack

* prep to test workflow

* Generate test and review files automatically

* Create index.html

* Generate test and review files automatically

* Delete index.html

* Generate test and review files automatically

* adjusting generated PR link

* Generate test and review files automatically

* adding support for support.json

* Generate test and review files automatically

* build cleanups

* misc

* workflow refactor

* Generate test and review files automatically

* Generate test and review files automatically

* after merging with verbosity branch

* Generate test and review files automatically

* updated .gitattributes and .gitignore; added additional utility script for generating tests and review files locally

* Generate test and review files automatically

* misc

* Generate test and review files automatically

Co-authored-by: howard-e <[email protected]>
* added `npm run validate` command
* added `npm run cleanup` command
# Conflicts:
#	build/index.html
#	build/review/checkbox-tri-state.html
#	build/review/checkbox.html
#	build/review/combobox-autocomplete-both.html
#	build/review/combobox-select-only.html
#	build/review/menu-button-actions-active-descendant.html
#	build/review/menubar-editor.html
#	build/review/modal-dialog.html
#	build/review/tabs-manual-activation.html
howard-e and others added 6 commits June 16, 2021 13:49
# Conflicts:
#	.gitattributes
#	.gitignore
#	docs/LOCAL_DEVELOPMENT.md
#	index.html
#	package.json
#	review/checkbox-tri-state.html
#	review/checkbox.html
#	review/combobox-autocomplete-both.html
#	review/combobox-select-only.html
#	review/menu-button-actions-active-descendant.html
#	review/menubar-editor.html
#	review/modal-dialog.html
#	review/tabs-manual-activation.html
#	scripts/create-all-tests.js
#	scripts/create-example-tests.js
#	scripts/test-reviewer.mjs
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.

I reran all the commands and looked over all changes since the last time I reviewed - nothing jumped out at me, besides perhaps the 40,862 lines changed. That is eye popping.

@jscholes
Copy link
Contributor

@howard-e Can we work on a branch within this repo, please? Working under your own account just means that it's more difficult for everybody else to checkout and contribute.

Copy link
Contributor

@jscholes jscholes left a comment

Choose a reason for hiding this comment

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

@howard-e Thanks for your patience in waiting for my review here. This is all working great 👍

@jscholes
Copy link
Contributor

@jesdaigle / @s3ththompson Can we get a review on this PR soon? I'd love to see it merged this week.

@s3ththompson s3ththompson removed their request for review June 29, 2021 21:00
@howard-e howard-e merged commit 693aceb into w3c:master Jun 29, 2021
howard-e added a commit that referenced this pull request Jul 15, 2021
howard-e added a commit that referenced this pull request Jul 20, 2021
…or Navigation Menus (#347)

* Add Disclosure for Navigation Menus APG example with modified CSS/JS references

For more details of what is removed from and maintained in APG examples, see: 335dada

* Example: update page title

* Example: remove core JS/CSS references

* Example: remove 'Related Links' nav

* Example: update pattern href

* Example: remove links to similar examples

* Example: remove usage options and keyboard support checkbox

* Example: remove 'Accessibility Features', 'Keyboard Support', 'Role, Property, State, and Tabindex Attributes' and source code sections

* Example: remove footer nav

* Example: add a link before the first disclosure button for use in setup scripts

More details: 4357a2e

* Add references.csv

* Add Shift+B to keys.mjs

* Correct Shift+F in keys.mjs

* Add Shift+K and Shift+U to keys.mjs

* Add commands.csv

* Add tests.csv

* Add setup scripts

* Remove trailing blank lines from CSVs

* Generate test and review files automatically

* Example: remove blur handler which interferes with setup scripts

* Generate test and review files automatically

* Correct element selector for second disclosure button in setup scripts

* Generate test and review files automatically

* Correct document reference in setup script

* Generate test and review files automatically

* Apply display: none styling to the first dropdown menu for certin tests (e.g. where navigation back to the associated button is required without intermediate elements)

* Generate test and review files automatically

* Update setup scripts to focus the first link in a dropdown rather than the button for the next menu

* Generate test and review files automatically

* Add instructions about pressing certain commands twice

* Generate test and review files automatically

* Add additional link navigation commands when moving between disclosure button and dropdown

* Generate test and review files automatically

* Add VO+Command+J to VoiceOver tests when navigating forwards to the disclosure

* Add Shift+VO+Command+J to VoiceOver tests when navigating backwards to the disclosure

* Add Insert+Up to JAWS and NVDA tests when reading information about the disclosure

* Generate test and review files automatically

* Remove Insert+Up from JAWS and NVDA tests when reading information about the disclosure in interaction mode, as unlike in reading mode, only the accessible name of the control is reported

* Add Home, Up and Left arrow to JAWS and NVDA tests when navigating backwards to the disclosure in interaction mode

* Add Control+Option+Command+L and Shift+Control+Option+Command+L to keys.mjs file

* Add VO+Command+L and Shift+VO+Command+L to VoiceOver tests when navigating to links in the dropdown

* Generate test and review files automatically

* Copy files to address merge conflicts

* Regenerate test files

* Generate test and review files automatically

* after merging in new build artifact PR

* Generate test and review files automatically

* following re-merge of #451

* Generate test and review files automatically

* Updated 'Lasted Edited' -> 'Last Edited'

* Generate test and review files automatically

Co-authored-by: jscholes <[email protected]>
Co-authored-by: Isabel Del Castillo <[email protected]>
Co-authored-by: IsaDC <[email protected]>
Co-authored-by: Howard Edwards <[email protected]>
Co-authored-by: howard-e <[email protected]>
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.

4 participants