refactor: use playwright-test syntax for e2e tests
This commit is contained in:
@@ -1,19 +1,13 @@
|
||||
/// <reference types="jest-playwright-preset" />
|
||||
|
||||
import { test, expect } from "@playwright/test"
|
||||
import { CODE_SERVER_ADDRESS } from "../utils/constants"
|
||||
|
||||
describe("login page", () => {
|
||||
beforeEach(async () => {
|
||||
await jestPlaywright.resetContext({
|
||||
logger: {
|
||||
isEnabled: (name, severity) => name === "browser",
|
||||
log: (name, severity, message, args) => console.log(`${name} ${message}`),
|
||||
},
|
||||
})
|
||||
test.describe("login page", () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
// TODO@jsjoeio reset context somehow
|
||||
await page.goto(CODE_SERVER_ADDRESS, { waitUntil: "networkidle" })
|
||||
})
|
||||
|
||||
it("should see the login page", async () => {
|
||||
test("should see the login page", async ({ page }) => {
|
||||
// It should send us to the login page
|
||||
expect(await page.title()).toBe("code-server login")
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user