mirror of
https://github.com/danog/code-server.git
synced 2024-11-27 12:57:13 +01:00
f2fa7701a9
My thinking is that this may reduce the cognitive overhead for developers writing new test suites. This also allows us to perform different setup steps (like ensuring the editor is visible when authenticated).
16 lines
520 B
TypeScript
16 lines
520 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])
|
|
})
|
|
})
|