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(() => {})