2021-06-10 13:09:38 +00:00
|
|
|
import { test, expect } from "./baseFixture"
|
2021-03-30 18:35:36 +00:00
|
|
|
|
2021-04-14 19:03:47 +00:00
|
|
|
// This is a "gut-check" test to make sure playwright is working as expected
|
2021-04-21 21:31:15 +00:00
|
|
|
test.describe("browser", () => {
|
2021-06-10 13:09:38 +00:00
|
|
|
test("browser should display correct userAgent", async ({ codeServerPage, browserName }) => {
|
2021-04-21 21:31:15 +00:00
|
|
|
const displayNames = {
|
|
|
|
chromium: "Chrome",
|
|
|
|
firefox: "Firefox",
|
|
|
|
webkit: "Safari",
|
|
|
|
}
|
2021-06-10 13:09:38 +00:00
|
|
|
const userAgent = await codeServerPage.page.evaluate("navigator.userAgent")
|
2021-04-21 21:31:15 +00:00
|
|
|
|
|
|
|
expect(userAgent).toContain(displayNames[browserName])
|
|
|
|
})
|
2021-03-30 18:35:36 +00:00
|
|
|
})
|