Simplify connection flow, mobile transfer UI, and header actions

This commit is contained in:
2026-10-12 18:14:54 +09:00
parent 5f431ee153
commit 4f0231da3d
22 changed files with 820 additions and 131 deletions

View File

@@ -35,9 +35,16 @@ try {
});
const page = await context.newPage();
await page.addInitScript(() => {
window.addEventListener('beforeinstallprompt', (event) => {
if (!event.__hopTest) { event.preventDefault(); event.stopImmediatePropagation(); }
}, { capture: true });
window.addEventListener(
'beforeinstallprompt',
(event) => {
if (!event.__hopTest) {
event.preventDefault();
event.stopImmediatePropagation();
}
},
{ capture: true },
);
});
await page.goto(url);
await page.locator('.app-shell[data-online="true"]').waitFor();
@@ -48,7 +55,8 @@ try {
assert.equal((await context.request.get(url + icon.src)).status(), 200);
await page.waitForFunction(() => navigator.serviceWorker.controller !== null);
assert.deepEqual(await page.evaluate(() => caches.keys()), []);
const install = page.getByRole('button', { name: 'hop. 앱 설치', exact: true });
await page.getByRole('button', { name: '더보기', exact: true }).click();
const install = page.getByRole('menuitem', { name: 'hop. 앱 설치', exact: true });
await install.click();
await page.getByRole('dialog', { name: '앱 설치 안내' }).waitFor();
assert.match(await page.locator('.install-help').innerText(), /Safari.*공유/s);
@@ -67,6 +75,7 @@ try {
event.userChoice = Promise.resolve({ outcome: 'accepted' });
window.dispatchEvent(event);
});
await page.getByRole('button', { name: '더보기', exact: true }).click();
await install.click();
assert.equal(await page.evaluate(() => window.__installCalls), 1);
await install.waitFor({ state: 'hidden' });