Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Update test fixture identifiers (#2462)
Leendert de Borsta18105a6e7d9
diff --git a/apps/web/tests/e2e/05-email.spec.ts b/apps/web/tests/e2e/05-email.spec.tsindex db5c81380..80682f2dd 100644--- a/apps/web/tests/e2e/05-email.spec.ts+++ b/apps/web/tests/e2e/05-email.spec.ts@@ -26,7 +26,7 @@ test.describe('5. Email', () => {await app.login(testUser.username, testUser.password);await test.step('create a login item with an address on a private domain', async () => {- await page.locator('#quickIdentityButton').click();+ await page.locator('#topBarQuickCreateButton').click();await page.locator('#serviceName').fill('Mail test');await page.locator('#quickIdentitySubmit').click();await page.getByRole('button', { name: 'Email', exact: true }).click();diff --git a/apps/web/tests/e2e/06-settings.spec.ts b/apps/web/tests/e2e/06-settings.spec.tsindex 49cfdc8f5..2e3ce0759 100644--- a/apps/web/tests/e2e/06-settings.spec.ts+++ b/apps/web/tests/e2e/06-settings.spec.ts@@ -15,8 +15,9 @@ test.describe('6. Settings', () => {await app.login(testUser.username, testUser.password);await test.step('switch to Dutch', async () => {- await page.locator('#toggleMobileMenuButton').click();- await page.locator('#mobileMenuDropdown').getByRole('link', { name: 'General settings' }).click();+ await page.locator('#userMenuButton').click();+ await page.locator('#userMenu').getByRole('link', { name: 'Settings', exact: true }).click();+ await page.getByRole('main').getByRole('link', { name: 'General settings' }).click();await page.locator('#appLanguage').selectOption('nl');await expect(emailsLink('E-mails')).toBeVisible();});diff --git a/apps/web/tests/e2e/08-two-factor.spec.ts b/apps/web/tests/e2e/08-two-factor.spec.tsindex f1597b342..b6663a8a5 100644--- a/apps/web/tests/e2e/08-two-factor.spec.ts+++ b/apps/web/tests/e2e/08-two-factor.spec.ts@@ -15,12 +15,12 @@ type TwoFactorSetup = {};/**- * Open the security settings page via the user menu; a full page load would lock the vault.+ * Open the two-factor authentication page via the account menu; a full page load would lock the vault.*/-async function openSecuritySettings(app: WebApp): Promise<void> {- await app.page.locator('#toggleMobileMenuButton').click();- await app.page.locator('#mobileMenuDropdown').getByRole('link', { name: 'Security settings' }).click();- await expect(app.page).toHaveURL(/\/settings\/security$/);+async function openTwoFactorSettings(app: WebApp): Promise<void> {+ await app.page.locator('#userMenuButton').click();+ await app.page.locator('#userMenu').getByRole('link', { name: 'Two-factor authentication' }).click();+ await expect(app.page).toHaveURL(/\/settings\/two-factor$/);}/**@@ -28,9 +28,9 @@ async function openSecuritySettings(app: WebApp): Promise<void> {*/async function enableTwoFactor(app: WebApp): Promise<TwoFactorSetup> {const { page } = app;- await openSecuritySettings(app);+ await openTwoFactorSettings(app);await page.getByRole('button', { name: 'Enable two-factor authentication', exact: true }).click();- await expect(page).toHaveURL(/\/settings\/security\/enable-2fa$/);+ await expect(page).toHaveURL(/\/settings\/two-factor\/enable$/);await expect(page.locator('#authenticator-uri img')).toBeVisible();const secret = (await page.locator('#authenticator-secret').innerText()).replace(/\s/g, '').toUpperCase();@@ -60,20 +60,20 @@ async function loginUntilTwoFactor(app: WebApp, username: string, password: stri*/async function submitDisableCode(app: WebApp, code: string): Promise<void> {const { page } = app;- if (!page.url().endsWith('/settings/security/disable-2fa')) {- await openSecuritySettings(app);+ if (!page.url().endsWith('/settings/two-factor/disable')) {+ await openTwoFactorSettings(app);await page.getByRole('button', { name: 'Disable two-factor authentication', exact: true }).click();- await expect(page).toHaveURL(/\/settings\/security\/disable-2fa$/);+ await expect(page).toHaveURL(/\/settings\/two-factor\/disable$/);}await page.locator('#disableCode').fill(code);await page.getByRole('button', { name: 'Confirm Disable Two-Factor Authentication' }).click();}/**- * Wait until two-factor is off and the security page offers to enable it again.+ * Wait until two-factor is off and the two-factor page offers to enable it again.*/async function expectTwoFactorDisabled(app: WebApp): Promise<void> {- await expect(app.page).toHaveURL(/\/settings\/security$/);+ await expect(app.page).toHaveURL(/\/settings\/two-factor$/);await expect(app.page.getByText('Two-factor authentication is now successfully disabled.')).toBeVisible();await expect(app.page.getByRole('button', { name: 'Enable two-factor authentication', exact: true })).toBeVisible();}@@ -112,7 +112,7 @@ test.describe('8. Two-factor authentication', () => {await test.step('a wrong authenticator code does not disable 2FA', async () => {await submitDisableCode(app, wrongCode(totp));await expect(page.getByText('Invalid authenticator code. Please try again.')).toBeVisible();- await expect(page).toHaveURL(/\/settings\/security\/disable-2fa$/);+ await expect(page).toHaveURL(/\/settings\/two-factor\/disable$/);});await test.step('a current authenticator code disables 2FA', async () => {diff --git a/apps/web/tests/fixtures/WebApp.ts b/apps/web/tests/fixtures/WebApp.tsindex 6552f6480..b400b7b48 100644--- a/apps/web/tests/fixtures/WebApp.ts+++ b/apps/web/tests/fixtures/WebApp.ts@@ -18,11 +18,12 @@ export class WebApp {}/**- * Log out via the user menu and wait for the login page.+ * Log out via the account popover and wait for the login page.*/public async logout(): Promise<void> {- await this.page.locator('#toggleMobileMenuButton').click();- await this.page.locator('#mobileMenuDropdown').getByRole('link', { name: 'Log out' }).click();+ await this.page.locator('#userMenuButton').click();+ await this.page.locator('#userMenuLogoutButton').click();+ await this.page.locator('#confirmButton').click();await expect(this.page).toHaveURL(/\/user\/login$/);}@@ -74,7 +75,7 @@ export class WebApp {*/public async expectVaultOpen(username: string): Promise<void> {await expect(this.page).toHaveURL(/\/items$/);- await expect(this.page.locator('#mobileMenuDropdown').getByText(username, { exact: true })).toBeAttached();+ await expect(this.page.locator('#userMenu').getByText(username, { exact: true })).toBeAttached();}/**@@ -89,10 +90,10 @@ export class WebApp {}/**- * Create a login item with only a name via the top bar widget, and wait for its view page.+ * Create a login item with only a name via the top bar quick create, and wait for its view page.*/public async createItem(name: string): Promise<void> {- await this.page.locator('#quickIdentityButton').click();+ await this.page.locator('#topBarQuickCreateButton').click();await this.page.locator('#serviceName').fill(name);await this.page.locator('#quickIdentitySubmit').click();await expect(this.page.locator('#service-name')).toHaveValue(name);