diff --git a/.gitignore b/.gitignore index 372b1ea..51b3a74 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,7 @@ npm-debug.log /playwright-report/ /blob-report/ /playwright/.cache/ -.auth/ \ No newline at end of file +.auth/ + +# Playwright +/playwright/.auth/ diff --git a/e2e/example.spec.ts b/e2e/example.spec.ts new file mode 100644 index 0000000..54a906a --- /dev/null +++ b/e2e/example.spec.ts @@ -0,0 +1,18 @@ +import { test, expect } from '@playwright/test'; + +test('has title', async ({ page }) => { + await page.goto('https://playwright.dev/'); + + // Expect a title "to contain" a substring. + await expect(page).toHaveTitle(/Playwright/); +}); + +test('get started link', async ({ page }) => { + await page.goto('https://playwright.dev/'); + + // Click the get started link. + await page.getByRole('link', { name: 'Get started' }).click(); + + // Expects page to have a heading with the name of Installation. + await expect(page.getByRole('heading', { name: 'Installation' })).toBeVisible(); +}); diff --git a/package-lock.json b/package-lock.json index eeb5bc3..a2871cd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,18 +9,19 @@ "version": "1.0.0", "license": "ISC", "devDependencies": { - "@playwright/test": "^1.47.2", + "@playwright/test": "^1.59.1", "@types/node": "^22.7.4", "dotenv": "^16.4.5" } }, "node_modules/@playwright/test": { - "version": "1.47.2", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.47.2.tgz", - "integrity": "sha512-jTXRsoSPONAs8Za9QEQdyjFn+0ZQFjCiIztAIF6bi1HqhBzG9Ma7g1WotyiGqFSBRZjIEqMdT8RUlbk1QVhzCQ==", + "version": "1.59.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.59.1.tgz", + "integrity": "sha512-PG6q63nQg5c9rIi4/Z5lR5IVF7yU5MqmKaPOe0HSc0O2cX1fPi96sUQu5j7eo4gKCkB2AnNGoWt7y4/Xx3Kcqg==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "playwright": "1.47.2" + "playwright": "1.59.1" }, "bin": { "playwright": "cli.js" @@ -56,6 +57,7 @@ "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dev": true, "hasInstallScript": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -65,12 +67,13 @@ } }, "node_modules/playwright": { - "version": "1.47.2", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.47.2.tgz", - "integrity": "sha512-nx1cLMmQWqmA3UsnjaaokyoUpdVaaDhJhMoxX2qj3McpjnsqFHs516QAKYhqHAgOP+oCFTEOCOAaD1RgD/RQfA==", + "version": "1.59.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.59.1.tgz", + "integrity": "sha512-C8oWjPR3F81yljW9o5OxcWzfh6avkVwDD2VYdwIGqTkl+OGFISgypqzfu7dOe4QNLL2aqcWBmI3PMtLIK233lw==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "playwright-core": "1.47.2" + "playwright-core": "1.59.1" }, "bin": { "playwright": "cli.js" @@ -83,10 +86,11 @@ } }, "node_modules/playwright-core": { - "version": "1.47.2", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.47.2.tgz", - "integrity": "sha512-3JvMfF+9LJfe16l7AbSmU555PaTl2tPyQsVInqm3id16pdDfvZ8TTZ/pyzmkbDrZTQefyzU7AIHlZqQnxpqHVQ==", + "version": "1.59.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.59.1.tgz", + "integrity": "sha512-HBV/RJg81z5BiiZ9yPzIiClYV/QMsDCKUyogwH9p3MCP6IYjUFu/MActgYAvK0oWyV9NlwM3GLBjADyWgydVyg==", "dev": true, + "license": "Apache-2.0", "bin": { "playwright-core": "cli.js" }, diff --git a/package.json b/package.json index f9eee43..373e296 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "author": "", "license": "ISC", "devDependencies": { - "@playwright/test": "^1.47.2", + "@playwright/test": "^1.59.1", "@types/node": "^22.7.4", "dotenv": "^16.4.5" } diff --git a/tests/homepage/home.spec.ts-snapshots/home-page-customer01-chromium-win32.png b/tests/homepage/home.spec.ts-snapshots/home-page-customer01-chromium-win32.png new file mode 100644 index 0000000..1caacd7 Binary files /dev/null and b/tests/homepage/home.spec.ts-snapshots/home-page-customer01-chromium-win32.png differ diff --git a/tests/homepage/home.spec.ts-snapshots/home-page-no-auth-chromium-win32.png b/tests/homepage/home.spec.ts-snapshots/home-page-no-auth-chromium-win32.png new file mode 100644 index 0000000..bc393d3 Binary files /dev/null and b/tests/homepage/home.spec.ts-snapshots/home-page-no-auth-chromium-win32.png differ