Test the rule that chooses the dictionary's container #6
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "test/dictionary-fits-beside"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
The guard merged in #3 decides whether the dictionary opens beside the poem or as a sheet over it. Nothing proved it was right.
I tried four times to verify it on the emulator at 700dp and failed every time. Reaching the rule needs a tap landing on the glyphs of one Persian word inside a
SelectionContainer, and adb's synthetic taps either:ذخیرهٔ این بیت/رونوشت/ …), which my detector then mistook for the dictionary.The verses aren't exposed to
uiautomatoreither — only the column list is — so there is nothing to aim at by bounds.What this does instead
The gesture can't be driven reliably; the arithmetic behind it can. The expression moves into a pure function:
and gets four cases:
wide = false)The boundary case is the one that matters: it pins the threshold at panel + minimum measure, so if either constant moves the test says so.
No behaviour change — same expression, named and covered. 67 tests pass (was 63).
Still true
This proves the decision, not the rendering. Nobody has yet seen the sheet appear at 700dp with their own eyes; a real device or an instrumented test would be the honest check, and the gesture is exactly what an instrumented test could drive that adb cannot.
Pull request closed