Repository navigation
Port AttemptSession.checkpoint and the surface-lifecycle typing/press tests (tester-army/e2e#2283) - #2434
Merged
Conversation
…haracter-press tests (e2e-inc/e2e#2283) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ls2e22SMi19CSWCdhR8ZZQ
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 31 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ls2e22SMi19CSWCdhR8ZZQ
Member
Author
|
Generated by Claude Code |
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.
Closes #2358
What
Keyboard typing and character presses now stop when the connection is retired or the browser context is replaced, not only on cancel or deadline. Before, a delayed focus read or CDP session could keep sending keys into a replaced context. Now it fails with
NODE_STALE.Upstream parity
Upstream: e2e-inc/e2e#2283 (commit 5c1839c),
AttemptSession.checkpoint/token/check/invalidate.generation = {}+invalidate()WebSession._generation+Invalidate()(replaces each_refs.Clear()at a connection/page transition)token()/check(token)Token()/Check(token)(NODE_STALE when generation changed or attempt ended)checkpoint(signal, label)Checkpoint(budget, cancellationToken), now also checks the token; shared bytypeTextandpressCharactertypeTextcheckpoints between focus read, select-all, delete, typeTypeTextAsyncruns as one budgeted input with the same checkpointsPort-only symbols: none (no
AttemptSessiontype exists; the methods live onWebSession, the port's equivalent owner).Verdict: complete.
Upstream tests (all in
tests/E2E.Tests/SurfaceLifecycle/SurfaceLifecycleTests.cs)sends no key of a character press when its CDP session opens {cancelled | past its deadline | on a replaced context}→Sends_no_key_of_a_character_press_when_its_CDP_session_opens(3 cases)sends a character press as CDP key events once its session opens on the live context→ same-named methodstops remaining typing after cancellation during {focus|select-all|delete}→Stops_remaining_typing_after_cancellation_during_stagerejects a focus read from a context replaced before typing dispatches→ same-named methodThey run against
Fake<T>Playwright proxies (an ordinary context over a fake page), like upstream's mocked surface.Not ported
Upstream's
browser.keyboard.pressfixture stays on raw Playwright (as upstream). The basic-auth test in the same file remains unported, as noted in the class comment (#2311).Local run: new tests pass. 17 browser-dependent tests fail in this sandbox (Playwright cannot install chromium), unrelated to this change. Real-model tests were not run (no Copilot login here).
Generated by Claude Code