[test] fix timeout issue

This commit is contained in:
LouisLam 2021-10-06 13:26:43 +08:00
parent 22227be408
commit 4ded0c073a
2 changed files with 3 additions and 7 deletions

View File

@ -123,6 +123,6 @@
},
"testRegex": "./test/*.spec.js",
"rootDir": ".",
"testTimeout": 15000
"testTimeout": 30000
}
}

View File

@ -75,14 +75,10 @@ describe("Init", () => {
it("Change Theme", async () => {
// Light
await page.click(".btn[for=btncheck1]");
await page.waitForSelector("div.light", {
timeout: 2000
});
await page.waitForSelector("div.light");
await page.click(".btn[for=btncheck2]");
await page.waitForSelector("div.dark", {
timeout: 2000
});
await page.waitForSelector("div.dark");
});
});