code-server-2/test/e2e/browser.test.ts

16 lines
514 B
TypeScript

import { describe, test, expect } from "./baseFixture"
// This is a "gut-check" test to make sure playwright is working as expected
describe("browser", () => {
test("browser should display correct userAgent", async ({ codeServerPage, browserName }) => {
const displayNames = {
chromium: "Chrome",
firefox: "Firefox",
webkit: "Safari",
}
const userAgent = await codeServerPage.page.evaluate("navigator.userAgent")
expect(userAgent).toContain(displayNames[browserName])
})
})