fix tests
This commit is contained in:
@@ -83,6 +83,7 @@ test("admin can generate passwords and inspect combined permission sources", asy
|
||||
await page.goto("/users");
|
||||
|
||||
await page.locator("#add-user-btn").click();
|
||||
await expect(page.locator("#must-change-password")).toBeChecked();
|
||||
await page.locator("#generate-password-btn").click();
|
||||
const generatedPassword = await page.locator("#password").inputValue();
|
||||
expect(generatedPassword.length).toBeGreaterThanOrEqual(20);
|
||||
|
||||
@@ -51,7 +51,7 @@ async function seedBrowserUsers(): Promise<void> {
|
||||
for (const account of [ONBOARDING_USER, OPERATOR, VIEWER]) {
|
||||
const response = await authenticatedRequest("/api/users", adminCookie, {
|
||||
method: "POST",
|
||||
body: JSON.stringify(account),
|
||||
body: JSON.stringify({ ...account, mustChangePassword: false }),
|
||||
});
|
||||
if (!response.ok) {
|
||||
throw new Error(`Could not seed ${account.username}: ${response.status}`);
|
||||
|
||||
Reference in New Issue
Block a user