Synchronize preview navigation in vibe-platform E2E - #51
Merged
Merged
Conversation
The built status is written immediately after assigning iframe.srcdoc, while the previous document can still be active. Register for navigation before each build, save, and reload, then wait for the new preview root so API calls use its installed bridge. This also synchronizes the initial automatic build and uses the correct Playwright timeout argument.
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.
The vibe-platform E2E test called the preview API as
iframe.srcdocwas navigating, destroying its execution context. The initial POST never completed, so subsequent persistence assertions also failed in main CI after release PR #47.Register a navigation wait before each build, successful save, and reload, then wait for the new document's root. Its API bridge is installed before that root is parsed, so this works without waiting for CDN modules. Synchronize the initial automatic build too, and pass the status timeout in Playwright's options position. No API retries or runtime changes.
Validation: reproduced wrong-document API calls and destroyed execution contexts with delayed navigation. The full example passes normally and with a temporary 100 ms srcdoc delay. Forced-offline execution passes with the three CDN-dependent checks skipped. JavaScript syntax and diff checks pass; temporary instrumentation was removed.