mirror of
https://git.tuxpa.in/a/code-server.git
synced 2024-12-30 14:08:45 +00:00
47a05c998a
After thinking about it some more it's probably mostly only useful to see the output when the tests are hanging. Otherwise there's a lot of noise about Jest child processes and pipes.
25 lines
548 B
TypeScript
25 lines
548 B
TypeScript
import { chromium, Page, Browser } from "playwright"
|
|
import { CODE_SERVER_ADDRESS } from "./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")
|
|
})
|