1
0
mirror of https://github.com/coder/code-server.git synced 2024-12-04 23:03:06 +08:00
code-server/test/e2e/e2e.test.ts
2021-03-12 12:00:56 -07:00

25 lines
555 B
TypeScript

import { chromium, Page, Browser } from "playwright"
import { CODE_SERVER_ADDRESS } from "../utils/constants"
let browser: Browser
let page: Page
beforeAll(async () => {
browser = await chromium.launch()
})
afterAll(async () => {
await browser.close()
})
beforeEach(async () => {
page = await browser.newPage()
})
afterEach(async () => {
await page.close()
})
it("should see the login page", async () => {
await page.goto(CODE_SERVER_ADDRESS)
// It should send us to the login page
expect(await page.title()).toBe("code-server login")
})