test: harden NWC browser lifecycle coverage

This commit is contained in:
2026-08-22 16:56:49 +02:00
parent a40079200d
commit 76d59d8d08
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -63,9 +63,10 @@ test.describe('NWC settings page', () => {
await expect(page.getByText('shown only once', { exact: false })).toBeVisible();
const uri = (await page.locator('.nwc-connection-string').textContent())?.trim();
expect(uri).toBeTruthy();
if (!uri) throw new Error('Expected the one-time NWC connection string.');
// a well-formed NIP-47 connection string
const url = new URL(uri!);
const url = new URL(uri);
expect(url.protocol).toBe('nostr+walletconnect:');
expect(url.host).toMatch(/^[0-9a-f]{64}$/);
expect(url.searchParams.get('secret')).toMatch(/^[0-9a-f]{64}$/);
+2 -1
View File
@@ -21,7 +21,8 @@ export default defineConfig({
use: {
baseURL: 'http://localhost:9333',
trace: 'on-first-retry',
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
serviceWorkers: 'block',
launchOptions: {
executablePath: process.env.CHROMIUM_PATH || findSystemChromium(),