aboutsummaryrefslogtreecommitdiffstats
path: root/tools/chat-layout-test.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/chat-layout-test.js')
-rw-r--r--tools/chat-layout-test.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/chat-layout-test.js b/tools/chat-layout-test.js
index 875f75b..a6f4162 100644
--- a/tools/chat-layout-test.js
+++ b/tools/chat-layout-test.js
@@ -4,7 +4,7 @@
// composer below the fold.
//
// Run: bun tools/chat-layout-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';
@@ -20,7 +20,7 @@ const check = (n, c, d = '') => { console.log(` ${c ? '✓' : '✗'} ${n}${d ? '
const html = await buildHtml({ minify: true, pwa: false });
const server = Bun.serve({ port: 5229, 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: 'live', executablePath: '/usr/bin/google-chrome', headless: 'new', args: ['--no-sandbox'] });
const page = await browser.newPage();
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);
const setInput = (sel, v) => page.evaluate((s, val) => { const e = document.querySelector(s); if (!e) return false; e.value = val; e.dispatchEvent(new Event('input', { bubbles: true })); return true; }, sel, v);