Archived
1
0
This repository has been archived on 2024-09-09. You can view files and clone it, but cannot push or open issues or pull requests.
code-server/test/e2e/browser.test.ts

17 lines
413 B
TypeScript
Raw Normal View History

2021-03-30 20:35:36 +02:00
/// <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])
})