mirror of
https://git.tuxpa.in/a/code-server.git
synced 2024-12-29 13:38:46 +00:00
16 lines
559 B
TypeScript
16 lines
559 B
TypeScript
import { test, expect } from "@playwright/test"
|
|
import { CODE_SERVER_ADDRESS } from "../utils/constants"
|
|
|
|
// This is a "gut-check" test to make sure playwright is working as expected
|
|
test("browser should display correct userAgent", async ({ page, browserName }) => {
|
|
const displayNames = {
|
|
chromium: "Chrome",
|
|
firefox: "Firefox",
|
|
webkit: "Safari",
|
|
}
|
|
await page.goto(CODE_SERVER_ADDRESS, { waitUntil: "networkidle" })
|
|
const userAgent = await page.evaluate("navigator.userAgent")
|
|
|
|
expect(userAgent).toContain(displayNames[browserName])
|
|
})
|