Skip to content

fix(mobile): the folder Move UI test follows the 2.55 prompt and waits for focus - #38

Merged
adibhanna merged 1 commit into
mainfrom
fix/move-test-prompt-wording
Oct 1, 2026
Merged

adibhanna merged 1 commit into
mainfrom
fix/move-test-prompt-wording

Conversation

@adibhanna

Copy link
Copy Markdown
Contributor

Summary

  • MoveDirectoryUITests failed on every run since 1.13.0 ("the Move prompt did not open"): it looked for the placeholder inbox/Work, which core 2.55.0 ([Bug] Moving Notes shows wrong folders zennotes#844) replaced with <notes root> (type a folder to change). The test now matches the placeholder's fixed ending and types the destination the way the sidebar shows it (no inbox/ prefix), so it works on Inbox vaults and root-notes vaults alike.
  • It also flaked while typing: with core 2.52.0 to 2.60.0 the dialog shell focused the prompt's input on open, the keyboard lifted the sheet, and the test's tap (aimed at the field's pre-lift frame) blurred it again. A new focusPromptField helper waits for focus and taps only if the field did not take it, so the test passes with either behavior. The New folder step uses it too.
  • The underlying core regression (folder pickers raising the keyboard on phones) is fixed upstream in ZenNotes/zennotes 0c3071a6 on v2.61.0; this shell picks it up with the next core:adopt.

Verification

  • iPhone 17 Pro Max (iOS 27) simulator, scheme AppCloudUITests: MoveDirectoryUITests passed 3 iterations in a row on a clean vault (35.3 s, 34.0 s, 37.5 s), each removing its own fixture folders.
  • Passed again on a throwaway build with the tap-first core packed in (the shell was restored to the vendored 2.60.0 core afterwards; boundaries:check passes).
  • Test-only change: no app code, no vendored core change.

Review notes

Failed runs (before this fix) left MoveSrc*/MoveDst* folders in the simulator's vault; those were removed. The test still leaves its fixture behind if it fails midway, as before.

…s for focus

MoveDirectoryUITests failed on every run since 1.13.0 with "the Move prompt
did not open". It found the core's Move prompt by the placeholder
"inbox/Work", but core 2.55.0 (ZenNotes/zennotes#844) made the prompt speak
the sidebar's language: the placeholder became "<notes root> (type a folder
to change)" and destinations are typed as the sidebar shows them, with no
inbox/ in front. The test now matches the placeholder's fixed ending (the
root's name depends on the vault) and types the destination's own path,
which works on an Inbox vault and on one whose notes live at the root.

With the lookup fixed, the test still failed now and then while typing
("Neither element nor any descendant has keyboard focus"). From core 2.52.0
to 2.60.0 the dialog shell focused the prompt's input on open, so the
keyboard came up by itself and lifted the sheet; the test's tap, aimed at
the field's frame from before the lift, blurred it again (seen frame by
frame in the run's recording). The desktop fix that restores tap-first is
ZenNotes/zennotes 0c3071a6. The test no longer depends on either behavior:
it gives the field a moment to take focus and taps only when it did not,
which also covers a hardware keyboard keeping the software one down. The
New folder step uses the same helper.

iPhone 17 Pro Max (iOS 27) simulator: three iterations in a row passed on
a clean vault (35.3 s, 34.0 s, 37.5 s), each removing its own fixture, and
the test passed again on a build with the tap-first core packed in.
@adibhanna
adibhanna merged commit eb07f1c into main Oct 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant