File tree Expand file tree Collapse file tree
packages/platform-android/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- // Fill reads the live hierarchy at least three times per attempt ( one pre-action target read plus
2- // the settling samples, 150 ms apart, until the text has held for two of them or the deadline has
3- // passed) . `am instrument` force-stops whatever is already instrumenting the helper package, so a
1+ // Fill reads the live hierarchy at least three times per attempt: one pre-action target read plus
2+ // the settling samples, every 150 ms until the text has held for two of them or the deadline has
3+ // passed. `am instrument` force-stops whatever is already instrumenting the helper package, so a
44// command-scoped capture stops the automation-helper session after every one of those reads and the
55// next read pays a fresh `am instrument` start. These tests pin who owns the helper session across
66// the samples and how long the samples keep coming — not what one sample concludes, which
@@ -94,8 +94,7 @@ test('verification samples re-read the hierarchy instead of sharing one capture'
9494} ) ;
9595
9696test ( 'a value the app renders late still verifies, as long as it lands before the deadline' , async ( ) => {
97- // Six samples of the hint before the value shows: 900 ms in, past the retired schedule's last
98- // sample at 500 ms and inside the deadline.
97+ // Six samples of the hint before the value shows, 900 ms in and inside the deadline.
9998 const session = createFillHelperSession ( {
10099 textForCapture : ( captureIndex ) => ( captureIndex <= 6 ? 'Key echo' : 'chips' ) ,
101100 } ) ;
Original file line number Diff line number Diff line change @@ -44,13 +44,10 @@ type AndroidFillVerificationContext = {
4444} ;
4545
4646/**
47- * How the samples that verify a fill are spaced, and how long they keep coming. The typed text
48- * reaches the accessibility tree when the app renders it, which a React Native controlled input on a
49- * loaded emulator does later than the three fixed samples (at 0, 150 and 500 ms elapsed: sleeps of
50- * 0, 150 and 350 ms before each) allowed; an otherwise passing fill failed twice on a 4-vCPU CI
51- * emulator while the field still showed its hint. So the window is a deadline: sampling continues
52- * until the text has held for two consecutive samples, which on a fast device is sooner than the
53- * old schedule's last sample, and the sample taken at the deadline is the answer.
47+ * The sampling rule that verifies a fill: a hierarchy sample every 150 ms until the typed text has
48+ * held for two consecutive samples or the deadline has passed, and the sample taken at the deadline
49+ * is the answer. The typed text reaches the accessibility tree when the app renders it, and a
50+ * React Native controlled input on a loaded emulator renders it late.
5451 */
5552const FILL_VERIFICATION_SAMPLE_INTERVAL_MS = 150 ;
5653const FILL_VERIFICATION_DEADLINE_MS = 1500 ;
You can’t perform that action at this time.
0 commit comments