aboutsummaryrefslogtreecommitdiffstats
path: root/tools/zap-deep-profile-test.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/zap-deep-profile-test.js')
-rw-r--r--tools/zap-deep-profile-test.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/zap-deep-profile-test.js b/tools/zap-deep-profile-test.js
index 55c7b5d..3f0e72d 100644
--- a/tools/zap-deep-profile-test.js
+++ b/tools/zap-deep-profile-test.js
@@ -6,7 +6,7 @@
// at "not enough in Spending" — past the address lookup, which is the point).
//
// Run: bun tools/zap-deep-profile-test.js
-import puppeteer from 'puppeteer-core';
+import puppeteer from './puppeteer.js';
import { generateMnemonic } from '@scure/bip39';
import { wordlist } from '@scure/bip39/wordlists/english';
import { buildHtml } from '../build.js';
@@ -19,7 +19,7 @@ const check = (n, c, d = '') => { console.log(` ${c ? '✓' : '✗'} ${n}${d ? '
const html = await buildHtml({ minify: true, pwa: false });
const server = Bun.serve({ port: 5253, fetch: () => new Response(html, { headers: { 'content-type': 'text/html' } }) });
-const browser = await puppeteer.launch({ executablePath: '/usr/bin/google-chrome', headless: 'new', args: ['--no-sandbox'] });
+const browser = await puppeteer.launch({ relays: 'read', executablePath: '/usr/bin/google-chrome', headless: 'new', args: ['--no-sandbox'] });
const page = await browser.newPage();
await page.setViewport({ width: 420, height: 900 });
const click = (sel, t) => page.evaluate((s, x) => { const e = [...document.querySelectorAll(s)].find((n) => n.textContent.trim().toLowerCase().includes(x.toLowerCase())); if (e) { e.click(); return true; } return false; }, sel, t);