test(ios): repro test for setting caret on adjacent thought (#4173)#4
Closed
ethan-james wants to merge 1 commit into
Closed
test(ios): repro test for setting caret on adjacent thought (#4173)#4ethan-james wants to merge 1 commit into
ethan-james wants to merge 1 commit into
Conversation
…rsemics#4173) Adds an iOS/wdio regression test that attempts to reproduce cybersemics#4173, where tapping an adjacent thought within ~1s of a previous tap fails to move the cursor. Introduces a `doubleTap` touch helper that fires two real touch taps with a deterministic sub-second interval, since a hand-driven repro cannot reliably tap fast enough. The bug does not reproduce in the local iOS Simulator via WebDriver touch injection; this test is intended to run on a real BrowserStack device in CI to determine whether the failure reproduces on real hardware. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Owner
Author
|
Superseded by cybersemics#4538, which runs against the repo that holds the BrowserStack secrets. |
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.
cybersemics#4173
Summary
Adds an iOS/wdio regression test that attempts to reproduce #4173: tapping an adjacent thought within ~1 second of a previous tap fails to move the cursor (the second tap's
setCursoris never dispatched). Tapping a non-adjacent thought works.The suspicion was that the bug couldn't be reproduced manually because a human can't tap two adjacent thoughts fast enough. This PR tests that hypothesis with programmatically controlled sub-second timing.
What's here
src/e2e/iOS/helpers/doubleTap.ts— a new touch helper that resolves both target coordinates up front and fires two real touch taps (pointerType: 'touch') in a singleperformActionssequence with a deterministicintervalMsgap between them. Resolving coordinates first means the inter-tap interval is exactlyintervalMs(default 300ms) rather than incidental Appium round-trip latency, which can exceed a second. Interval is overridable viaTAP_INTERVAL_MS.src/e2e/iOS/__tests__/caret.ts— a new test in theCaretsuite that seedsa / b / c, double-tapsathen the adjacentb, and asserts the cursor lands onbviagetEditingText()(which reflectsstate.cursorindependent of keyboard/edit-mode state).Why a real device
The bug does not reproduce in the local iOS Simulator via WebDriver touch injection — synthetic touch appears to bypass the native WebKit rapid-tap gesture recognition that causes the failure on real hardware. This PR exists to run the same repro attempt on a real BrowserStack device in CI (the diagnostic goal).
No production code is changed.
Draft until the BrowserStack CI result is known.