mirror of https://git.tuxpa.in/a/code-server.git
feat: add new e2e test to test browser
This commit is contained in:
parent
3db19843e2
commit
6b3db06c7a
|
@ -0,0 +1,16 @@
|
|||
/// <reference types="jest-playwright-preset" />
|
||||
|
||||
beforeAll(async () => {
|
||||
await page.goto("https://whatismybrowser.com/")
|
||||
})
|
||||
|
||||
test("should display correct browser", async () => {
|
||||
const browser = await page.$eval(".string-major", (el) => el.innerHTML)
|
||||
|
||||
const displayNames = {
|
||||
chromium: "Chrome",
|
||||
firefox: "Firefox",
|
||||
webkit: "Safari",
|
||||
}
|
||||
expect(browser).toContain(displayNames[browserName])
|
||||
})
|
Loading…
Reference in New Issue