2021-06-23 05:34:44 +08:00
|
|
|
import { describe, test, expect } from "./baseFixture"
|
2021-03-31 02:35:36 +08:00
|
|
|
|
2021-04-15 03:03:47 +08:00
|
|
|
// This is a "gut-check" test to make sure playwright is working as expected
|
2021-06-24 06:41:36 +08:00
|
|
|
describe("browser", true, () => {
|
2021-06-10 21:09:38 +08:00
|
|
|
test("browser should display correct userAgent", async ({ codeServerPage, browserName }) => {
|
2021-04-22 05:31:15 +08:00
|
|
|
const displayNames = {
|
|
|
|
chromium: "Chrome",
|
|
|
|
firefox: "Firefox",
|
|
|
|
webkit: "Safari",
|
|
|
|
}
|
2021-09-16 01:55:21 +08:00
|
|
|
const userAgent = await codeServerPage.page.evaluate(() => navigator.userAgent)
|
2021-04-22 05:31:15 +08:00
|
|
|
|
|
|
|
expect(userAgent).toContain(displayNames[browserName])
|
|
|
|
})
|
2021-03-31 02:35:36 +08:00
|
|
|
})
|