github.com/kubeshop/testkube@v1.17.23/contrib/executor/playwright/examples/tests/example.spec.js (about) 1 // @ts-check 2 const { test, expect } = require('@playwright/test'); 3 4 test('has title', async ({ page }) => { 5 await page.goto('https://playwright.dev/'); 6 7 // Expect a title "to contain" a substring. 8 await expect(page).toHaveTitle(/Playwright/); 9 }); 10 11 test('get started link', async ({ page }) => { 12 await page.goto('https://playwright.dev/'); 13 14 // Click the get started link. 15 await page.getByRole('link', { name: 'Get started' }).click(); 16 17 // Expects the URL to contain intro. 18 await expect(page).toHaveURL(/.*intro/); 19 });