42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
import { test, expect } from '@playwright/test';
|
|
|
|
const { describe, beforeEach, skip } = test
|
|
|
|
function webkitOnly() {
|
|
beforeEach(async ({ browserName }) => {
|
|
if (browserName !== 'webkit') skip()
|
|
})
|
|
}
|
|
|
|
describe("when user is on iOS", () => {
|
|
|
|
webkitOnly()
|
|
|
|
describe("version 16.4 or higher", () => {
|
|
describe("and tack up now is not already installed on their device", () => {
|
|
test("they are instructed to install tack up now", async ({ page }) => {
|
|
await page.goto("/")
|
|
|
|
|
|
// await page.waitForSelector("text=Hey it's IOS!",{timeout: 500})
|
|
console.log(await page.innerHTML("body"))
|
|
|
|
|
|
|
|
await expect(page.getByText(/Hey it's IOS!/)).toBeAttached()
|
|
})
|
|
})
|
|
})
|
|
|
|
test("version 16.3 and under they are informed that their iOS version isn't supported", async ({ page }) => {
|
|
await page.goto("/")
|
|
// await page.waitForSelector("text=Oh no",{timeout: 500})
|
|
console.log(await page.innerHTML("body"))
|
|
|
|
const donut = await page.getByText("Oh no")
|
|
|
|
console.log("is visible", await donut.isVisible())
|
|
|
|
await expect(donut).toBeVisible()
|
|
})
|
|
}) |