feat: Add password checks for password-reset (#10042)
Co-authored-by: zomars <[email protected]>
This commit is contained in:
1 parent
556bf346f0
commit
e83647c652
3 files changed
+56
-64
No files matched your search
@@ -8,7 +8,7 @@ test("Can reset forgotten password", async ({ page, users }) => {
|
||||
// eslint-disable-next-line playwright/no-skipped-test
|
||||
test.skip(process.env.NEXT_PUBLIC_IS_E2E !== "1", "It shouldn't if we can't skip email");
|
||||
const user = await users.create();
|
||||
const newPassword = `${user.username}-123`;
|
||||
const newPassword = `${user.username}-123CAL`; // To match the password policy
|
||||
// Got to reset password flow
|
||||
await page.goto("/auth/forgot-password");
|
||||
|
||||
@@ -24,8 +24,8 @@ test("Can reset forgotten password", async ({ page, users }) => {
|
||||
|
||||
// Wait for page to fully load
|
||||
await page.waitForSelector("text=Reset Password");
|
||||
// Fill input[name="password"]
|
||||
await page.fill('input[name="password"]', newPassword);
|
||||
// Fill input[name="new_password"]
|
||||
await page.fill('input[name="new_password"]', newPassword);
|
||||
|
||||
// Click text=Submit
|
||||
await page.click('button[type="submit"]');
|
||||
|
||||
Reference in new issue
Block a user