mirror of https://github.com/coder/code-server.git
refactor(testing): combine loginPage with login
This commit is contained in:
parent
58e17c5e50
commit
ebbabc6e04
|
@ -10,6 +10,12 @@ test.describe("login", () => {
|
|||
},
|
||||
}
|
||||
|
||||
test("should see the login page", options, async ({ page }) => {
|
||||
await page.goto(CODE_SERVER_ADDRESS, { waitUntil: "networkidle" })
|
||||
// It should send us to the login page
|
||||
expect(await page.title()).toBe("code-server login")
|
||||
})
|
||||
|
||||
test("should be able to login", options, async ({ page }) => {
|
||||
await page.goto(CODE_SERVER_ADDRESS, { waitUntil: "networkidle" })
|
||||
// Type in password
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
import { test, expect } from "@playwright/test"
|
||||
import { CODE_SERVER_ADDRESS } from "../utils/constants"
|
||||
|
||||
test.describe("login page", () => {
|
||||
// Reset the browser so no cookies are persisted
|
||||
// by emptying the storageState
|
||||
const options = {
|
||||
contextOptions: {
|
||||
storageState: {},
|
||||
},
|
||||
}
|
||||
|
||||
test("should see the login page", options, async ({ page }) => {
|
||||
await page.goto(CODE_SERVER_ADDRESS, { waitUntil: "networkidle" })
|
||||
// It should send us to the login page
|
||||
expect(await page.title()).toBe("code-server login")
|
||||
})
|
||||
})
|
Loading…
Reference in New Issue