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

Render reference pages with setup script and button #512

Merged
merged 10 commits into from
Oct 1, 2021

Conversation

mzgoddard
Copy link
Contributor

@mzgoddard mzgoddard commented Sep 28, 2021

Preview Tests

Close #450 and #485

To improve the test page setup experience (#369), create a copy of the reference page during the test generation for each setup script. This copy will embed the setup script and a button to activate that script once. After running the test the window can be refreshed with Ctrl + R, Cmd + R, F5, etc. As the script and button are now part of the reference page the test instruction page does not to try and modify it at the right time.

  • use TestWindow in review page to open the reference page when Open Test Page is clicked
  • update TestWIndow to not run a setup script and change its behavior to properly re-enable Open Test Page button even after reloading the reference page.
  • create a template from a test plan's reference page and render a script and button into it
    • use a event listener on document to listen for a click on the button to bubble up to run the setup script
  • restructure createExampleTests
    • make createExampleTests into an async function
    • add readCSV that returns a promise resolving to an array of csv rows.
    • replace csv stream callback waterfall with an await on all of the readCSV promises
    • add FileRecord filesystem helpers to recursively read test plan input and structure the output and coordinate changes to the disk
    • make changes to the destination build directory in one group of actions if the script is not validating

TODO

  • Use the rendered reference page in review pages

@mzgoddard mzgoddard force-pushed the bocoup/reference-script-template branch 2 times, most recently from 795955f to e022548 Compare September 28, 2021 18:52
@mzgoddard mzgoddard force-pushed the bocoup/reference-script-template branch from b36a4b2 to 227d35f Compare September 28, 2021 18:57
@mzgoddard mzgoddard force-pushed the bocoup/reference-script-template branch from e2a767c to 9c9d9f0 Compare September 28, 2021 19:45
@@ -0,0 +1,28 @@
/// <reference path="../../types/aria-at-csv.js" />
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm seeing several empty files, lib/data/csv.js, lib/data/file.js and lib/data/parsed.js - do you know what that's about?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah. I'll remove those. They were a step in a process I want to continue moving functions out of scripts/create-example-tests.js

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.

It's a delight to see the code get cleaner with each iteration!

The ARIA-AT App should start showing the setup button on the new imported test plan versions.

@mzgoddard mzgoddard force-pushed the bocoup/reference-script-template branch from 6fff0a4 to 8fda09c Compare October 1, 2021 15:16
@mzgoddard mzgoddard merged commit b707803 into master Oct 1, 2021
@mzgoddard mzgoddard deleted the bocoup/reference-script-template branch October 1, 2021 15:21
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