2021-04-13 19:02:52 +00:00
|
|
|
import { test, expect } from "@playwright/test"
|
2021-03-30 23:07:51 +00:00
|
|
|
import { CODE_SERVER_ADDRESS } from "../utils/constants"
|
|
|
|
|
2021-04-13 19:02:52 +00:00
|
|
|
test.describe("login page", () => {
|
2021-04-14 00:31:56 +00:00
|
|
|
// Reset the browser so no cookies are persisted
|
|
|
|
// by emptying the storageState
|
|
|
|
const options = {
|
|
|
|
contextOptions: {
|
|
|
|
storageState: {},
|
|
|
|
},
|
|
|
|
}
|
2021-03-30 23:07:51 +00:00
|
|
|
|
2021-04-14 00:31:56 +00:00
|
|
|
test("should see the login page", options, async ({ page }) => {
|
|
|
|
await page.goto(CODE_SERVER_ADDRESS, { waitUntil: "networkidle" })
|
2021-03-30 23:07:51 +00:00
|
|
|
// It should send us to the login page
|
|
|
|
expect(await page.title()).toBe("code-server login")
|
|
|
|
})
|
|
|
|
})
|