e2e testing, it's hard

This commit is contained in:
LouisLam 2021-10-07 17:48:13 +08:00
parent e5f6d7f047
commit 67a623be18

View File

@ -151,6 +151,9 @@ describe("Init", () => {
}); });
it("Change Password (wrong current password)", async () => { it("Change Password (wrong current password)", async () => {
await page.goto(baseURL + "/settings");
await page.waitForSelector("#current-password");
await page.type("#current-password", "wrong_passw$$d"); await page.type("#current-password", "wrong_passw$$d");
await page.type("#new-password", "new_password123"); await page.type("#new-password", "new_password123");
await page.type("#repeat-new-password", "new_password123"); await page.type("#repeat-new-password", "new_password123");
@ -168,6 +171,9 @@ describe("Init", () => {
}); });
it("Change Password (wrong repeat)", async () => { it("Change Password (wrong repeat)", async () => {
await page.goto(baseURL + "/settings");
await page.waitForSelector("#current-password");
await page.type("#current-password", "admin123"); await page.type("#current-password", "admin123");
await page.type("#new-password", "new_password123"); await page.type("#new-password", "new_password123");
await page.type("#repeat-new-password", "new_password1234567898797898"); await page.type("#repeat-new-password", "new_password1234567898797898");