Archived
1
0
This repository has been archived on 2024-09-09. You can view files and clone it, but cannot push or open issues or pull requests.
code-server/test/e2e/browser.test.ts
2021-09-15 14:54:33 -04:00

16 lines
524 B
TypeScript

import { describe, test, expect } from "./baseFixture"
// This is a "gut-check" test to make sure playwright is working as expected
describe("browser", true, () => {
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])
})
})