test) fixing tests
All checks were successful
PR Checks / lint-test-and-docker-build (pull_request) Successful in 2m15s

This commit is contained in:
2026-02-22 17:27:22 -05:00
parent 1ef5deeb98
commit b54dd351fc
3 changed files with 23 additions and 14 deletions

View File

@@ -21,6 +21,12 @@ test.beforeEach(async ({ context }) => {
});
test('admin sees auth source and can set local password', async ({ page }) => {
const suffix = Date.now();
const username = `e2e_auth_source_${suffix}`;
const fullName = `E2E Auth Source ${suffix}`;
const email = `e2e_auth_source_${suffix}@test.local`;
const password = `InitPass-${suffix}-123`;
await loginAsLocalUser(page, TEST_USERS.admin.username, TEST_USERS.admin.password);
await page.goto(ADMIN_USERS_URL);
await expect(page.getByRole('heading', { name: 'Users' })).toBeVisible();
@@ -31,7 +37,19 @@ test('admin sees auth source and can set local password', async ({ page }) => {
const adminRow = rowForUser(page, TEST_USERS.admin.username);
await expect(adminRow.getByText('Local', { exact: true })).toBeVisible();
await regularRow.getByRole('button', { name: 'Set local password' }).click();
await page.getByRole('button', { name: 'Add User' }).click();
const addDialog = page.getByRole('dialog', { name: 'Add user' });
await expect(addDialog).toBeVisible();
await addDialog.locator('input[type="text"]').nth(0).fill(username);
await addDialog.locator('input[type="text"]').nth(1).fill(fullName);
await addDialog.locator('input[type="email"]').fill(email);
await addDialog.locator('input[type="password"]').nth(0).fill(password);
await addDialog.locator('input[type="password"]').nth(1).fill(password);
await addDialog.getByRole('button', { name: 'Create user' }).click();
const disposableUserRow = rowForUser(page, username);
await expect(disposableUserRow.getByText('Local', { exact: true })).toBeVisible();
await disposableUserRow.getByRole('button', { name: 'Set local password' }).click();
const dialog = page.getByRole('dialog', { name: 'Set local password' });
await expect(dialog).toBeVisible();