2021-01-26 21:44:23 +00:00
|
|
|
import { chromium, Page, Browser } from "playwright"
|
|
|
|
|
|
|
|
let browser: Browser
|
|
|
|
let page: Page
|
2021-01-27 23:04:37 +00:00
|
|
|
|
2021-01-26 21:44:23 +00:00
|
|
|
beforeAll(async () => {
|
|
|
|
browser = await chromium.launch()
|
|
|
|
})
|
|
|
|
afterAll(async () => {
|
|
|
|
await browser.close()
|
|
|
|
})
|
|
|
|
beforeEach(async () => {
|
|
|
|
page = await browser.newPage()
|
|
|
|
})
|
|
|
|
afterEach(async () => {
|
|
|
|
await page.close()
|
|
|
|
})
|
|
|
|
|
2021-01-27 23:04:37 +00:00
|
|
|
it("should see the login page", async () => {
|
2021-02-12 19:08:34 +00:00
|
|
|
await page.goto(process.env)
|
2021-01-27 23:04:37 +00:00
|
|
|
// It should send us to the login page
|
|
|
|
expect(await page.title()).toBe("code-server login")
|
2021-01-26 21:44:23 +00:00
|
|
|
})
|