Release 0.0.6 with reconnect fixes and regression coverage

This commit is contained in:
Schluffe committed 2026-10-21 00:39:08 +02:00
1 parent acba97a7e1
commit 9f3f21884f
10 files changed
+279 -36

No files matched your search

+16 -1
View File
@@ -636,7 +636,9 @@ try {
await checkAccessibility(identityReceiver, 'reconnect proposal');
if (screenshotDirectory) await evaluate(identityReceiver, () => window.__hellcon.element('.reconnect-setup').scrollIntoView({ block: 'center' }));
await screenshot(identityReceiver, 'reconnect-proposal');
await click(identityReceiver, 'Accept');
// Two clicks can arrive before Vue rerenders the button. Consent must
// start only one key derivation and send only one acceptance.
await evaluate(identityReceiver, () => { window.__hellcon.click('Accept'); window.__hellcon.click('Accept'); });
for (const session of both) await wait(session, () => document.body.textContent?.includes('Reconnect is set up on both devices'));
for (const session of both) assert.ok(await hasPairing(session));
};
@@ -684,8 +686,21 @@ try {
await input(session, '#stun-provider', 'none');
await wait(session, () => [...document.querySelectorAll('button')].some(button => button.textContent === 'Reconnect' && !button.disabled));
}
const competing = await page();
await wait(competing, () => [...document.querySelectorAll('button')].some(button => button.textContent === 'Reconnect' && !button.disabled));
await input(competing, '#stun-provider', 'none');
await click(identitySender, 'Reconnect');
await wait(identitySender, () => document.body.textContent?.includes('Waiting for your peer on'));
await click(competing, 'Reconnect');
await wait(competing, () => document.body.textContent?.includes('Another HellCon tab is already reconnecting'));
assert.ok(await evaluate(identitySender, () => document.body.textContent?.includes('Waiting for your peer on')));
await click(identitySender, 'Cancel connection');
await click(competing, 'Reset'); await click(competing, 'Reconnect');
await wait(competing, () => document.body.textContent?.includes('Waiting for your peer on'));
await click(competing, 'Cancel connection');
await click(identitySender, 'Reconnect');
await wait(identitySender, () => document.body.textContent?.includes('Waiting for your peer on'));
console.log('PASS: another tab cannot reconnect the same slot; cancellation releases the lock for either tab to retry.');
await checkAccessibility(identitySender, 'reconnect waiting');
if (screenshotDirectory) await evaluate(identitySender, () => [...document.querySelectorAll('button')].find(button => button.textContent === 'Reconnect')?.scrollIntoView({ block: 'start' }));
await screenshot(identitySender, 'reconnect-waiting');