From eba630e06e07bb4d27f79b892d92bc87f9c8f71f Mon Sep 17 00:00:00 2001 From: bonamin Date: Tue, 17 Nov 2026 10:29:21 +0200 Subject: [PATCH] test(android): the sign-in screen check after pairing waits up to 15 s (a fresh install is slow to show it) Co-Authored-By: Claude Opus 5.5 --- tests/e2e/android.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/e2e/android.mjs b/tests/e2e/android.mjs index 27750f3..39c9c57 100644 --- a/tests/e2e/android.mjs +++ b/tests/e2e/android.mjs @@ -69,7 +69,8 @@ async function basics() { v = await attach() const st = await venuesState(v) r.check('pairing saves and activates the venue', st?.active === 'test-site-1' && st.venues['test-site-1'].baseUrl.includes(`${H}:`), JSON.stringify(st)) - r.check('login screen shows the venue + "Change"', (await v.evaluate('document.body.innerText')).includes('Change')) + // a freshly installed app can take a few seconds to show the sign-in screen after pairing + r.check('login screen shows the venue + "Change"', !!(await waitFor(async () => (await v.evaluate('document.body.innerText')).includes('Change'), 15_000, 500))) // 4.2: a real sign-in in the native app: pick your name, PIN on the pad, start the shift await fetch(`${b1.url}/api/business-day/open`, { method: 'POST', headers: { 'content-type': 'application/json', authorization: `Bearer ${token}` }, body: '{}' }).catch(() => {})