From 1dcd1385fc8aa79d146bc2b87460398348e0eadb Mon Sep 17 00:00:00 2001 From: ztest95 <110767420+ztest95@users.noreply.github.com> Date: Mon, 20 Oct 2025 10:59:28 +0800 Subject: [PATCH] feat: add edge & fix safari failing tests --- playwright.config.ts | 6 ++++++ tests/example.spec.ts | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/playwright.config.ts b/playwright.config.ts index 870311b..7dc043c 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -27,6 +27,7 @@ export default defineConfig({ use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL: process.env.WEBSITE_URL, + ignoreHTTPSErrors: true, /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: 'on-first-retry', @@ -49,6 +50,11 @@ export default defineConfig({ use: { ...devices['Desktop Safari'] }, }, + { + name: 'edge', + use: { ...devices['Desktop Edge'] }, + }, + /* Test against mobile viewports. */ // { // name: 'Mobile Chrome', diff --git a/tests/example.spec.ts b/tests/example.spec.ts index 6f6cc6f..df01c6f 100644 --- a/tests/example.spec.ts +++ b/tests/example.spec.ts @@ -11,8 +11,8 @@ test('register page', async ({ page }) => { await page.goto('/login.php'); // Click the get started link. - await page.getByRole('link', { name: 'Create an account' }).click(); + await page.getByRole('link', { name: 'Create Account' }).click(); // Expects page to have a button with the name of Create Account. - await expect(page.getByRole('button', { name: 'Register' })).toBeVisible(); + await expect(page.getByRole('button', { name: 'Create Account' })).toBeVisible(); }); \ No newline at end of file