From a8719e1f793336c5b2c9a56af17715bf0c3a7bf8 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Fri, 16 Apr 2021 14:12:10 -0700 Subject: [PATCH] refactor: change config to save all e2e videos --- test/config.ts | 2 +- test/e2e/login.test.ts | 28 ---------------------------- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/test/config.ts b/test/config.ts index 95c23a6c..6df0324e 100644 --- a/test/config.ts +++ b/test/config.ts @@ -64,7 +64,7 @@ setConfig(config) const options: PlaywrightOptions = { headless: true, // Run tests in headless browsers. - video: "retry-with-video", + video: "on", } // Run tests in three browsers. diff --git a/test/e2e/login.test.ts b/test/e2e/login.test.ts index 0621accd..d82b2075 100644 --- a/test/e2e/login.test.ts +++ b/test/e2e/login.test.ts @@ -64,32 +64,4 @@ test.describe("login", () => { await page.waitForLoadState("networkidle") expect(await page.isVisible("text=Login rate limited!")) }) - - // This test takes 8mins to run and is probably not worth adding to our e2e suite - // test.only("should not count successful logins against the rate limiter", options, async ({ page }) => { - // for (let i = 1; i <= 14; i++) { - // await page.goto(CODE_SERVER_ADDRESS, { waitUntil: "networkidle" }) - // await page.fill(".password", PASSWORD) - // await page.click(".submit") - // await page.waitForLoadState("networkidle") - // // Make sure the editor actually loaded - // await page.isVisible("div.monaco-workbench") - - // // Delete cookie - // await page.evaluate(() => { - // document.cookie = "key" + "=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;" - // return Promise.resolve() - // }) - - // // Go back to address, which should be the login page - // await page.goto(CODE_SERVER_ADDRESS, { waitUntil: "networkidle" }) - // } - - // // On the 15th time, we should see the editor - // await page.fill(".password", PASSWORD) - // await page.click(".submit") - // await page.waitForLoadState("networkidle") - // // Make sure the editor actually loaded - // expect(await page.isVisible("div.monaco-workbench")) - // }) })