fix(tests): wait for TinyMDE to be defined after page navigation - #178
Merged
Conversation
When all 3 browser projects run concurrently, tiny-mde.js occasionally fails to load in Firefox due to transient server contention. Browsers still fire the load event even when a script tag fails to load, so waitUntil: 'load' was resolving before TinyMDE was actually available. Adds a waitForTinyMDE helper that explicitly waits for TinyMDE to appear in the browser global, and applies it after every page.goto() call across all test files. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
TinyMDE is not definederrors were reportedtiny-mde.jsoccasionally fails to load in Firefox due to transient server contention; browsers still fire theloadevent even when a script fails to load, sowaitUntil: 'load'resolved before TinyMDE was actually availableglobal.waitForTinyMDE(page)helper that uses Playwright'swaitForFunctionto explicitly wait forTinyMDEto appear in the browser global scopepage.goto()call across all 6 test filesTest plan
684 passed, 684 total) across all 3 browserssetup.test.js(the file where all 17 Firefox failures were observed) now consistently passes when run with all 3 projects concurrently🤖 Generated with Claude Code