Tap the edit and mark-up buttons again when a tap turns into a long press - #684
Merged
Merged
Conversation
…ress On the API 26 emulator of CI, Espresso sometimes sends the touch up too late. Android then reads the tap as a long press, and the logcat says "Overslept and turned a tap into a long press". A long press on a DocumentActions button only shows the tooltip, so the click listener does not run and the test fails. Every failure of testODT and testPDF in the last five runs on main has this line in its logcat. The taps on menu_edit and menu_annotate now use click() with a rollback action that does nothing, so Espresso taps again, up to three times. The taps on the strip tools stay as they are, because a long press there opens the colour popup. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011Ph3Q6se1Ah28qfcunYHG7
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.
build_teston main fails on API 26, andtestODTandtestPDFare two of the failing tests. The cause is in the test, not in the app.On the API 26 emulator of CI, Espresso sometimes sends the touch up too late. Android then reads the tap as a long press:
A long press on a
DocumentActionsbutton only shows the tooltip. The click listener does not run,menu_editnever logs, and the page stays read-only. Every failure oftestODTandtestPDFin the last five runs on main has this line in its logcat.Change
clickThroughLongPress()isclick(rollbackAction)with a rollback action that does nothing. If a tap turns into a long press, Espresso 3.7.0 taps again, up to three times.menu_edit(testODT,aSheetIsEditedInEveryEdition) andmenu_annotate(testPDF) use it.Not in this PR
LargeTextTests.aMegabyteOfTextOpensAndIsSearchable(API 26 and 30) andDarkModeTests(API 34) fail for other reasons.🤖 Generated with Claude Code