fix: update path for e2e videos
This commit is contained in:
@ -1,22 +1,15 @@
|
||||
import { test, expect } from "@playwright/test"
|
||||
import { CODE_SERVER_ADDRESS } from "../utils/constants"
|
||||
|
||||
test("should display correct browser based on userAgent", async ({ page, browserName }) => {
|
||||
// This is a "gut-check" test to make sure playwright is working as expected
|
||||
test("browser should display correct userAgent", async ({ page, browserName }) => {
|
||||
const displayNames = {
|
||||
chromium: "Chrome",
|
||||
firefox: "Firefox",
|
||||
webkit: "Safari",
|
||||
}
|
||||
await page.goto(CODE_SERVER_ADDRESS, { waitUntil: "networkidle" })
|
||||
const userAgent = await page.evaluate("navigator.userAgent")
|
||||
|
||||
if (browserName === "chromium") {
|
||||
expect(userAgent).toContain(displayNames[browserName])
|
||||
}
|
||||
|
||||
if (browserName === "firefox") {
|
||||
expect(userAgent).toContain(displayNames[browserName])
|
||||
}
|
||||
|
||||
if (browserName === "webkit") {
|
||||
expect(userAgent).toContain(displayNames[browserName])
|
||||
}
|
||||
expect(userAgent).toContain(displayNames[browserName])
|
||||
})
|
||||
|
Reference in New Issue
Block a user