Add automated browser-based tests to check examples on web editor for console errors#85
Open
nbogie wants to merge 7 commits into
Open
Add automated browser-based tests to check examples on web editor for console errors#85nbogie wants to merge 7 commits into
nbogie wants to merge 7 commits into
Conversation
(generated by playwright)
Author
|
update: silenced the headless firefox test run to match chrome. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #84
What is this?
Adds playwright-based config and tests to check the p5.sound examples in place on the web editor, checking they load and don't have any errors in the console.
How to run the tests (with test-runner UI)
This is recommended as it allows easier exploration of test failures:
in the gui that opens, click "projects" and ensure "firefox" and "chromium" are checked. (see image)
Also in the gui, press the play button on the top test or above it. (see image)
Alternative: How to run the tests (unattended):
This will present a html report when it finishes.
What are the additions and changes?
package.jsonplaywright.config.js, specifying, for example, where the tests are (./tests/) and which browsers to use.tests/integration/test-examples-on-web-editor.spec.jsThis is the main test file that instructs playwright what web pages to load , what to click, and what to check for.tests/integration/about-these-tests.mddocumenting the testing (and some problems faced in automated testing of the web editor)..github/workflows/playwright.yml.DISABLED- this is untested.Limitations:
.github/workflows/playwright.yml.DISABLEDAI usage disclosure
Claude Code did most of the implementation on this, including research into chrome and firefox support for pre-emptive grants of microphone + video, troubleshooting the main issue with testing the web editor, and the bulk of the write-up
about-these-tests.md. That said, I've reworked the code to how I want it, I have read and understood each line, and the PR write-up is all mine.