Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

Update settings browser test for the 2FA rename

Juan Denis718fc223dfcc
diff --git a/frontend/scripts/settings-browser.mjs b/frontend/scripts/settings-browser.mjs
index 988950cb..24545103 100644
--- a/frontend/scripts/settings-browser.mjs
+++ b/frontend/scripts/settings-browser.mjs
@@ -90,11 +90,11 @@ try {
assert.equal(surfaces.length, 2);
for (const surface of surfaces) assert.notEqual(surface.color, 'rgba(0, 0, 0, 0)', `${theme} table has no resting surface`);
await page.screenshot({ path: `test-results/settings-${theme}.png`, fullPage: true });
- assert.equal(await page.getByRole('columnheader', { name: /^MFA\b/ }).count(), 1);
+ assert.equal(await page.getByRole('columnheader', { name: /^2FA\b/ }).count(), 1);
assert.equal(await page.getByRole('columnheader', { name: /^Passkey\b/ }).count(), 1);
await page.getByRole('button', { name: 'All users', exact: true }).click();
- await page.getByRole('button', { name: 'Admins without MFA', exact: true }).click();
+ await page.getByRole('button', { name: 'Admins without 2FA', exact: true }).click();
await page.locator('.users-table').first().getByText('needs-mfa', { exact: true }).waitFor();
assert.equal(await page.locator('.users-table').first().locator('tbody tr').count(), 1);
assert.equal(await page.locator('.users-table').first().getByText('disabled-admin', { exact: true }).count(), 0);
@@ -127,7 +127,7 @@ try {
await page.getByRole('alert').filter({ hasText: 'Synthetic users failure' }).waitFor();
assert.deepEqual(errors, []);
await context.close();
- console.log(`Settings ${theme}: surfaces, MFA view, guarded delete/revoke, loading, empty and error states passed`);
+ console.log(`Settings ${theme}: surfaces, 2FA view, guarded delete/revoke, loading, empty and error states passed`);
}
} finally {
await browser?.close();