We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3db1984 commit 6b3db06Copy full SHA for 6b3db06
test/e2e/browser.test.ts
@@ -0,0 +1,16 @@
1
+/// <reference types="jest-playwright-preset" />
2
+
3
+beforeAll(async () => {
4
+ await page.goto("https://whatismybrowser.com/")
5
+})
6
7
+test("should display correct browser", async () => {
8
+ const browser = await page.$eval(".string-major", (el) => el.innerHTML)
9
10
+ const displayNames = {
11
+ chromium: "Chrome",
12
+ firefox: "Firefox",
13
+ webkit: "Safari",
14
+ }
15
+ expect(browser).toContain(displayNames[browserName])
16
0 commit comments