Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Renumber test fixtures for consistency between platforms (#2469)

Leendert de Borst6a1d3056a192
diff --git a/apps/browser-extension/playwright.config.ts b/apps/browser-extension/playwright.config.ts
index 47b7e3741..4e1ffd3ac 100644
--- a/apps/browser-extension/playwright.config.ts
+++ b/apps/browser-extension/playwright.config.ts
@@ -7,7 +7,7 @@ import { defineConfig, devices } from '@playwright/test';
* The extension must be built first using `npm run build:chrome`.
*
* Test Organization:
- * - Tests are numbered (1.x, 2.x, etc.) and run in alphabetical order
+ * - Test files are numbered by area (1x account, 2x items, ..., see scripts/run-e2e.mjs) and run in alphabetical order
* - fullyParallel is disabled to ensure tests run sequentially
* - Each test gets a fresh browser context via fixtures
*/
diff --git a/apps/browser-extension/scripts/run-e2e.mjs b/apps/browser-extension/scripts/run-e2e.mjs
index d64c0e93d..9a24500ad 100755
--- a/apps/browser-extension/scripts/run-e2e.mjs
+++ b/apps/browser-extension/scripts/run-e2e.mjs
@@ -11,10 +11,16 @@
// node scripts/run-e2e.mjs [test numbers] [extra playwright args]
//
// npm run test:e2e all tests
-// npm run test:e2e 15 every test in file 15 (15.x)
-// npm run test:e2e 15.1 test 15.1; also 15.1,15.2 or 15.1-15.2
-// npm run test:e2e:h 15.1 same, in a visible browser, one test at a time
-// npm run test:e2e:p 15.1 same, and stops at each client.pause() in the Playwright Inspector
+// npm run test:e2e 9x every test in files 90 to 99 (one area)
+// npm run test:e2e 90 every test in file 90 (90.x)
+// npm run test:e2e 90.1 test 90.1; also 90.1,90.2 or 90.1-90.2
+// npm run test:e2e:h 90.1 same, in a visible browser, one test at a time
+// npm run test:e2e:p 90.1 same, and stops at each client.pause() in the Playwright Inspector
+//
+// Test files are numbered by area, in the same ranges as the web app suite, so a range selects one area:
+// 0x app shell 1x account and authentication 2x items
+// 3x sync and merge 4x email (web only) 5x settings (web only)
+// 6x browser integration 8x vault errors 9x vault upgrades
import { spawnSync } from "node:child_process";
import { readFileSync } from "node:fs";
@@ -91,16 +97,16 @@ for (const arg of argv.slice(2)) {
}
}
if (patterns.length > 0) {
- // A test title starts with its number ("4.3 should ..."); the leading boundary keeps 4.3 from matching 14.3.
+ // A test title starts with its number ("20.3 should ..."); the leading boundary keeps 1.3 from matching 11.3.
playwrightArgs.push("--grep", `(^|\\s)(${patterns.join("|")})\\s`);
}
/**
- * Whether an argument selects tests: "4", "4.3" or "4.1-4.3".
+ * Whether an argument selects tests: "2x", "20", "20.3" or "20.1-20.3".
* @param {string} value
*/
function isSelector(value) {
- return /^\d+(\.\d+)?$/.test(value) || /^\d+\.\d+-\d+\.\d+$/.test(value);
+ return /^\d+(\.\d+)?$/.test(value) || /^\d+\.\d+-\d+\.\d+$/.test(value) || /^\dx$/i.test(value);
}
/**
@@ -108,11 +114,16 @@ function isSelector(value) {
* @param {string} selector
*/
function toPatterns(selector) {
+ // "2x" is every file from 20 to 29; "0x" is the files 0 to 9, whose test numbers have no leading zero.
+ const area = selector.match(/^(\d)x$/i);
+ if (area) {
+ return [`${area[1] === "0" ? "" : area[1]}\\d\\.\\d+`];
+ }
const range = selector.match(/^(\d+)\.(\d+)-(\d+)\.(\d+)$/);
if (range) {
const [, file, from, toFile, to] = range.map(Number);
if (file !== toFile || from > to) {
- console.error(`Invalid range "${selector}": use one file, low to high, e.g. 14.1-14.3.`);
+ console.error(`Invalid range "${selector}": use one file, low to high, e.g. 90.1-90.2.`);
exit(1);
}
return Array.from({ length: to - from + 1 }, (_, i) => `${file}\\.${from + i}`);
diff --git a/apps/browser-extension/tests/e2e/03-authentication.spec.ts b/apps/browser-extension/tests/e2e/11-authentication.spec.ts
similarity index 63%
rename from apps/browser-extension/tests/e2e/03-authentication.spec.ts
rename to apps/browser-extension/tests/e2e/11-authentication.spec.ts
index a77f02a80..b719b0460 100644
--- a/apps/browser-extension/tests/e2e/03-authentication.spec.ts
+++ b/apps/browser-extension/tests/e2e/11-authentication.spec.ts
@@ -1,35 +1,35 @@
/**
- * Category 3: Authentication Flow (Requires API)
+ * Category 11: Authentication Flow (Requires API)
*
* These tests verify login/authentication works correctly.
* They require an API server to be running at localhost:5100.
*/
import { test, expect, TestClient } from '../fixtures';
-test.describe.serial('3. Authentication Flow', () => {
+test.describe.serial('11. Authentication Flow', () => {
let client: TestClient;
test.afterAll(async () => {
await client?.cleanup();
});
- test('3.1 should display error for invalid credentials', async ({ context, extensionId, apiUrl }) => {
+ test('11.1 should display error for invalid credentials', async ({ context, extensionId, apiUrl }) => {
client = await TestClient.fromContext(context, extensionId);
await client.configureApiUrl(apiUrl);
await client
.attemptLogin('[email protected]', 'wrongpassword')
- .then((c) => c.screenshot('3.1-login-failed.png'));
+ .then((c) => c.screenshot('11.1-login-failed.png'));
await expect(client.popup.locator('text=Invalid username or password')).toBeVisible({ timeout: 10000 });
await client.clearLoginForm();
});
- test('3.2 should successfully login with valid credentials', async ({ testUser }) => {
+ test('11.2 should successfully login with valid credentials', async ({ testUser }) => {
await client
.fillLoginForm(testUser.username, testUser.password)
.then((c) => c.submitLogin())
- .then((c) => c.screenshot('3.2-login-success.png'));
+ .then((c) => c.screenshot('11.2-login-success.png'));
});
});
diff --git a/apps/browser-extension/tests/e2e/10-two-factor-state.spec.ts b/apps/browser-extension/tests/e2e/12-two-factor-state.spec.ts
similarity index 86%
rename from apps/browser-extension/tests/e2e/10-two-factor-state.spec.ts
rename to apps/browser-extension/tests/e2e/12-two-factor-state.spec.ts
index 83cee88a4..849f7cdf3 100644
--- a/apps/browser-extension/tests/e2e/10-two-factor-state.spec.ts
+++ b/apps/browser-extension/tests/e2e/12-two-factor-state.spec.ts
@@ -1,5 +1,5 @@
/**
- * Category 10: Two-Factor Authentication State Persistence
+ * Category 12: Two-Factor Authentication State Persistence
*
* These tests verify that the 2FA login state persists when the popup is closed
* and reopened, allowing users to switch to their authenticator app without
@@ -39,7 +39,7 @@ async function reopenPopup(client: TestClient): Promise<void> {
await client.popup.waitForTimeout(500);
}
-test.describe.serial('10. Two-Factor Authentication State', () => {
+test.describe.serial('12. Two-Factor Authentication State', () => {
let client: TestClient;
let twoFactorUser: TestUser;
@@ -47,7 +47,7 @@ test.describe.serial('10. Two-Factor Authentication State', () => {
await client?.cleanup();
});
- test('10.1 should show 2FA form after entering credentials for 2FA-enabled user', async ({ apiUrl }) => {
+ test('12.1 should show 2FA form after entering credentials for 2FA-enabled user', async ({ apiUrl }) => {
// Create a test user with 2FA enabled
twoFactorUser = await createTestUserWith2FA(apiUrl);
@@ -58,7 +58,7 @@ test.describe.serial('10. Two-Factor Authentication State', () => {
const loginVisible = await isLoginFormVisible(client);
expect(loginVisible).toBe(true);
- await client.screenshot('10.1-initial-login-form.png');
+ await client.screenshot('12.1-initial-login-form.png');
// Enter credentials for 2FA-enabled user and submit
await client.popup.fill('input#username', twoFactorUser.username);
@@ -72,10 +72,10 @@ test.describe.serial('10. Two-Factor Authentication State', () => {
const twoFactorVisible = await isTwoFactorFormVisible(client);
expect(twoFactorVisible).toBe(true);
- await client.screenshot('10.1-2fa-form-visible.png');
+ await client.screenshot('12.1-2fa-form-visible.png');
});
- test('10.2 should persist 2FA state across popup close/reopen', async () => {
+ test('12.2 should persist 2FA state across popup close/reopen', async () => {
// Reopen the popup (simulates closing and reopening)
await reopenPopup(client);
@@ -98,10 +98,10 @@ test.describe.serial('10. Two-Factor Authentication State', () => {
const cancelButton = client.popup.locator('button:has-text("Cancel")');
await expect(cancelButton).toBeVisible();
- await client.screenshot('10.2-2fa-persisted.png');
+ await client.screenshot('12.2-2fa-persisted.png');
});
- test('10.3 should clear state when Cancel button is clicked', async () => {
+ test('12.3 should clear state when Cancel button is clicked', async () => {
// Ensure we're on the 2FA form
const twoFactorVisible = await isTwoFactorFormVisible(client);
expect(twoFactorVisible).toBe(true);
@@ -116,7 +116,7 @@ test.describe.serial('10. Two-Factor Authentication State', () => {
const loginVisible = await isLoginFormVisible(client);
expect(loginVisible).toBe(true);
- await client.screenshot('10.3-after-cancel.png');
+ await client.screenshot('12.3-after-cancel.png');
// Reopen popup and verify state was cleared
await reopenPopup(client);
@@ -125,10 +125,10 @@ test.describe.serial('10. Two-Factor Authentication State', () => {
const stillOnLogin = await isLoginFormVisible(client);
expect(stillOnLogin).toBe(true);
- await client.screenshot('10.3-state-cleared.png');
+ await client.screenshot('12.3-state-cleared.png');
});
- test('10.4 should complete login with valid 2FA code', async () => {
+ test('12.4 should complete login with valid 2FA code', async () => {
// Enter credentials again
await client.popup.fill('input#username', twoFactorUser.username);
await client.popup.fill('input#password', twoFactorUser.password);
@@ -143,7 +143,7 @@ test.describe.serial('10. Two-Factor Authentication State', () => {
// Enter the 2FA code
await client.popup.fill('input#twoFactorCode', totpCode);
- await client.screenshot('10.4-2fa-code-entered.png');
+ await client.screenshot('12.4-2fa-code-entered.png');
// Submit the 2FA code
await client.popup.click('button:has-text("Verify")');
@@ -151,6 +151,6 @@ test.describe.serial('10. Two-Factor Authentication State', () => {
// Wait for successful login (vault should be visible)
await client.popup.getByRole('button', { name: 'Vault' }).waitFor({ state: 'visible', timeout: 15000 });
- await client.screenshot('10.4-login-successful.png');
+ await client.screenshot('12.4-login-successful.png');
});
});
diff --git a/apps/browser-extension/tests/e2e/14-change-password.spec.ts b/apps/browser-extension/tests/e2e/13-change-password.spec.ts
similarity index 76%
rename from apps/browser-extension/tests/e2e/14-change-password.spec.ts
rename to apps/browser-extension/tests/e2e/13-change-password.spec.ts
index d6aa7f749..3b68ca559 100644
--- a/apps/browser-extension/tests/e2e/14-change-password.spec.ts
+++ b/apps/browser-extension/tests/e2e/13-change-password.spec.ts
@@ -1,5 +1,5 @@
/**
- * Category 14: Master Password Change (Requires API)
+ * Category 13: Master Password Change (Requires API)
*
* These tests verify the v2 password change flow: an Account Key rewrap that keeps the current
* session unlocked and does not re-encrypt or push any vault data.
@@ -7,7 +7,7 @@
*/
import { test, expect, TestClient } from '../fixtures';
-test.describe.serial('14. Master Password Change', () => {
+test.describe.serial('13. Master Password Change', () => {
let client: TestClient;
let currentPassword: string;
const newPassword = `NewPassword${Date.now()}!x`;
@@ -16,7 +16,7 @@ test.describe.serial('14. Master Password Change', () => {
await client?.cleanup();
});
- test('14.1 should login and open the change password screen', async ({ testUser, apiUrl }) => {
+ test('13.1 should login and open the change password screen', async ({ testUser, apiUrl }) => {
currentPassword = testUser.password;
client = await TestClient.create();
await client.login(apiUrl, testUser.username, testUser.password);
@@ -25,10 +25,10 @@ test.describe.serial('14. Master Password Change', () => {
await client.popup.locator('#security-settings-button').click();
await client.popup.locator('#change-password-button').click();
await expect(client.popup.locator('#current-password')).toBeVisible();
- await client.screenshot('14.1-change-password-screen.png');
+ await client.screenshot('13.1-change-password-screen.png');
});
- test('14.2 should reject a wrong current password locally', async () => {
+ test('13.2 should reject a wrong current password locally', async () => {
await client.popup.fill('#current-password', 'wrong-current-password');
await client.popup.fill('#new-password', newPassword);
await client.popup.fill('#confirm-password', newPassword);
@@ -40,10 +40,10 @@ test.describe.serial('14. Master Password Change', () => {
// Check wrong password error is visible
await expect(client.popup.locator('text=Incorrect password')).toBeVisible({ timeout: 15000 });
- await client.screenshot('14.2-wrong-current-password.png');
+ await client.screenshot('13.2-wrong-current-password.png');
});
- test('14.3 should change the password and keep the session unlocked', async () => {
+ test('13.3 should change the password and keep the session unlocked', async () => {
await client.popup.fill('#current-password', currentPassword);
await client.popup.fill('#new-password', newPassword);
await client.popup.fill('#confirm-password', newPassword);
@@ -52,13 +52,13 @@ test.describe.serial('14. Master Password Change', () => {
await expect(client.popup.locator('text=changed successfully')).toBeVisible({ timeout: 30000 });
await client.goToVault().then((c) => c.waitForVaultReady());
- await client.screenshot('14.3-password-changed.png');
+ await client.screenshot('13.3-password-changed.png');
});
- test('14.4 should unlock with the new password after locking', async () => {
+ test('13.4 should unlock with the new password after locking', async () => {
await client.lockVault();
await client.unlockVault(newPassword);
await client.goToVault().then((c) => c.waitForVaultReady());
- await client.screenshot('14.4-unlocked-with-new-password.png');
+ await client.screenshot('13.4-unlocked-with-new-password.png');
});
});
diff --git a/apps/browser-extension/tests/e2e/04-create-credential.spec.ts b/apps/browser-extension/tests/e2e/20-create-credential.spec.ts
similarity index 63%
rename from apps/browser-extension/tests/e2e/04-create-credential.spec.ts
rename to apps/browser-extension/tests/e2e/20-create-credential.spec.ts
index c00e099dc..9e66c16c3 100644
--- a/apps/browser-extension/tests/e2e/04-create-credential.spec.ts
+++ b/apps/browser-extension/tests/e2e/20-create-credential.spec.ts
@@ -1,12 +1,12 @@
/**
- * Category 4: Create Credential (Requires API + Authentication)
+ * Category 20: Create Credential (Requires API + Authentication)
*
* These tests verify credential creation functionality after login.
* They require an API server to be running at localhost:5100.
*/
import { test, expect, TestClient } from '../fixtures';
-test.describe.serial('4. Create Credential', () => {
+test.describe.serial('20. Create Credential', () => {
let client: TestClient;
const testCredentialName = `Test Login ${Date.now()}`;
@@ -14,7 +14,7 @@ test.describe.serial('4. Create Credential', () => {
await client?.cleanup();
});
- test('4.1 should login and show vault content', async ({ testUser, apiUrl }) => {
+ test('20.1 should login and show vault content', async ({ testUser, apiUrl }) => {
client = await TestClient.create();
await client.login(apiUrl, testUser.username, testUser.password);
@@ -22,21 +22,21 @@ test.describe.serial('4. Create Credential', () => {
expect(rootContent).toBeTruthy();
expect(rootContent!.length).toBeGreaterThan(0);
- await client.screenshot('4.1-vault-content.png');
+ await client.screenshot('20.1-vault-content.png');
});
- test('4.2 should create a new credential', async () => {
+ test('20.2 should create a new credential', async () => {
await client
.goToVault()
.then((c) => c.createCredential(testCredentialName, '[email protected]', 'TestPassword123!'))
- .then((c) => c.screenshot('4.2-credential-saved.png'));
+ .then((c) => c.screenshot('20.2-credential-saved.png'));
});
- test('4.3 should show the created credential in the vault list', async () => {
+ test('20.3 should show the created credential in the vault list', async () => {
await client
.goToVault()
.then((c) => c.waitForVaultReady())
.then((c) => c.verifyCredentialExists(testCredentialName))
- .then((c) => c.screenshot('4.3-credential-in-list.png'));
+ .then((c) => c.screenshot('20.3-credential-in-list.png'));
});
});
diff --git a/apps/browser-extension/tests/e2e/16-item-type-switch.spec.ts b/apps/browser-extension/tests/e2e/21-item-type-switch.spec.ts
similarity index 91%
rename from apps/browser-extension/tests/e2e/16-item-type-switch.spec.ts
rename to apps/browser-extension/tests/e2e/21-item-type-switch.spec.ts
index 2f9982367..4bd2fe0ba 100644
--- a/apps/browser-extension/tests/e2e/16-item-type-switch.spec.ts
+++ b/apps/browser-extension/tests/e2e/21-item-type-switch.spec.ts
@@ -1,12 +1,12 @@
/**
- * Category 16: Item Type Switch (Requires API + Authentication)
+ * Category 21: Item Type Switch (Requires API + Authentication)
*
* Switching the type of a new item hides the fields the new type does not have. Switching back,
* also via other types, must bring their values back.
*/
import { test, expect, TestClient, FieldSelectors, ButtonSelectors, waitForCredentialSaved } from '../fixtures';
-test.describe.serial('16. Item Type Switch', () => {
+test.describe.serial('21. Item Type Switch', () => {
let client: TestClient;
const itemName = `Type Switch ${Date.now()}`;
@@ -14,12 +14,12 @@ test.describe.serial('16. Item Type Switch', () => {
await client?.cleanup();
});
- test('16.1 should login', async ({ testUser, apiUrl }) => {
+ test('21.1 should login', async ({ testUser, apiUrl }) => {
client = await TestClient.create();
await client.login(apiUrl, testUser.username, testUser.password);
});
- test('16.2 should restore fields after switching the item type back', async () => {
+ test('21.2 should restore fields after switching the item type back', async () => {
const { popup } = client;
await test.step('create an alias and fill in the alias fields', async () => {
diff --git a/apps/browser-extension/tests/e2e/12-form-draft-persistence.spec.ts b/apps/browser-extension/tests/e2e/22-form-draft-persistence.spec.ts
similarity index 94%
rename from apps/browser-extension/tests/e2e/12-form-draft-persistence.spec.ts
rename to apps/browser-extension/tests/e2e/22-form-draft-persistence.spec.ts
index 7aaa6e538..1c89fd195 100644
--- a/apps/browser-extension/tests/e2e/12-form-draft-persistence.spec.ts
+++ b/apps/browser-extension/tests/e2e/22-form-draft-persistence.spec.ts
@@ -1,5 +1,5 @@
/**
- * Category 12: Item Form Draft Persistence (Requires API + Authentication)
+ * Category 22: Item Form Draft Persistence (Requires API + Authentication)
*
* When the user is creating/editing a credential and the popup closes (e.g. they
* focus the main browser window to copy something), their in-progress draft is
@@ -68,14 +68,14 @@ async function waitForPersist(client: TestClient): Promise<void> {
await client.popup.waitForTimeout(500);
}
-test.describe.serial('12. Item Form Draft Persistence', () => {
+test.describe.serial('22. Item Form Draft Persistence', () => {
let client: TestClient;
test.afterAll(async () => {
await client?.cleanup();
});
- test('12.1 create: notes draft is restored after popup reopen', async ({ testUser, apiUrl }) => {
+ test('22.1 create: notes draft is restored after popup reopen', async ({ testUser, apiUrl }) => {
client = await TestClient.create();
await client.login(apiUrl, testUser.username, testUser.password);
@@ -93,7 +93,7 @@ test.describe.serial('12. Item Form Draft Persistence', () => {
await expect(client.popup.locator(FieldSelectors.LOGIN_NOTES)).toHaveValue(NOTES_DRAFT);
});
- test('12.2 create: in-progress 2FA add form is restored after popup reopen', async () => {
+ test('22.2 create: in-progress 2FA add form is restored after popup reopen', async () => {
await client.goToVault();
await client.openAddCredentialForm();
await client.popup.fill(FieldSelectors.ITEM_NAME, 'Create 2FA Draft');
@@ -109,7 +109,7 @@ test.describe.serial('12. Item Form Draft Persistence', () => {
await expect(client.popup.locator(TOTP_SECRET_INPUT)).toHaveValue(TOTP_SECRET_DRAFT);
});
- test('12.3 edit: notes draft added to an existing item is restored after popup reopen', async () => {
+ test('22.3 edit: notes draft added to an existing item is restored after popup reopen', async () => {
// Start from a saved credential that has no notes.
await client.goToVault();
await client.createCredential('Edit Notes Target', 'edit-notes-user', 'EditPass123!');
@@ -126,7 +126,7 @@ test.describe.serial('12. Item Form Draft Persistence', () => {
await expect(client.popup.locator(FieldSelectors.LOGIN_NOTES)).toHaveValue(NOTES_DRAFT);
});
- test('12.4 edit: in-progress 2FA add form added to an existing item is restored after popup reopen', async () => {
+ test('22.4 edit: in-progress 2FA add form added to an existing item is restored after popup reopen', async () => {
await client.goToVault();
await client.createCredential('Edit 2FA Target', 'edit-2fa-user', 'EditPass123!');
diff --git a/apps/browser-extension/tests/e2e/05-vault-merge.spec.ts b/apps/browser-extension/tests/e2e/30-vault-merge.spec.ts
similarity index 78%
rename from apps/browser-extension/tests/e2e/05-vault-merge.spec.ts
rename to apps/browser-extension/tests/e2e/30-vault-merge.spec.ts
index 90af1f471..55f4ad388 100644
--- a/apps/browser-extension/tests/e2e/05-vault-merge.spec.ts
+++ b/apps/browser-extension/tests/e2e/30-vault-merge.spec.ts
@@ -1,5 +1,5 @@
/**
- * Category 5: Vault Merge (Requires API + Multi-Client Scenario)
+ * Category 30: Vault Merge (Requires API + Multi-Client Scenario)
*
* These tests verify the vault merge logic when two clients make concurrent changes.
*
@@ -13,7 +13,7 @@
*/
import { test, expect, TestClient, FieldSelectors, ButtonSelectors } from '../fixtures';
-test.describe.serial('5. Vault Merge', () => {
+test.describe.serial('30. Vault Merge', () => {
let clientA: TestClient;
let clientB: TestClient;
@@ -24,7 +24,7 @@ test.describe.serial('5. Vault Merge', () => {
await TestClient.cleanupAll(clientA, clientB);
});
- test('5.1 should setup two clients and navigate both to add credential form', async ({ testUser, apiUrl }) => {
+ test('30.1 should setup two clients and navigate both to add credential form', async ({ testUser, apiUrl }) => {
clientA = await TestClient.create();
await clientA.login(apiUrl, testUser.username, testUser.password);
@@ -36,11 +36,11 @@ test.describe.serial('5. Vault Merge', () => {
await clientA.goToVault().then((c) => c.openAddCredentialForm());
await clientB.goToVault().then((c) => c.openAddCredentialForm());
- await clientA.screenshot('5.1-client-a-add-form.png');
- await clientB.screenshot('5.1-client-b-add-form.png');
+ await clientA.screenshot('30.1-client-a-add-form.png');
+ await clientB.screenshot('30.1-client-b-add-form.png');
});
- test('5.2 Client A should create a credential and sync', async () => {
+ test('30.2 Client A should create a credential and sync', async () => {
// Client A fills and saves the credential (both clients have revision 1 at this point)
// All fields are now visible on the same page (no "Next" step)
await expect(clientA.popup.locator(FieldSelectors.LOGIN_USERNAME)).toBeVisible({ timeout: 10000 });
@@ -51,14 +51,14 @@ test.describe.serial('5. Vault Merge', () => {
await clientA
.verifyCredentialExists(credentialNameA)
- .then((c) => c.screenshot('5.2-client-a-credential-saved.png'))
+ .then((c) => c.screenshot('30.2-client-a-credential-saved.png'))
.then((c) => c.goToVault())
.then((c) => c.verifyCredentialExists(credentialNameA))
- .then((c) => c.screenshot('5.2-client-a-vault.png'))
+ .then((c) => c.screenshot('30.2-client-a-vault.png'))
.then((c) => c.waitForServerSync());
});
- test('5.3 Client B should create a credential (triggers merge with Client A changes)', async () => {
+ test('30.3 Client B should create a credential (triggers merge with Client A changes)', async () => {
// Client B still has stale data (revision 1, empty vault)
// This should trigger a merge because the server has revision 2 from Client A
// All fields are now visible on the same page (no "Next" step)
@@ -70,15 +70,15 @@ test.describe.serial('5. Vault Merge', () => {
await clientB
.verifyCredentialExists(credentialNameB)
- .then((c) => c.screenshot('5.3-client-b-after-save.png'));
+ .then((c) => c.screenshot('30.3-client-b-after-save.png'));
});
- test('5.4 Client B vault should contain both credentials after merge', async () => {
+ test('30.4 Client B vault should contain both credentials after merge', async () => {
// Trigger sync to ensure background merge has completed and database is reloaded
await clientB
.triggerSync()
.then((c) => c.goToVault())
- .then((c) => c.screenshot('5.4-client-b-vault-state.png'))
+ .then((c) => c.screenshot('30.4-client-b-vault-state.png'))
.then((c) => c.verifyCredentialExists(credentialNameA));
const clientBCredential = clientB.popup.locator(`text=${credentialNameB}`);
@@ -91,11 +91,11 @@ test.describe.serial('5. Vault Merge', () => {
}
});
- test('5.5 Client A should see credentials after syncing', async () => {
+ test('30.5 Client A should see credentials after syncing', async () => {
await clientA
.triggerSync()
.then((c) => c.verifyCredentialExists(credentialNameA))
- .then((c) => c.screenshot('5.5-client-a-vault-state.png'));
+ .then((c) => c.screenshot('30.5-client-a-vault-state.png'));
await clientA.verifyVaultItemCount(2);
});
diff --git a/apps/browser-extension/tests/e2e/06-field-level-merge.spec.ts b/apps/browser-extension/tests/e2e/31-field-level-merge.spec.ts
similarity index 78%
rename from apps/browser-extension/tests/e2e/06-field-level-merge.spec.ts
rename to apps/browser-extension/tests/e2e/31-field-level-merge.spec.ts
index 0d52d52c5..97a4d102e 100644
--- a/apps/browser-extension/tests/e2e/06-field-level-merge.spec.ts
+++ b/apps/browser-extension/tests/e2e/31-field-level-merge.spec.ts
@@ -1,5 +1,5 @@
/**
- * Category 6: Field-Level Merge (Requires API + Multi-Client Scenario)
+ * Category 31: Field-Level Merge (Requires API + Multi-Client Scenario)
*
* These tests verify that when the same credential is modified on two clients
* simultaneously, the merge happens at the field level:
@@ -17,7 +17,7 @@
*/
import { test, expect, TestClient, FieldSelectors } from '../fixtures';
-test.describe.serial('6. Field-Level Merge', () => {
+test.describe.serial('31. Field-Level Merge', () => {
let clientA: TestClient;
let clientB: TestClient;
@@ -34,7 +34,7 @@ test.describe.serial('6. Field-Level Merge', () => {
await TestClient.cleanupAll(clientA, clientB);
});
- test('6.1 Setup: Both clients login and Client A creates a credential', async ({ testUser, apiUrl }) => {
+ test('31.1 Setup: Both clients login and Client A creates a credential', async ({ testUser, apiUrl }) => {
clientA = await TestClient.create();
await clientA.login(apiUrl, testUser.username, testUser.password);
@@ -44,14 +44,14 @@ test.describe.serial('6. Field-Level Merge', () => {
await clientA
.goToVault()
.then((c) => c.createCredential(credentialName, originalUsername, originalPassword))
- .then((c) => c.screenshot('6.1-client-a-credential-created.png'))
+ .then((c) => c.screenshot('31.1-client-a-credential-created.png'))
.then((c) => c.waitForServerSync());
});
- test('6.2 Both clients sync and verify credential exists', async () => {
+ test('31.2 Both clients sync and verify credential exists', async () => {
await clientA
.goToVault()
- .then((c) => c.screenshot('6.2-client-a-vault.png'))
+ .then((c) => c.screenshot('31.2-client-a-vault.png'))
.then((c) => c.verifyCredentialExists(credentialName));
await clientB
@@ -59,38 +59,38 @@ test.describe.serial('6. Field-Level Merge', () => {
.then((c) => c.verifyCredentialExists(credentialName));
});
- test('6.3 Client A edits credential (username and notes) and saves', async () => {
+ test('31.3 Client A edits credential (username and notes) and saves', async () => {
await clientA
.clickCredential(credentialName)
.then((c) => c.openEditForm())
.then((c) => c.fillUsername(clientAUsername))
.then((c) => c.fillNotes(clientANotes))
- .then((c) => c.screenshot('6.3-client-a-before-save.png'))
+ .then((c) => c.screenshot('31.3-client-a-before-save.png'))
.then((c) => c.saveCredential())
- .then((c) => c.screenshot('6.3-client-a-after-save.png'))
+ .then((c) => c.screenshot('31.3-client-a-after-save.png'))
// Ensure changes are synced to server before Client B edits
.then((c) => c.triggerSync());
});
- test('6.4 Client B edits same credential (password and notes) with stale data', async () => {
+ test('31.4 Client B edits same credential (password and notes) with stale data', async () => {
await clientB
.clickCredential(credentialName)
- .then((c) => c.screenshot('6.4-client-b-stale-details.png'))
+ .then((c) => c.screenshot('31.4-client-b-stale-details.png'))
.then((c) => c.openEditForm())
- .then((c) => c.screenshot('6.4-client-b-stale-form.png'))
+ .then((c) => c.screenshot('31.4-client-b-stale-form.png'))
.then((c) => c.fillPassword(clientBPassword))
.then((c) => c.fillNotes(clientBNotes))
- .then((c) => c.screenshot('6.4-client-b-before-save.png'))
+ .then((c) => c.screenshot('31.4-client-b-before-save.png'))
.then((c) => c.saveCredential())
- .then((c) => c.screenshot('6.4-client-b-after-save.png'));
+ .then((c) => c.screenshot('31.4-client-b-after-save.png'));
// Wait for the save operation to be persisted before moving to next test
await clientB.popup.waitForTimeout(1000);
});
- test('6.5 Client B verifies field-level merge result', async () => {
+ test('31.5 Client B verifies field-level merge result', async () => {
// Trigger sync to get the merged result from server
- // The save in 6.4 triggered background sync+merge on server
+ // The save in 31.4 triggered background sync+merge on server
await clientB.triggerSync();
// Navigate to vault to ensure we're in a stable state
@@ -100,7 +100,7 @@ test.describe.serial('6. Field-Level Merge', () => {
await clientB
.clickCredential(credentialName)
.then((c) => c.openEditForm())
- .then((c) => c.screenshot('6.5-client-b-merged-form.png'));
+ .then((c) => c.screenshot('31.5-client-b-merged-form.png'));
// Wait for merged values to appear (polling until sync completes)
await clientB
@@ -122,7 +122,7 @@ test.describe.serial('6. Field-Level Merge', () => {
await clientB.verifyCredentialExists(credentialName);
});
- test('6.6 Client A syncs and verifies merged credential', async () => {
+ test('31.6 Client A syncs and verifies merged credential', async () => {
// Trigger sync to get the merged result from server
await clientA.triggerSync();
@@ -133,7 +133,7 @@ test.describe.serial('6. Field-Level Merge', () => {
await clientA
.clickCredential(credentialName)
.then((c) => c.openEditForm())
- .then((c) => c.screenshot('6.6-client-a-synced-form.png'));
+ .then((c) => c.screenshot('31.6-client-a-synced-form.png'));
// Wait for merged values to appear (polling until sync completes)
await clientA
diff --git a/apps/browser-extension/tests/e2e/07-offline-sync.spec.ts b/apps/browser-extension/tests/e2e/32-offline-sync.spec.ts
similarity index 68%
rename from apps/browser-extension/tests/e2e/07-offline-sync.spec.ts
rename to apps/browser-extension/tests/e2e/32-offline-sync.spec.ts
index ede34840e..9602a51a9 100644
--- a/apps/browser-extension/tests/e2e/07-offline-sync.spec.ts
+++ b/apps/browser-extension/tests/e2e/32-offline-sync.spec.ts
@@ -1,5 +1,5 @@
/**
- * Category 7: Offline Sync (Requires API + Multi-Client Scenario)
+ * Category 32: Offline Sync (Requires API + Multi-Client Scenario)
*
* These tests verify offline mode functionality and subsequent sync behavior:
*
@@ -16,7 +16,7 @@
*/
import { test, expect, TestClient, FieldSelectors, ButtonSelectors } from '../fixtures';
-test.describe.serial('7. Offline Sync', () => {
+test.describe.serial('32. Offline Sync', () => {
let clientA: TestClient;
let clientB: TestClient;
let originalApiUrl: string;
@@ -29,7 +29,7 @@ test.describe.serial('7. Offline Sync', () => {
await TestClient.cleanupAll(clientA, clientB);
});
- test('7.1 Setup: Both clients login to the same account', async ({ testUser, apiUrl }) => {
+ test('32.1 Setup: Both clients login to the same account', async ({ testUser, apiUrl }) => {
sharedTestUser = { username: testUser.username, password: testUser.password };
originalApiUrl = apiUrl;
@@ -39,28 +39,28 @@ test.describe.serial('7. Offline Sync', () => {
clientB = await TestClient.create();
await clientB.login(apiUrl, testUser.username, testUser.password);
- await clientA.screenshot('7.1-client-a-logged-in.png');
- await clientB.screenshot('7.1-client-b-logged-in.png');
+ await clientA.screenshot('32.1-client-a-logged-in.png');
+ await clientB.screenshot('32.1-client-b-logged-in.png');
});
- test('7.2 Client A creates a credential while online', async () => {
+ test('32.2 Client A creates a credential while online', async () => {
await clientA
.goToVault()
.then((c) => c.createCredential(credentialNameA, '[email protected]', 'ClientAPassword123!'))
.then((c) => c.goToVault())
.then((c) => c.verifyCredentialExists(credentialNameA))
- .then((c) => c.screenshot('7.2-client-a-credential-created.png'));
+ .then((c) => c.screenshot('32.2-client-a-credential-created.png'));
});
- test('7.3 Client B goes offline', async () => {
+ test('32.3 Client B goes offline', async () => {
await clientB
.enableOfflineMode()
.then((c) => c.triggerSync())
.then((c) => c.waitForOffline())
- .then((c) => c.screenshot('7.3-client-b-offline-mode.png'));
+ .then((c) => c.screenshot('32.3-client-b-offline-mode.png'));
});
- test('7.4 Client B creates a credential while offline', async () => {
+ test('32.4 Client B creates a credential while offline', async () => {
await clientB.goToVault();
await clientB.popup.locator(ButtonSelectors.ADD_NEW_ITEM).click();
await clientB.popup.locator(ButtonSelectors.ADD_ITEM_TYPE_LOGIN).click();
@@ -73,49 +73,49 @@ test.describe.serial('7. Offline Sync', () => {
await clientB
.verifyCredentialExists(credentialNameB)
- .then((c) => c.screenshot('7.4-client-b-offline-credential-saved.png'));
+ .then((c) => c.screenshot('32.4-client-b-offline-credential-saved.png'));
await clientB
.goToVault()
.then((c) => c.verifyCredentialExists(credentialNameB))
- .then((c) => c.screenshot('7.4-client-b-offline-credential-in-list.png'));
+ .then((c) => c.screenshot('32.4-client-b-offline-credential-in-list.png'));
});
- test('7.5 Client B locks vault while offline', async () => {
+ test('32.5 Client B locks vault while offline', async () => {
await clientB
.lockVault()
- .then((c) => c.screenshot('7.5-client-b-vault-locked.png'));
+ .then((c) => c.screenshot('32.5-client-b-vault-locked.png'));
});
- test('7.6 Client B unlocks vault while still offline', async () => {
+ test('32.6 Client B unlocks vault while still offline', async () => {
await clientB
.unlockVault(sharedTestUser.password)
- .then((c) => c.screenshot('7.6-client-b-after-unlock.png'))
+ .then((c) => c.screenshot('32.6-client-b-after-unlock.png'))
.then((c) => c.goToVault())
.then((c) => c.verifyCredentialExists(credentialNameB))
- .then((c) => c.screenshot('7.6-client-b-offline-vault-unlocked.png'));
+ .then((c) => c.screenshot('32.6-client-b-offline-vault-unlocked.png'));
});
- test('7.7 Client B goes back online and triggers sync', async () => {
+ test('32.7 Client B goes back online and triggers sync', async () => {
await clientB
.disableOfflineMode(originalApiUrl)
.then((c) => c.triggerSync())
- .then((c) => c.screenshot('7.7-client-b-back-online.png'))
+ .then((c) => c.screenshot('32.7-client-b-back-online.png'))
.then((c) => c.goToVault())
.then((c) => c.verifyCredentialExists(credentialNameB))
.then((c) => c.verifyCredentialExists(credentialNameA))
- .then((c) => c.screenshot('7.7-client-b-vault-after-sync.png'))
+ .then((c) => c.screenshot('32.7-client-b-vault-after-sync.png'))
.then((c) => c.verifyVaultItemCount(2));
});
- test('7.8 Client A syncs and verifies both credentials are present', async () => {
+ test('32.8 Client A syncs and verifies both credentials are present', async () => {
await clientA
.triggerSync()
.then((c) => c.goToVault())
.then((c) => c.verifyCredentialExists(credentialNameA))
.then((c) => c.verifyCredentialExists(credentialNameB))
- .then((c) => c.screenshot('7.8-client-a-vault-after-sync.png'))
+ .then((c) => c.screenshot('32.8-client-a-vault-after-sync.png'))
.then((c) => c.verifyVaultItemCount(2))
- .then((c) => c.screenshot('7.8-client-a-both-credentials.png'));
+ .then((c) => c.screenshot('32.8-client-a-both-credentials.png'));
});
});
diff --git a/apps/browser-extension/tests/e2e/13-forward-compat-overflow.spec.ts b/apps/browser-extension/tests/e2e/33-forward-compat-overflow.spec.ts
similarity index 91%
rename from apps/browser-extension/tests/e2e/13-forward-compat-overflow.spec.ts
rename to apps/browser-extension/tests/e2e/33-forward-compat-overflow.spec.ts
index e935bc355..f8df46397 100644
--- a/apps/browser-extension/tests/e2e/13-forward-compat-overflow.spec.ts
+++ b/apps/browser-extension/tests/e2e/33-forward-compat-overflow.spec.ts
@@ -1,5 +1,5 @@
/**
- * Category 13: Forward-compat overflow: no data loss (Requires API)
+ * Category 33: Forward-compat overflow: no data loss (Requires API)
*
* These tests enforce the manifest-v1 forward-compatibility guarantee: when a NEWER client writes
* vault data this client's schema doesn't know (a new row column, a whole new table), the current
@@ -19,9 +19,9 @@ import { test, expect, TestClient, FieldSelectors } from '../fixtures';
import { getVaultSnapshot, openManifest, pushManifest, pollUntil, requirePersonalManifest, resolveVaultEncryptionKey, type DecryptedManifest } from '../helpers/manifest-v2-api';
import type { TestUser } from '../helpers/test-api';
-test.describe.serial('13. Forward-compat overflow', () => {
+test.describe.serial('33. Forward-compat overflow', () => {
let client: TestClient;
- /** The account under test; the testUser fixture is per-test, so 13.1 pins it for later tests. */
+ /** The account under test; the testUser fixture is per-test, so 33.1 pins it for later tests. */
let user: TestUser;
let baseApiUrl: string;
@@ -38,7 +38,7 @@ test.describe.serial('13. Forward-compat overflow', () => {
await client?.cleanup();
});
- test('13.1 extension client should create a credential and sync to manifest-v1', async ({ testUser, apiUrl }) => {
+ test('33.1 extension client should create a credential and sync to manifest-v1', async ({ testUser, apiUrl }) => {
user = testUser;
baseApiUrl = apiUrl;
client = await TestClient.create();
@@ -49,7 +49,7 @@ test.describe.serial('13. Forward-compat overflow', () => {
.then((c) => c.createCredential(credentialName, '[email protected]', 'OverflowPass123!'))
.then((c) => c.verifyCredentialExists(credentialName))
.then((c) => c.triggerSync())
- .then((c) => c.screenshot('13.1-credential-created.png'));
+ .then((c) => c.screenshot('33.1-credential-created.png'));
// The save's push runs in the background; wait until the server actually holds a manifest-v1
// snapshot whose Items table contains the credential.
@@ -58,7 +58,7 @@ test.describe.serial('13. Forward-compat overflow', () => {
expect(item, 'credential row should be present in the server manifest').toBeTruthy();
});
- test('13.2 a newer client should inject an unknown column and table into the server manifest', async () => {
+ test('33.2 a newer client should inject an unknown column and table into the server manifest', async () => {
const token = user.token!.token;
const { manifest, personal, vaultKey } = await openLatestManifest(baseApiUrl, token, user.encryptionKey!);
@@ -74,15 +74,15 @@ test.describe.serial('13. Forward-compat overflow', () => {
expect(injectedRevision).toBeGreaterThan(personal.revision);
});
- test('13.3 extension should load the newer manifest without crashing', async () => {
+ test('33.3 extension should load the newer manifest without crashing', async () => {
await client
.triggerSync()
.then((c) => c.goToVault())
.then((c) => c.verifyCredentialExists(credentialName))
- .then((c) => c.screenshot('13.3-newer-manifest-loaded.png'));
+ .then((c) => c.screenshot('33.3-newer-manifest-loaded.png'));
});
- test('13.4 extension should edit the credential and push', async () => {
+ test('33.4 extension should edit the credential and push', async () => {
await client
.clickCredential(credentialName)
.then((c) => c.openEditForm())
@@ -90,10 +90,10 @@ test.describe.serial('13. Forward-compat overflow', () => {
.then((c) => c.saveCredential())
.then((c) => c.verifyCredentialExists(renamedCredentialName))
.then((c) => c.triggerSync())
- .then((c) => c.screenshot('13.4-credential-renamed.png'));
+ .then((c) => c.screenshot('33.4-credential-renamed.png'));
});
- test('13.5 the newer client data should survive the extension push (no data loss)', async () => {
+ test('33.5 the newer client data should survive the extension push (no data loss)', async () => {
// Wait for the extension's push to land: a revision beyond the injected one, carrying the rename.
const manifest = await pollUntil(async (): Promise<DecryptedManifest | undefined> => {
const { manifest: m, personal } = await openLatestManifest(baseApiUrl, user.token!.token, user.encryptionKey!);
diff --git a/apps/browser-extension/tests/e2e/08-credential-matcher.spec.ts b/apps/browser-extension/tests/e2e/60-credential-matcher.spec.ts
similarity index 89%
rename from apps/browser-extension/tests/e2e/08-credential-matcher.spec.ts
rename to apps/browser-extension/tests/e2e/60-credential-matcher.spec.ts
index 7800180ea..b97dc338d 100644
--- a/apps/browser-extension/tests/e2e/08-credential-matcher.spec.ts
+++ b/apps/browser-extension/tests/e2e/60-credential-matcher.spec.ts
@@ -1,5 +1,5 @@
/**
- * Category 8: Credential Matcher Integration (Requires API + Authentication)
+ * Category 60: Credential Matcher Integration (Requires API + Authentication)
*
* These tests verify the CredentialMatcher Rust WASM integration works correctly.
* The Rust core library is already unit tested natively; these tests verify the
@@ -71,14 +71,14 @@ async function setupTestPageRoute(page: Page, domain: string): Promise<void> {
});
}
-test.describe.serial('8. Credential Matcher Integration', () => {
+test.describe.serial('60. Credential Matcher Integration', () => {
let client: TestClient;
test.afterAll(async () => {
await client?.cleanup();
});
- test('8.1 should login and create test credentials with different URLs', async ({ testUser, apiUrl }) => {
+ test('60.1 should login and create test credentials with different URLs', async ({ testUser, apiUrl }) => {
client = await TestClient.create();
await client.login(apiUrl, testUser.username, testUser.password);
@@ -122,10 +122,10 @@ test.describe.serial('8. Credential Matcher Integration', () => {
await client.verifyCredentialExists('Example Subdomain Login');
await client.verifyCredentialExists('Another Site Login');
- await client.screenshot('8.1-credentials-created.png');
+ await client.screenshot('60.1-credentials-created.png');
});
- test('8.2 should show no matches for unrelated domain', async () => {
+ test('60.2 should show no matches for unrelated domain', async () => {
const testPage = await client.context.newPage();
// Setup route to serve our test login page for unrelated-domain.com
@@ -157,11 +157,11 @@ test.describe.serial('8. Credential Matcher Integration', () => {
expect(credentials).not.toContain('Another Site Login');
expect(credentials.length).toBe(0);
- await testPage.screenshot({ path: 'tests/screenshots/8.2-no-matches.png' });
+ await testPage.screenshot({ path: 'tests/screenshots/60.2-no-matches.png' });
await testPage.close();
});
- test('8.3 should show single matching credential on example.com', async () => {
+ test('60.3 should show single matching credential on example.com', async () => {
const testPage = await client.context.newPage();
// Setup route to serve our test login page for example.com
@@ -191,11 +191,11 @@ test.describe.serial('8. Credential Matcher Integration', () => {
// Should NOT match another-example.com credential (different domain)
expect(credentials).not.toContain('Another Site Login');
- await testPage.screenshot({ path: 'tests/screenshots/8.3-example-com-match.png' });
+ await testPage.screenshot({ path: 'tests/screenshots/60.3-example-com-match.png' });
await testPage.close();
});
- test('8.4 should show single matching credential on another-example.com', async () => {
+ test('60.4 should show single matching credential on another-example.com', async () => {
const testPage = await client.context.newPage();
// Setup route to serve our test login page for another-example.com
@@ -226,11 +226,11 @@ test.describe.serial('8. Credential Matcher Integration', () => {
expect(credentials).not.toContain('Example Site Login');
expect(credentials).not.toContain('Example Subdomain Login');
- await testPage.screenshot({ path: 'tests/screenshots/8.4-another-example-match.png' });
+ await testPage.screenshot({ path: 'tests/screenshots/60.4-another-example-match.png' });
await testPage.close();
});
- test('8.5 should show multiple matching credentials for subdomain', async () => {
+ test('60.5 should show multiple matching credentials for subdomain', async () => {
const testPage = await client.context.newPage();
// Setup route to serve our test login page for test.example.com
@@ -262,7 +262,7 @@ test.describe.serial('8. Credential Matcher Integration', () => {
// Should NOT match another-example.com credential
expect(credentials).not.toContain('Another Site Login');
- await testPage.screenshot({ path: 'tests/screenshots/8.5-subdomain-match.png' });
+ await testPage.screenshot({ path: 'tests/screenshots/60.5-subdomain-match.png' });
await testPage.close();
});
});
diff --git a/apps/browser-extension/tests/e2e/09-save-login-prompt.spec.ts b/apps/browser-extension/tests/e2e/61-save-login-prompt.spec.ts
similarity index 90%
rename from apps/browser-extension/tests/e2e/09-save-login-prompt.spec.ts
rename to apps/browser-extension/tests/e2e/61-save-login-prompt.spec.ts
index f45a3d115..b6f2230d5 100644
--- a/apps/browser-extension/tests/e2e/09-save-login-prompt.spec.ts
+++ b/apps/browser-extension/tests/e2e/61-save-login-prompt.spec.ts
@@ -1,5 +1,5 @@
/**
- * Category 9: Save Login Prompt (Requires API + Authentication)
+ * Category 61: Save Login Prompt (Requires API + Authentication)
*
* These tests verify the save login prompt functionality that appears when
* users submit login forms on arbitrary websites.
@@ -229,14 +229,14 @@ async function getBlockedDomains(client: TestClient): Promise<string[]> {
});
}
-test.describe.serial('9. Save Login Prompt', () => {
+test.describe.serial('61. Save Login Prompt', () => {
let client: TestClient;
test.afterAll(async () => {
await client?.cleanup();
});
- test('9.1 should login, enable save feature, and verify prompt appears on form submit', async ({ testUser, apiUrl }) => {
+ test('61.1 should login, enable save feature, and verify prompt appears on form submit', async ({ testUser, apiUrl }) => {
client = await TestClient.create();
await client.login(apiUrl, testUser.username, testUser.password);
@@ -265,7 +265,7 @@ test.describe.serial('9. Save Login Prompt', () => {
const promptVisible = await isSavePromptVisible(testPage);
expect(promptVisible).toBe(true);
- await testPage.screenshot({ path: 'tests/screenshots/9.1-save-prompt-visible.png' });
+ await testPage.screenshot({ path: 'tests/screenshots/61.1-save-prompt-visible.png' });
// Dismiss the prompt for now (we'll test save functionality in next test)
await clickSavePromptButton(testPage, '.av-save-prompt__btn--dismiss');
@@ -273,7 +273,7 @@ test.describe.serial('9. Save Login Prompt', () => {
await testPage.close();
});
- test('9.2 should save credential to vault when clicking Save', async () => {
+ test('61.2 should save credential to vault when clicking Save', async () => {
// Create a test page on a new domain
const testPage = await client.context.newPage();
await setupTestPageRoute(testPage, 'save-credential-test.com');
@@ -292,13 +292,13 @@ test.describe.serial('9. Save Login Prompt', () => {
const promptVisibleBeforeSave = await isSavePromptVisible(testPage);
expect(promptVisibleBeforeSave).toBe(true);
- await testPage.screenshot({ path: 'tests/screenshots/9.2-prompt-visible.png' });
+ await testPage.screenshot({ path: 'tests/screenshots/61.2-prompt-visible.png' });
// Fill in a custom service name
const serviceName = 'Save Credential Test Site';
await fillServiceName(testPage, serviceName);
- await testPage.screenshot({ path: 'tests/screenshots/9.2-before-save.png' });
+ await testPage.screenshot({ path: 'tests/screenshots/61.2-before-save.png' });
// Click the Save button
await clickSavePromptButton(testPage, '.av-save-prompt__btn--save');
@@ -306,7 +306,7 @@ test.describe.serial('9. Save Login Prompt', () => {
// Wait for the credential to be saved and synced
await testPage.waitForTimeout(2000);
- await testPage.screenshot({ path: 'tests/screenshots/9.2-after-save.png' });
+ await testPage.screenshot({ path: 'tests/screenshots/61.2-after-save.png' });
// Trigger a sync to ensure the vault is up to date
await client.triggerSync();
@@ -316,12 +316,12 @@ test.describe.serial('9. Save Login Prompt', () => {
await client.verifyCredentialExists(serviceName);
- await client.screenshot('9.2-credential-saved-in-vault.png');
+ await client.screenshot('61.2-credential-saved-in-vault.png');
await testPage.close();
});
- test('9.3 should NOT save credential when clicking Dismiss', async () => {
+ test('61.3 should NOT save credential when clicking Dismiss', async () => {
// Get the current vault item count
await client.goToVault().then(c => c.waitForVaultReady());
const initialItemCount = await client.popup.locator('ul#items-list > li').count();
@@ -338,7 +338,7 @@ test.describe.serial('9. Save Login Prompt', () => {
// Wait for the save prompt to appear
await waitForSavePrompt(testPage);
- await testPage.screenshot({ path: 'tests/screenshots/9.3-prompt-before-dismiss.png' });
+ await testPage.screenshot({ path: 'tests/screenshots/61.3-prompt-before-dismiss.png' });
// Click the Dismiss button (X icon)
await clickSavePromptButton(testPage, '.av-save-prompt__btn--dismiss');
@@ -355,12 +355,12 @@ test.describe.serial('9. Save Login Prompt', () => {
const finalItemCount = await client.popup.locator('ul#items-list > li').count();
expect(finalItemCount).toBe(initialItemCount);
- await client.screenshot('9.3-vault-unchanged-after-dismiss.png');
+ await client.screenshot('61.3-vault-unchanged-after-dismiss.png');
await testPage.close();
});
- test('9.4 should block future prompts when clicking Never for this site', async () => {
+ test('61.4 should block future prompts when clicking Never for this site', async () => {
// Create a test page on a specific domain
const blockedDomain = 'never-save-domain.com';
const testPage = await client.context.newPage();
@@ -374,7 +374,7 @@ test.describe.serial('9. Save Login Prompt', () => {
// Wait for the save prompt to appear
await waitForSavePrompt(testPage);
- await testPage.screenshot({ path: 'tests/screenshots/9.4-prompt-before-never.png' });
+ await testPage.screenshot({ path: 'tests/screenshots/61.4-prompt-before-never.png' });
// Click the "Never for this site" button
await clickSavePromptButton(testPage, '.av-save-prompt__btn--never');
@@ -390,7 +390,7 @@ test.describe.serial('9. Save Login Prompt', () => {
const blockedDomains = await getBlockedDomains(client);
expect(blockedDomains).toContain(blockedDomain);
- await testPage.screenshot({ path: 'tests/screenshots/9.4-prompt-dismissed.png' });
+ await testPage.screenshot({ path: 'tests/screenshots/61.4-prompt-dismissed.png' });
// Now try submitting the form again on the same domain
// First, refresh the page to get a clean state
@@ -407,12 +407,12 @@ test.describe.serial('9. Save Login Prompt', () => {
const promptAppearedAgain = await isSavePromptVisible(testPage);
expect(promptAppearedAgain).toBe(false);
- await testPage.screenshot({ path: 'tests/screenshots/9.4-no-prompt-on-blocked-domain.png' });
+ await testPage.screenshot({ path: 'tests/screenshots/61.4-no-prompt-on-blocked-domain.png' });
await testPage.close();
});
- test('9.5 should show prompt on new domain even after blocking another', async () => {
+ test('61.5 should show prompt on new domain even after blocking another', async () => {
// Verify that blocking one domain doesn't affect other domains
const newDomain = 'new-unblocked-domain.com';
const testPage = await client.context.newPage();
@@ -430,7 +430,7 @@ test.describe.serial('9. Save Login Prompt', () => {
const promptVisible = await isSavePromptVisible(testPage);
expect(promptVisible).toBe(true);
- await testPage.screenshot({ path: 'tests/screenshots/9.5-prompt-on-unblocked-domain.png' });
+ await testPage.screenshot({ path: 'tests/screenshots/61.5-prompt-on-unblocked-domain.png' });
// Clean up - dismiss the prompt
await clickSavePromptButton(testPage, '.av-save-prompt__btn--dismiss');
diff --git a/apps/browser-extension/tests/e2e/11-cross-window-state-sync.spec.ts b/apps/browser-extension/tests/e2e/62-cross-window-state-sync.spec.ts
similarity index 87%
rename from apps/browser-extension/tests/e2e/11-cross-window-state-sync.spec.ts
rename to apps/browser-extension/tests/e2e/62-cross-window-state-sync.spec.ts
index 3867e9bd3..9052ac11b 100644
--- a/apps/browser-extension/tests/e2e/11-cross-window-state-sync.spec.ts
+++ b/apps/browser-extension/tests/e2e/62-cross-window-state-sync.spec.ts
@@ -1,5 +1,5 @@
/**
- * Category 11: Cross-Window State Sync (Requires API)
+ * Category 62: Cross-Window State Sync (Requires API)
*
* Lock, logout, unlock and login actions performed in one popup must propagate
* to any other open popup (e.g. the "Open in new window" popout).
@@ -14,14 +14,14 @@ import {
Timeouts,
} from '../fixtures';
-test.describe.serial('11. Cross-Window State Sync', () => {
+test.describe.serial('62. Cross-Window State Sync', () => {
let client: TestClient;
test.afterAll(async () => {
await client?.cleanup();
});
- test('11.1 lock in popup propagates to expanded popout', async ({ context, extensionId, apiUrl, testUser }) => {
+ test('62.1 lock in popup propagates to expanded popout', async ({ context, extensionId, apiUrl, testUser }) => {
client = await TestClient.fromContext(context, extensionId);
await client.login(apiUrl, testUser.username, testUser.password);
@@ -41,8 +41,8 @@ test.describe.serial('11. Cross-Window State Sync', () => {
await popout.close();
});
- test('11.2 logout in popup propagates to expanded popout', async ({ context, extensionId, testUser }) => {
- // Main popup is on /unlock from 11.1; bring it back to the vault.
+ test('62.2 logout in popup propagates to expanded popout', async ({ context, extensionId, testUser }) => {
+ // Main popup is on /unlock from 62.1; bring it back to the vault.
await client.popup.bringToFront();
await client.unlockVault(testUser.password);
@@ -62,8 +62,8 @@ test.describe.serial('11. Cross-Window State Sync', () => {
await popout.close();
});
- test('11.3 unlock in popup propagates to expanded popout', async ({ context, extensionId, apiUrl, testUser }) => {
- // After 11.2 the popup is on /login; sign back in and lock so both windows start on /unlock.
+ test('62.3 unlock in popup propagates to expanded popout', async ({ context, extensionId, apiUrl, testUser }) => {
+ // After 62.2 the popup is on /login; sign back in and lock so both windows start on /unlock.
await client.popup.bringToFront();
await client.login(apiUrl, testUser.username, testUser.password);
await client.lockVault();
@@ -85,7 +85,7 @@ test.describe.serial('11. Cross-Window State Sync', () => {
await popout.close();
});
- test('11.4 login in popup propagates to expanded popout', async ({ context, extensionId, apiUrl, testUser }) => {
+ test('62.4 login in popup propagates to expanded popout', async ({ context, extensionId, apiUrl, testUser }) => {
// Reach a clean logged-out state in the main popup.
await client.goToSettings();
await client.popup.locator('button#logout-button').click();
diff --git a/apps/browser-extension/tests/e2e/17-vault-errors.spec.ts b/apps/browser-extension/tests/e2e/80-vault-errors.spec.ts
similarity index 91%
rename from apps/browser-extension/tests/e2e/17-vault-errors.spec.ts
rename to apps/browser-extension/tests/e2e/80-vault-errors.spec.ts
index e047849c0..dc3e36c9d 100644
--- a/apps/browser-extension/tests/e2e/17-vault-errors.spec.ts
+++ b/apps/browser-extension/tests/e2e/80-vault-errors.spec.ts
@@ -1,5 +1,5 @@
/**
- * Category 17: Vault errors (Requires API)
+ * Category 80: Vault errors (Requires API)
*
* Each test breaks the account's server vault on purpose, then checks the extension shows the real error with
* its code instead of a generic "server not available" message.
@@ -36,7 +36,7 @@ async function expectSyncFailedDialog(popup: Page): Promise<void> {
await expect(popup.getByText(SERVER_NOT_AVAILABLE_MESSAGE)).toHaveCount(0);
}
-test.describe('17. Vault errors', () => {
+test.describe('80. Vault errors', () => {
let client: TestClient | undefined;
test.afterEach(async () => {
@@ -44,7 +44,7 @@ test.describe('17. Vault errors', () => {
client = undefined;
});
- test('17.1 should report a server vault that does not decrypt on login', async ({ testUser, apiUrl }) => {
+ test('80.1 should report a server vault that does not decrypt on login', async ({ testUser, apiUrl }) => {
await writeUndecryptableManifest(apiUrl, testUser);
client = await TestClient.create();
@@ -55,7 +55,7 @@ test.describe('17. Vault errors', () => {
await expectVaultErrorReport(client.popup, 'E-503', 'AES-GCM decryption failed');
});
- test('17.2 should report a server vault that does not load into the local database on login', async ({ testUser, apiUrl }) => {
+ test('80.2 should report a server vault that does not load into the local database on login', async ({ testUser, apiUrl }) => {
// Decrypts and passes the codec, but the row misses required columns, so materializing it fails.
await writeManifestWithBrokenRow(apiUrl, testUser, 'Items', { Id: crypto.randomUUID(), Name: 'Broken row' });
@@ -67,7 +67,7 @@ test.describe('17. Vault errors', () => {
await expectVaultErrorReport(client.popup, 'E-508', 'NOT NULL constraint failed');
});
- test('17.3 should report a server vault that does not load during a sync after login', async ({ testUser, apiUrl }) => {
+ test('80.3 should report a server vault that does not load during a sync after login', async ({ testUser, apiUrl }) => {
client = await TestClient.create();
await client.login(apiUrl, testUser.username, testUser.password);
await client.goToVault();
@@ -79,7 +79,7 @@ test.describe('17. Vault errors', () => {
await client.pause();
});
- test('17.4 should report a server vault that does not load on unlock', async ({ testUser, apiUrl }) => {
+ test('80.4 should report a server vault that does not load on unlock', async ({ testUser, apiUrl }) => {
client = await TestClient.create();
await client.login(apiUrl, testUser.username, testUser.password);
await client.lockVault();
diff --git a/apps/browser-extension/tests/e2e/15-vault-upgrade.spec.ts b/apps/browser-extension/tests/e2e/90-vault-upgrade.spec.ts
similarity index 97%
rename from apps/browser-extension/tests/e2e/15-vault-upgrade.spec.ts
rename to apps/browser-extension/tests/e2e/90-vault-upgrade.spec.ts
index 8ad591b93..b9413e94e 100644
--- a/apps/browser-extension/tests/e2e/15-vault-upgrade.spec.ts
+++ b/apps/browser-extension/tests/e2e/90-vault-upgrade.spec.ts
@@ -1,5 +1,5 @@
/**
- * Category 15: Vault upgrades from older versions.
+ * Category 90: Vault upgrades from older versions.
*/
import { createHash } from 'node:crypto';
import { readFileSync } from 'node:fs';
@@ -177,7 +177,7 @@ async function expectLegacyVaultContent(client: TestClient, fixture: LegacyVault
});
}
-test.describe.serial('15. Vault upgrades', () => {
+test.describe.serial('90. Vault upgrades', () => {
const clients: TestClient[] = [];
let client: TestClient;
@@ -185,7 +185,7 @@ test.describe.serial('15. Vault upgrades', () => {
await Promise.all(clients.map(c => c.cleanup()));
});
- test('15.1 should upgrade a 0.1.0 vault to the current storage format', async ({ testUser, apiUrl }) => {
+ test('90.1 should upgrade a 0.1.0 vault to the current storage format', async ({ testUser, apiUrl }) => {
const fixture = readLegacyVaultFixture('0.1.0');
await restoreLegacyVault(apiUrl, testUser.username, fixture);
@@ -230,7 +230,7 @@ test.describe.serial('15. Vault upgrades', () => {
});
});
- test('15.2 should keep everything a 0.30.7 vault holds when upgrading it', async ({ testUser, apiUrl }) => {
+ test('90.2 should keep everything a 0.30.7 vault holds when upgrading it', async ({ testUser, apiUrl }) => {
test.slow();
const fixture = readLegacyVaultFixture('0.30.7');
await restoreLegacyVault(apiUrl, testUser.username, fixture);
diff --git a/apps/web/tests/e2e/01-registration.spec.ts b/apps/web/tests/e2e/10-registration.spec.ts
similarity index 88%
rename from apps/web/tests/e2e/01-registration.spec.ts
rename to apps/web/tests/e2e/10-registration.spec.ts
index c94579568..3b7281d2e 100644
--- a/apps/web/tests/e2e/01-registration.spec.ts
+++ b/apps/web/tests/e2e/10-registration.spec.ts
@@ -1,11 +1,11 @@
/**
- * Category 1: Full registration setup flow via web app UI (requires API)
+ * Category 10: Full registration setup flow via web app UI (requires API)
*/
import { test, expect } from '../fixtures';
import { createRegistrationInvite, TEST_DISABLE_PUBLIC_REGISTRATION_HEADER } from '../helpers/test-api';
-test.describe('1. Registration', () => {
- test('1.1 should create a new account through the setup wizard', async ({ app, credentials }) => {
+test.describe('10. Registration', () => {
+ test('10.1 should create a new account through the setup wizard', async ({ app, credentials }) => {
const { page } = app;
const continueButton = page.getByRole('button', { name: 'Continue' });
@@ -40,10 +40,10 @@ test.describe('1. Registration', () => {
});
});
-test.describe('1. Registration with public registration disabled', () => {
+test.describe('10. Registration with public registration disabled', () => {
test.use({ publicRegistrationEnabled: false });
- test('1.2 should refuse registration without an invite link', async ({ app, apiUrl, credentials }) => {
+ test('10.2 should refuse registration without an invite link', async ({ app, apiUrl, credentials }) => {
const { page } = app;
await test.step('the start page offers no way to create a vault', async () => {
@@ -74,7 +74,7 @@ test.describe('1. Registration with public registration disabled', () => {
});
});
- test('1.3 should create an account through an invite link and use up the invite', async ({ app, apiUrl, credentials }) => {
+ test('10.3 should create an account through an invite link and use up the invite', async ({ app, apiUrl, credentials }) => {
const { page } = app;
const continueButton = page.getByRole('button', { name: 'Continue' });
const inviteCode = await createRegistrationInvite(apiUrl);
@@ -107,7 +107,7 @@ test.describe('1. Registration with public registration disabled', () => {
});
});
- test('1.4 should reject an unknown invite link', async ({ app }) => {
+ test('10.4 should reject an unknown invite link', async ({ app }) => {
const { page } = app;
await page.goto('/user/setup?invite=AAAA-AAAA-AAAA-AAAA-AAAA');
diff --git a/apps/web/tests/e2e/02-authentication.spec.ts b/apps/web/tests/e2e/11-authentication.spec.ts
similarity index 80%
rename from apps/web/tests/e2e/02-authentication.spec.ts
rename to apps/web/tests/e2e/11-authentication.spec.ts
index 23e3c4d6c..3093b34aa 100644
--- a/apps/web/tests/e2e/02-authentication.spec.ts
+++ b/apps/web/tests/e2e/11-authentication.spec.ts
@@ -1,10 +1,10 @@
/**
- * Category 2: Authentication (requires API)
+ * Category 11: Authentication (requires API)
*/
import { test, expect } from '../fixtures';
-test.describe('2. Authentication', () => {
- test('2.1 should log in and log out', async ({ app, testUser }) => {
+test.describe('11. Authentication', () => {
+ test('11.1 should log in and log out', async ({ app, testUser }) => {
await test.step('log in', async () => {
await app.login(testUser.username, testUser.password);
await expect(app.page.getByText('No items yet')).toBeVisible();
@@ -20,7 +20,7 @@ test.describe('2. Authentication', () => {
});
});
- test('2.2 should reject invalid credentials', async ({ app, credentials }) => {
+ test('11.2 should reject invalid credentials', async ({ app, credentials }) => {
await app.page.goto('/user/login');
await app.page.locator('#email').fill(credentials.username);
await app.page.locator('#password').fill(credentials.password);
@@ -30,7 +30,7 @@ test.describe('2. Authentication', () => {
await expect(app.page).toHaveURL(/\/user\/login$/);
});
- test('2.3 should return to the open page after unlocking a reloaded vault', async ({ app, testUser }) => {
+ test('11.3 should return to the open page after unlocking a reloaded vault', async ({ app, testUser }) => {
const { page } = app;
await app.login(testUser.username, testUser.password);
await app.createItem('Return after unlock');
diff --git a/apps/web/tests/e2e/08-two-factor.spec.ts b/apps/web/tests/e2e/12-two-factor.spec.ts
similarity index 94%
rename from apps/web/tests/e2e/08-two-factor.spec.ts
rename to apps/web/tests/e2e/12-two-factor.spec.ts
index 9b21e0e99..e91b968c3 100644
--- a/apps/web/tests/e2e/08-two-factor.spec.ts
+++ b/apps/web/tests/e2e/12-two-factor.spec.ts
@@ -1,5 +1,5 @@
/**
- * Category 8: Two-factor authentication (requires API)
+ * Category 12: Two-factor authentication (requires API)
*/
import * as OTPAuth from 'otpauth';
@@ -86,8 +86,8 @@ function wrongCode(totp: OTPAuth.TOTP): string {
return String((Number(totp.generate()) + 500000) % 1000000).padStart(6, '0');
}
-test.describe('8. Two-factor authentication', () => {
- test('8.1 should enable 2FA, log in with an authenticator code and disable it again', async ({ app, testUser, apiUrl }) => {
+test.describe('12. Two-factor authentication', () => {
+ test('12.1 should enable 2FA, log in with an authenticator code and disable it again', async ({ app, testUser, apiUrl }) => {
const { page } = app;
await app.login(testUser.username, testUser.password);
const { totp } = await enableTwoFactor(app);
@@ -127,7 +127,7 @@ test.describe('8. Two-factor authentication', () => {
});
});
- test('8.2 should log in with a recovery code and disable 2FA with another one', async ({ app, testUser }) => {
+ test('12.2 should log in with a recovery code and disable 2FA with another one', async ({ app, testUser }) => {
const { page } = app;
await app.login(testUser.username, testUser.password);
const { recoveryCodes } = await enableTwoFactor(app);
diff --git a/apps/web/tests/e2e/03-items.spec.ts b/apps/web/tests/e2e/20-items.spec.ts
similarity index 91%
rename from apps/web/tests/e2e/03-items.spec.ts
rename to apps/web/tests/e2e/20-items.spec.ts
index 3e507d37c..08f90e0dc 100644
--- a/apps/web/tests/e2e/03-items.spec.ts
+++ b/apps/web/tests/e2e/20-items.spec.ts
@@ -1,14 +1,14 @@
/**
- * Category 3: Items (requires API)
+ * Category 20: Items (requires API)
*/
import { test, expect } from '../fixtures';
-test.describe('3. Items', () => {
+test.describe('20. Items', () => {
test.beforeEach(async ({ app, testUser }) => {
await app.login(testUser.username, testUser.password);
});
- test('3.1 should create an item', async ({ app }) => {
+ test('20.1 should create an item', async ({ app }) => {
await app.createItem('Test Service');
await test.step('the item shows in the vault list', async () => {
@@ -17,7 +17,7 @@ test.describe('3. Items', () => {
});
});
- test('3.2 should edit an item', async ({ app }) => {
+ test('20.2 should edit an item', async ({ app }) => {
const { page } = app;
await app.createItem('Item service before');
@@ -35,7 +35,7 @@ test.describe('3. Items', () => {
});
});
- test('3.3 should delete an item', async ({ app }) => {
+ test('20.3 should delete an item', async ({ app }) => {
const { page } = app;
await app.createItem('Item to delete');
@@ -51,7 +51,7 @@ test.describe('3. Items', () => {
});
});
- test('3.4 should restore fields after switching the item type back', async ({ app }) => {
+ test('20.4 should restore fields after switching the item type back', async ({ app }) => {
const { page } = app;
await app.createItem('Type switch service');
diff --git a/apps/web/tests/e2e/05-email.spec.ts b/apps/web/tests/e2e/40-email.spec.ts
similarity index 90%
rename from apps/web/tests/e2e/05-email.spec.ts
rename to apps/web/tests/e2e/40-email.spec.ts
index 275612f5c..417e6e28b 100644
--- a/apps/web/tests/e2e/05-email.spec.ts
+++ b/apps/web/tests/e2e/40-email.spec.ts
@@ -1,13 +1,13 @@
/**
- * Category 5: Email (requires API and SMTP service, e.g. `./scripts/dev.sh smtp`)
+ * Category 40: Email (requires API and SMTP service, e.g. `./scripts/dev.sh smtp`)
*/
import { test, expect } from '../fixtures';
import { requireSmtp, sendMail } from '../helpers/smtp';
-test.describe('5. Email', () => {
+test.describe('40. Email', () => {
test.beforeAll(requireSmtp);
- test('5.1 should receive and decrypt mail on an alias of a new account', async ({ app, testUser }) => {
+ test('40.1 should receive and decrypt mail on an alias of a new account', async ({ app, testUser }) => {
const { page } = app;
const id = Math.random().toString(36).substring(2, 10);
const address = `e2e_${id}@example.tld`;
diff --git a/apps/web/tests/e2e/06-settings.spec.ts b/apps/web/tests/e2e/50-settings.spec.ts
similarity index 90%
rename from apps/web/tests/e2e/06-settings.spec.ts
rename to apps/web/tests/e2e/50-settings.spec.ts
index ab679bd30..a16d77e4e 100644
--- a/apps/web/tests/e2e/06-settings.spec.ts
+++ b/apps/web/tests/e2e/50-settings.spec.ts
@@ -1,12 +1,12 @@
/**
- * Category 6: Settings (requires API)
+ * Category 50: Settings (requires API)
*/
import { test, expect } from '../fixtures';
import type { Locator } from '@playwright/test';
-test.describe('6. Settings', () => {
- test('6.1 should keep the app language in the vault', async ({ app, testUser }) => {
+test.describe('50. Settings', () => {
+ test('50.1 should keep the app language in the vault', async ({ app, testUser }) => {
const { page } = app;
/**
* The Emails link of the top menu, by its translated name.
diff --git a/apps/web/tests/e2e/04-vault-errors.spec.ts b/apps/web/tests/e2e/80-vault-errors.spec.ts
similarity index 89%
rename from apps/web/tests/e2e/04-vault-errors.spec.ts
rename to apps/web/tests/e2e/80-vault-errors.spec.ts
index f9e63a58c..a2799bcea 100644
--- a/apps/web/tests/e2e/04-vault-errors.spec.ts
+++ b/apps/web/tests/e2e/80-vault-errors.spec.ts
@@ -1,5 +1,5 @@
/**
- * Category 4: Vault errors (requires API)
+ * Category 80: Vault errors (requires API)
*
* Each test breaks the account's server vault on purpose, then checks the app correctly reports it to the user.
*/
@@ -50,8 +50,8 @@ async function expectClientUpdateRequest(page: Page): Promise<void> {
});
}
-test.describe('4. Vault errors', () => {
- test('4.1 should report a server vault that does not decrypt', async ({ app, apiUrl, testUser }) => {
+test.describe('80. Vault errors', () => {
+ test('80.1 should report a server vault that does not decrypt', async ({ app, apiUrl, testUser }) => {
await writeUndecryptableManifest(apiUrl, testUser);
await app.page.goto('/user/login');
@@ -65,7 +65,7 @@ test.describe('4. Vault errors', () => {
await expect(app.page.locator('#critical-error-report')).toContainText('AES-GCM decryption failed');
});
- test('4.2 should report a server vault that does not load into the local database', async ({ app, apiUrl, testUser }) => {
+ test('80.2 should report a server vault that does not load into the local database', async ({ app, apiUrl, testUser }) => {
// Decrypts and passes the codec, but the row misses required columns, so materializing it fails.
await writeManifestWithBrokenRow(apiUrl, testUser, 'Items', { Id: crypto.randomUUID(), Name: 'Broken row' });
@@ -80,7 +80,7 @@ test.describe('4. Vault errors', () => {
await expect(app.page.locator('#critical-error-report')).toContainText('NOT NULL constraint failed');
});
- test('4.3 should report a key chain the password does not fully open', async ({ app, apiUrl }) => {
+ test('80.3 should report a key chain the password does not fully open', async ({ app, apiUrl }) => {
const user = await createTestUserWithDamagedKeyChain(apiUrl);
await app.page.goto('/user/login');
@@ -99,7 +99,7 @@ test.describe('4. Vault errors', () => {
});
});
- test('4.4 should report a key chain the password does not fully open on unlock', async ({ app, testUser }) => {
+ test('80.4 should report a key chain the password does not fully open on unlock', async ({ app, testUser }) => {
await app.login(testUser.username, testUser.password);
await test.step('reloading locks the vault', async () => {
@@ -129,7 +129,7 @@ test.describe('4. Vault errors', () => {
await expectCriticalError(app.page, KEY_CHAIN_UNREADABLE_MESSAGE, 'E-207');
});
- test('4.5 should ask for an update when the server rejects the client version on login', async ({ app, apiUrl, testUser }) => {
+ test('80.5 should ask for an update when the server rejects the client version on login', async ({ app, apiUrl, testUser }) => {
await sendUnsupportedClientVersion(app.page, apiUrl);
await app.page.goto('/user/login');
@@ -141,7 +141,7 @@ test.describe('4. Vault errors', () => {
await expectClientUpdateRequest(app.page);
});
- test('4.6 should ask for an update when the server rejects the client version on unlock', async ({ app, apiUrl, testUser }) => {
+ test('80.6 should ask for an update when the server rejects the client version on unlock', async ({ app, apiUrl, testUser }) => {
await app.login(testUser.username, testUser.password);
await sendUnsupportedClientVersion(app.page, apiUrl);
diff --git a/apps/web/tests/e2e/07-vault-upgrade.spec.ts b/apps/web/tests/e2e/90-vault-upgrade.spec.ts
similarity index 96%
rename from apps/web/tests/e2e/07-vault-upgrade.spec.ts
rename to apps/web/tests/e2e/90-vault-upgrade.spec.ts
index 9731057bc..986ee5cf8 100644
--- a/apps/web/tests/e2e/07-vault-upgrade.spec.ts
+++ b/apps/web/tests/e2e/90-vault-upgrade.spec.ts
@@ -1,5 +1,5 @@
/**
- * Category 7: Vault upgrades from older versions.
+ * Category 90: Vault upgrades from older versions.
*/
import { createHash } from 'node:crypto';
import { readFileSync } from 'node:fs';
@@ -198,14 +198,14 @@ async function expectLegacyVaultContent(app: WebApp, fixture: LegacyVaultFixture
});
}
-test.describe('7. Vault upgrades', () => {
+test.describe('90. Vault upgrades', () => {
/*
* One after the other: every test account gets the fixture's SRP identity, and the server keys the login handshake
* on that identity, so two logins at once would overwrite each other's handshake.
*/
test.describe.configure({ mode: 'default' });
- test('7.1 should upgrade a 0.1.0 vault to the current storage format', async ({ app, apiUrl, testUser }) => {
+ test('90.1 should upgrade a 0.1.0 vault to the current storage format', async ({ app, apiUrl, testUser }) => {
const { page } = app;
const fixture = await upgradeLegacyVault(app, apiUrl, testUser);
@@ -234,7 +234,7 @@ test.describe('7. Vault upgrades', () => {
});
});
- test('7.2 should receive and decrypt mail on a new alias after upgrading a 0.1.0 vault', async ({ app, apiUrl, testUser }) => {
+ test('90.2 should receive and decrypt mail on a new alias after upgrading a 0.1.0 vault', async ({ app, apiUrl, testUser }) => {
await requireSmtp();
const { page } = app;
const id = Math.random().toString(36).substring(2, 10);
@@ -271,7 +271,7 @@ test.describe('7. Vault upgrades', () => {
});
});
- test('7.3 should upgrade the verifier of an upgraded vault at the next login', async ({ app, apiUrl, testUser }) => {
+ test('90.3 should upgrade the verifier of an upgraded vault at the next login', async ({ app, apiUrl, testUser }) => {
const { page } = app;
const fixture = await upgradeLegacyVault(app, apiUrl, testUser);
@@ -305,7 +305,7 @@ test.describe('7. Vault upgrades', () => {
});
});
- test('7.4 should keep everything a 0.30.7 vault holds when upgrading it', async ({ app, apiUrl, testUser }) => {
+ test('90.4 should keep everything a 0.30.7 vault holds when upgrading it', async ({ app, apiUrl, testUser }) => {
test.slow();
const fixture = await upgradeLegacyVault(app, apiUrl, testUser, '0.30.7');
diff --git a/apps/web/tests/run-e2e.mjs b/apps/web/tests/run-e2e.mjs
index ad66298c9..043c3a6d8 100644
--- a/apps/web/tests/run-e2e.mjs
+++ b/apps/web/tests/run-e2e.mjs
@@ -2,11 +2,17 @@
* Runs the Playwright e2e tests, selecting tests by their number.
*
* npm run test:e2e all tests
- * npm run test:e2e 4 every test in file 04 (4.x)
- * npm run test:e2e 4.3 test 4.3
- * npm run test:e2e 14.1,14.2 3 tests 14.1 and 14.2, plus every test in file 03
- * npm run test:e2e 14.1-14.3 tests 14.1 up to and including 14.3
- * npm run test:e2e:p 4.3 headed, stopping at each app.pause() in the Playwright Inspector
+ * npm run test:e2e 9x every test in files 90 to 99 (one area)
+ * npm run test:e2e 20 every test in file 20 (20.x)
+ * npm run test:e2e 20.3 test 20.3
+ * npm run test:e2e 80.1,80.2 1x tests 80.1 and 80.2, plus every test in files 10 to 19
+ * npm run test:e2e 80.1-80.3 tests 80.1 up to and including 80.3
+ * npm run test:e2e:p 20.3 headed, stopping at each app.pause() in the Playwright Inspector
+ *
+ * Test files are numbered by area, in the same ranges as the browser extension suite, so a range selects one area:
+ * 0x app shell (extension only) 1x account and authentication 2x items
+ * 3x sync and merge (extension) 4x email 5x settings
+ * 6x browser integration (ext.) 8x vault errors 9x vault upgrades
*
* Numbers become one title filter (--grep), so selections combine as "or". Any other argument goes to Playwright as-is.
*/
@@ -32,7 +38,7 @@ for (const arg of args) {
}
if (patterns.length > 0) {
- // A test title starts with its number ("4.3 should ..."); the leading boundary keeps 4.3 from matching 14.3.
+ // A test title starts with its number ("20.3 should ..."); the leading boundary keeps 1.3 from matching 11.3.
playwrightArgs.push('--grep', `(^|\\s)(${patterns.join('|')})\\s`);
}
@@ -40,21 +46,26 @@ const result = spawnSync('npx', ['playwright', 'test', ...playwrightArgs], { std
process.exit(result.status ?? 1);
/**
- * Whether an argument selects tests: "4", "4.3" or "4.1-4.3".
+ * Whether an argument selects tests: "2x", "20", "20.3" or "20.1-20.3".
*/
function isSelector(value) {
- return /^\d+(\.\d+)?$/.test(value) || /^\d+\.\d+-\d+\.\d+$/.test(value);
+ return /^\d+(\.\d+)?$/.test(value) || /^\d+\.\d+-\d+\.\d+$/.test(value) || /^\dx$/i.test(value);
}
/**
* The title patterns a selector stands for.
*/
function toPatterns(selector) {
+ // "2x" is every file from 20 to 29; "0x" is the files 0 to 9, whose test numbers have no leading zero.
+ const area = selector.match(/^(\d)x$/i);
+ if (area) {
+ return [`${area[1] === '0' ? '' : area[1]}\\d\\.\\d+`];
+ }
const range = selector.match(/^(\d+)\.(\d+)-(\d+)\.(\d+)$/);
if (range) {
const [, file, from, toFile, to] = range.map(Number);
if (file !== toFile || from > to) {
- console.error(`Invalid range "${selector}": use one file, low to high, e.g. 14.1-14.3.`);
+ console.error(`Invalid range "${selector}": use one file, low to high, e.g. 80.1-80.3.`);
process.exit(1);
}
return Array.from({ length: to - from + 1 }, (_, i) => `${file}\\.${from + i}`);
diff --git a/docs/docs/contributing/development/browser-extensions.md b/docs/docs/contributing/development/browser-extensions.md
index aed171938..6df5dc2d1 100644
--- a/docs/docs/contributing/development/browser-extensions.md
+++ b/docs/docs/contributing/development/browser-extensions.md
@@ -107,10 +107,10 @@ The E2E tests live in `tests/e2e/` and use [Playwright](https://playwright.dev/)
2. Run the E2E suite. This builds the Chrome extension into `dist/chrome-mv3` and runs Playwright against it:
```bash
-npm run test:e2e # all tests
-npm run test:e2e 4.3 # select by number: 4 (file), 4.3, 4.1,4.3 or 4.1-4.3
-npm run test:e2e:h 4.3 # same, in a visible browser, one test at a time
-npm run test:e2e:p 4.3 # same, and stops at each client.pause() in the Playwright Inspector
+npm run test:e2e # all tests
+npm run test:e2e 20.3 # select by number: 2x (files 20 to 29), 20 (file), 20.3, 20.1,20.3 or 20.1-20.3
+npm run test:e2e:h 20.3 # same, in a visible browser, one test at a time
+npm run test:e2e:p 20.3 # same, and stops at each client.pause() in the Playwright Inspector
```
## Manual tests