Desktop boot check: the dry-run preview is accepted whenever it shows, also during waits
This commit is contained in:
parent
26ebb64458
commit
f052831fea
1 changed files with 4 additions and 2 deletions
|
|
@ -236,8 +236,10 @@ interface CaseResult { name: string; ok: boolean; problems: string[]; visited: n
|
|||
* going on: the native confirm dialog after it is what each case checks. */
|
||||
async function newPage(ctx: { newPage(): Promise<import('playwright').Page> }): Promise<import('playwright').Page> {
|
||||
const page = await ctx.newPage();
|
||||
await page.addLocatorHandler(page.locator('.ds-scrim:has(.dr-cmd)'), async () => {
|
||||
await page.locator('.ds-scrim:has(.dr-cmd) .btn-primary').click();
|
||||
// a person reads the preview and presses Continue, also while the check only waits (no action of its own to block)
|
||||
await page.addInitScript(() => {
|
||||
const go = () => { const b = document.querySelector<HTMLButtonElement>('.ds-scrim:has(.dr-cmd) .btn-primary'); if (b) b.click(); };
|
||||
new MutationObserver(go).observe(document, { childList: true, subtree: true });
|
||||
});
|
||||
return page;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue