mirror of
https://github.com/tompro/sattle.git
synced 2026-08-27 07:15:59 +00:00
test: harden NWC browser lifecycle coverage
This commit is contained in:
@@ -63,9 +63,10 @@ test.describe('NWC settings page', () => {
|
|||||||
await expect(page.getByText('shown only once', { exact: false })).toBeVisible();
|
await expect(page.getByText('shown only once', { exact: false })).toBeVisible();
|
||||||
const uri = (await page.locator('.nwc-connection-string').textContent())?.trim();
|
const uri = (await page.locator('.nwc-connection-string').textContent())?.trim();
|
||||||
expect(uri).toBeTruthy();
|
expect(uri).toBeTruthy();
|
||||||
|
if (!uri) throw new Error('Expected the one-time NWC connection string.');
|
||||||
|
|
||||||
// a well-formed NIP-47 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.protocol).toBe('nostr+walletconnect:');
|
||||||
expect(url.host).toMatch(/^[0-9a-f]{64}$/);
|
expect(url.host).toMatch(/^[0-9a-f]{64}$/);
|
||||||
expect(url.searchParams.get('secret')).toMatch(/^[0-9a-f]{64}$/);
|
expect(url.searchParams.get('secret')).toMatch(/^[0-9a-f]{64}$/);
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ export default defineConfig({
|
|||||||
|
|
||||||
use: {
|
use: {
|
||||||
baseURL: 'http://localhost:9333',
|
baseURL: 'http://localhost:9333',
|
||||||
trace: 'on-first-retry',
|
trace: 'retain-on-failure',
|
||||||
|
screenshot: 'only-on-failure',
|
||||||
serviceWorkers: 'block',
|
serviceWorkers: 'block',
|
||||||
launchOptions: {
|
launchOptions: {
|
||||||
executablePath: process.env.CHROMIUM_PATH || findSystemChromium(),
|
executablePath: process.env.CHROMIUM_PATH || findSystemChromium(),
|
||||||
|
|||||||
Reference in New Issue
Block a user