From 0bb2d769d13ea03b3694e7ba44a8f00ba638d843 Mon Sep 17 00:00:00 2001 From: Steven Kitterman Date: Mon, 26 Aug 2024 16:45:11 -0700 Subject: [PATCH 01/11] basic auth test cases --- package.json | 1 + packages/playwright/tests/auth.spec.ts | 19 +++++++++++++++++++ test-server/fixtures/auth/index.html | 17 +++++++++++++++++ test-server/server.js | 13 ++++++++++++- yarn.lock | 19 +++++++++++++++++++ 5 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 packages/playwright/tests/auth.spec.ts create mode 100644 test-server/fixtures/auth/index.html diff --git a/package.json b/package.json index 5b37dc90..9fe8d2f2 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ "cypress": "^13.6.1", "eslint": "^7.32.0", "express": "^4.18.2", + "express-basic-auth": "^1.2.1", "husky": ">=6", "jest": "^27.0.6", "jest-environment-jsdom": "^27.0.6", diff --git a/packages/playwright/tests/auth.spec.ts b/packages/playwright/tests/auth.spec.ts new file mode 100644 index 00000000..384a46a4 --- /dev/null +++ b/packages/playwright/tests/auth.spec.ts @@ -0,0 +1,19 @@ +import { test, expect } from '../src'; + +const httpCredentials = { + username: 'admin', + password: 'supersecret', +}; + +test.describe(() => { + test.use({ + extraHTTPHeaders: { + Authorization: `Basic ${btoa(`${httpCredentials.username}:${httpCredentials.password}`)}`, + }, + }), + test('can login', async ({ page }) => { + await page.goto('/im-protected'); + + await expect(page.getByText('I AM PROTECTED!!!')).toBeVisible(); + }); +}); diff --git a/test-server/fixtures/auth/index.html b/test-server/fixtures/auth/index.html new file mode 100644 index 00000000..4fa18fc5 --- /dev/null +++ b/test-server/fixtures/auth/index.html @@ -0,0 +1,17 @@ + + + + + + +

I AM PROTECTED!!!

+ + diff --git a/test-server/server.js b/test-server/server.js index 41985c04..6e6b75de 100644 --- a/test-server/server.js +++ b/test-server/server.js @@ -1,6 +1,7 @@ const path = require('path'); // eslint-disable-next-line import/no-extraneous-dependencies const express = require('express'); +const basicAuth = require('express-basic-auth'); const app = express(); const port = 3000; @@ -8,7 +9,13 @@ const port = 3000; const htmlIntro = ``; const htmlOutro = ``; -// Assets +app.use( + '/auth', + basicAuth({ + users: { admin: 'supersecret' }, + challenge: true, + }) +); app.get('/css.urls.css', (req, res) => { res.sendFile(path.join(__dirname, 'fixtures/css.urls.css')); @@ -29,6 +36,10 @@ app.get('/img', (req, res) => { } }); +app.get('/auth', (req, res) => { + res.sendFile(path.join(__dirname, 'fixtures/auth/index.html')); +}); + app.get('/img/another', (req, res) => { res.sendFile(path.join(__dirname, 'fixtures/pink.png')); }); diff --git a/yarn.lock b/yarn.lock index 36d279e1..0e269e4b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3683,6 +3683,7 @@ __metadata: cypress: "npm:^13.6.1" eslint: "npm:^7.32.0" express: "npm:^4.18.2" + express-basic-auth: "npm:^1.2.1" husky: "npm:>=6" jest: "npm:^27.0.6" jest-environment-jsdom: "npm:^27.0.6" @@ -7958,6 +7959,15 @@ __metadata: languageName: node linkType: hard +"basic-auth@npm:^2.0.1": + version: 2.0.1 + resolution: "basic-auth@npm:2.0.1" + dependencies: + safe-buffer: "npm:5.1.2" + checksum: 05f56db3a0fc31c89c86b605231e32ee143fb6ae38dc60616bc0970ae6a0f034172def99e69d3aed0e2c9e7cac84e2d63bc51a0b5ff6ab5fc8808cc8b29923c1 + languageName: node + linkType: hard + "bcrypt-pbkdf@npm:^1.0.0": version: 1.0.2 resolution: "bcrypt-pbkdf@npm:1.0.2" @@ -10913,6 +10923,15 @@ __metadata: languageName: node linkType: hard +"express-basic-auth@npm:^1.2.1": + version: 1.2.1 + resolution: "express-basic-auth@npm:1.2.1" + dependencies: + basic-auth: "npm:^2.0.1" + checksum: 01a14cff7a9d1d243d502b0aef287b2e4199e1c3cabd4a2ab3166ad6b122bc77fdeefcc743f57948b2ab59c4a2bcbe8761f3877a0e28959fa53f415667e348f6 + languageName: node + linkType: hard + "express@npm:^4.17.3, express@npm:^4.18.2": version: 4.18.2 resolution: "express@npm:4.18.2" From 35b449926e391281f8936dfd3bb00727f3c73b75 Mon Sep 17 00:00:00 2001 From: Steven Kitterman Date: Mon, 26 Aug 2024 16:54:18 -0700 Subject: [PATCH 02/11] Playwright version updated --- package.json | 2 +- packages/playwright/package.json | 6 ++-- packages/shared/package.json | 6 ++-- yarn.lock | 49 +++++++++++++++++++++----------- 4 files changed, 39 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index 9fe8d2f2..4db66a4c 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "@babel/preset-typescript": "^7.21.4", "@changesets/cli": "^2.27.1", "@jest/types": "^27.0.6", - "@playwright/test": "^1.39.0", + "@playwright/test": "^1.46.1", "@storybook/eslint-config-storybook": "^3.1.2", "@swc/core": "^1.4.6", "@testing-library/dom": "^8.1.0", diff --git a/packages/playwright/package.json b/packages/playwright/package.json index e278d2ef..c40751dd 100644 --- a/packages/playwright/package.json +++ b/packages/playwright/package.json @@ -50,11 +50,11 @@ }, "devDependencies": { "@chromatic-com/shared-e2e": "workspace:*", - "@playwright/test": "^1.39.0", + "@playwright/test": "^1.46.1", "@storybook/types": "^8.1.5", "express": "^4.18.2", - "playwright": "^1.32.2", - "playwright-core": "^1.32.2" + "playwright": "^1.46.1", + "playwright-core": "^1.46.1" }, "lint-staged": { "*.{ts,js,css,md}": "prettier --write" diff --git a/packages/shared/package.json b/packages/shared/package.json index 3ea0e0b2..b32815ff 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -78,7 +78,7 @@ "@babel/preset-react": "^7.18.6", "@babel/preset-typescript": "^7.21.4", "@jest/types": "^27.0.6", - "@playwright/test": "^1.39.0", + "@playwright/test": "^1.46.1", "@storybook/addon-essentials": "^8.1.5", "@storybook/eslint-config-storybook": "^3.1.2", "@storybook/server-webpack5": "^8.1.5", @@ -96,8 +96,8 @@ "lint-staged": ">=10", "mime": "^3.0.0", "node-fetch": "2", - "playwright": "^1.32.2", - "playwright-core": "^1.32.2", + "playwright": "^1.46.1", + "playwright-core": "^1.46.1", "prettier": "^2.3.1", "prompts": "^2.4.2", "rimraf": "^3.0.2", diff --git a/yarn.lock b/yarn.lock index 0e269e4b..81c7b064 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3594,7 +3594,7 @@ __metadata: resolution: "@chromatic-com/playwright@workspace:packages/playwright" dependencies: "@chromatic-com/shared-e2e": "workspace:*" - "@playwright/test": "npm:^1.39.0" + "@playwright/test": "npm:^1.46.1" "@segment/analytics-node": "npm:^1.1.0" "@storybook/addon-essentials": "npm:^8.1.5" "@storybook/csf": "npm:^0.1.0" @@ -3602,8 +3602,8 @@ __metadata: "@storybook/server-webpack5": "npm:^8.1.5" "@storybook/types": "npm:^8.1.5" express: "npm:^4.18.2" - playwright: "npm:^1.32.2" - playwright-core: "npm:^1.32.2" + playwright: "npm:^1.46.1" + playwright-core: "npm:^1.46.1" rrweb-snapshot: "npm:2.0.0-alpha.14" storybook: "npm:^8.1.5" ts-dedent: "npm:^2.2.0" @@ -3623,7 +3623,7 @@ __metadata: "@babel/preset-react": "npm:^7.18.6" "@babel/preset-typescript": "npm:^7.21.4" "@jest/types": "npm:^27.0.6" - "@playwright/test": "npm:^1.39.0" + "@playwright/test": "npm:^1.46.1" "@segment/analytics-node": "npm:^1.1.0" "@storybook/addon-essentials": "npm:^8.1.5" "@storybook/eslint-config-storybook": "npm:^3.1.2" @@ -3642,8 +3642,8 @@ __metadata: lint-staged: "npm:>=10" mime: "npm:^3.0.0" node-fetch: "npm:2" - playwright: "npm:^1.32.2" - playwright-core: "npm:^1.32.2" + playwright: "npm:^1.46.1" + playwright-core: "npm:^1.46.1" prettier: "npm:^2.3.1" prompts: "npm:^2.4.2" rimraf: "npm:^3.0.2" @@ -3666,7 +3666,7 @@ __metadata: "@babel/preset-typescript": "npm:^7.21.4" "@changesets/cli": "npm:^2.27.1" "@jest/types": "npm:^27.0.6" - "@playwright/test": "npm:^1.39.0" + "@playwright/test": "npm:^1.46.1" "@storybook/eslint-config-storybook": "npm:^3.1.2" "@swc/core": "npm:^1.4.6" "@testing-library/dom": "npm:^8.1.0" @@ -4806,14 +4806,14 @@ __metadata: languageName: node linkType: hard -"@playwright/test@npm:^1.39.0": - version: 1.39.0 - resolution: "@playwright/test@npm:1.39.0" +"@playwright/test@npm:^1.46.1": + version: 1.46.1 + resolution: "@playwright/test@npm:1.46.1" dependencies: - playwright: "npm:1.39.0" + playwright: "npm:1.46.1" bin: playwright: cli.js - checksum: d808ca36f0a411ae09eece19fc93fcbd048541253c6c9e341fc9488613395bb94ebf65ad64e920d6be0fb20e887cf317c532a45d2c30e1804d6842e55c1fe6e9 + checksum: b2d33f33bedfa5a5c72cfc5ee212dfbf531d9c46320b0af901e71ab61b96845e43cc636181b33b3faae27f2f87ce2d44017ac65235bf9c95209f476477b16f93 languageName: node linkType: hard @@ -15858,16 +15858,31 @@ __metadata: languageName: node linkType: hard -"playwright-core@npm:^1.32.2": - version: 1.40.1 - resolution: "playwright-core@npm:1.40.1" +"playwright-core@npm:1.46.1, playwright-core@npm:^1.46.1": + version: 1.46.1 + resolution: "playwright-core@npm:1.46.1" bin: playwright-core: cli.js - checksum: 56c283012974982313a6ae583b975ee4af76d52059fb9a25d9cc616a11224685ec64682b391910c795d2b12d2ab5c7eec31124722c75c0b1703a76ac9b6fd1c2 + checksum: 98e48e271caccaa6c54b3c591cbddbef36a679eef011b38e2af11fbaba0aab1f997b45f9207c4099468a0c79047a1e879bbd9e81bd880ae24501a0ee3c7a33c7 + languageName: node + linkType: hard + +"playwright@npm:1.46.1, playwright@npm:^1.46.1": + version: 1.46.1 + resolution: "playwright@npm:1.46.1" + dependencies: + fsevents: "npm:2.3.2" + playwright-core: "npm:1.46.1" + dependenciesMeta: + fsevents: + optional: true + bin: + playwright: cli.js + checksum: 2a328a2073313136192d74b48b981d9aeb1d4cc54926ed235f638c875f9de59c41370bb20bb2d8cf30126c52c6e25cc02db21ffafeb487c92c84c52c84846912 languageName: node linkType: hard -"playwright@npm:1.39.0, playwright@npm:^1.32.2": +"playwright@npm:^1.32.2": version: 1.39.0 resolution: "playwright@npm:1.39.0" dependencies: From 3704b04fd2bba2883075b19ae7679a75e0dcd07a Mon Sep 17 00:00:00 2001 From: Steven Kitterman Date: Mon, 26 Aug 2024 17:27:01 -0700 Subject: [PATCH 03/11] Implement authRequired lifecycle hook --- packages/shared/src/resource-archiver/index.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/shared/src/resource-archiver/index.ts b/packages/shared/src/resource-archiver/index.ts index ae4e4cfc..e413ada0 100644 --- a/packages/shared/src/resource-archiver/index.ts +++ b/packages/shared/src/resource-archiver/index.ts @@ -48,7 +48,8 @@ export class ResourceArchiver { async watch() { this.client.on('Fetch.requestPaused', this.requestPaused.bind(this)); - await this.client.send('Fetch.enable'); + this.client.on('Fetch.authRequired', this.authRequired.bind(this)); + await this.client.send('Fetch.enable', { handleAuthRequests: true }); } async clientSend( @@ -65,6 +66,16 @@ export class ResourceArchiver { } } + async authRequired({ requestId, request, authChallenge }: Protocol.Fetch.authRequiredPayload) { + console.log(request); + await this.clientSend(request, 'Fetch.continueWithAuth', { + requestId, + authChallengeResponse: { + response: 'ProvideCredentials', + }, + }); + } + async requestPaused({ requestId, request, @@ -73,6 +84,8 @@ export class ResourceArchiver { responseErrorReason, responseHeaders, }: Protocol.Fetch.requestPausedPayload) { + const isRequest = !responseErrorReason && !responseStatusCode; + console.log(`${isRequest ? 'REQUEST' : 'RESPONSE'}, url: ${request.url}`); // We only need to capture assets that will render when the DOM snapshot is rendered, // so we only need to handle GET requests. if (!request.method.match(/get/i)) { From 6fd7601ed1af6c2ce5968f30bb47fc1160cf113f Mon Sep 17 00:00:00 2001 From: Andrew Ortwein Date: Tue, 3 Sep 2024 15:41:00 -0400 Subject: [PATCH 04/11] Add credentials to playwright config --- packages/playwright/playwright.config.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/playwright/playwright.config.ts b/packages/playwright/playwright.config.ts index c2b7d27c..825a10b0 100644 --- a/packages/playwright/playwright.config.ts +++ b/packages/playwright/playwright.config.ts @@ -4,6 +4,10 @@ export default defineConfig({ testDir: './tests', use: { baseURL: 'http://localhost:3000', + httpCredentials: { + username: 'admin', + password: 'supersecret', + }, }, projects: [ { From 32a1e7cfa7ba91fa2ac309a9ae6794bb77c30e20 Mon Sep 17 00:00:00 2001 From: Andrew Ortwein Date: Tue, 3 Sep 2024 15:42:30 -0400 Subject: [PATCH 05/11] Fix test of protected page to expect to use global credentials --- packages/playwright/tests/auth.spec.ts | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/packages/playwright/tests/auth.spec.ts b/packages/playwright/tests/auth.spec.ts index 384a46a4..276399a1 100644 --- a/packages/playwright/tests/auth.spec.ts +++ b/packages/playwright/tests/auth.spec.ts @@ -1,19 +1,9 @@ import { test, expect } from '../src'; -const httpCredentials = { - username: 'admin', - password: 'supersecret', -}; - test.describe(() => { - test.use({ - extraHTTPHeaders: { - Authorization: `Basic ${btoa(`${httpCredentials.username}:${httpCredentials.password}`)}`, - }, - }), - test('can login', async ({ page }) => { - await page.goto('/im-protected'); + test('can login', async ({ page }) => { + await page.goto('/auth'); - await expect(page.getByText('I AM PROTECTED!!!')).toBeVisible(); - }); + await expect(page.getByText('I AM PROTECTED!!!')).toBeVisible(); + }); }); From 96a7f3d99f3eb078b35e68a4ffe1bdbed9aa4346 Mon Sep 17 00:00:00 2001 From: Andrew Ortwein Date: Tue, 3 Sep 2024 15:44:39 -0400 Subject: [PATCH 06/11] Pass httpCredentials from testInfo into ResourceArchive constructor --- packages/playwright/src/createResourceArchive.ts | 7 ++++++- packages/playwright/src/makeTest.ts | 8 +++++++- packages/shared/src/resource-archiver/index.ts | 14 ++++++++++---- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/packages/playwright/src/createResourceArchive.ts b/packages/playwright/src/createResourceArchive.ts index b35bf84d..79b06677 100644 --- a/packages/playwright/src/createResourceArchive.ts +++ b/packages/playwright/src/createResourceArchive.ts @@ -36,14 +36,19 @@ export const createResourceArchive = async ({ page, networkTimeout, assetDomains, + httpCredentials, }: { page: Page; networkTimeout?: number; assetDomains?: string[]; + httpCredentials?: { + username: string; + password: string; + }; // TODO type this out? }): Promise<() => Promise> => { const cdpClient = await page.context().newCDPSession(page); - const resourceArchiver = new ResourceArchiver(cdpClient, assetDomains); + const resourceArchiver = new ResourceArchiver(cdpClient, assetDomains, httpCredentials); await resourceArchiver.watch(); return async () => { diff --git a/packages/playwright/src/makeTest.ts b/packages/playwright/src/makeTest.ts index 5816852c..652de5e7 100644 --- a/packages/playwright/src/makeTest.ts +++ b/packages/playwright/src/makeTest.ts @@ -35,7 +35,12 @@ export const performChromaticSnapshot = async ( use: () => Promise, testInfo: TestInfo ) => { - const { testId } = testInfo; + const { + testId, + project: { + use: { httpCredentials }, + }, + } = testInfo; try { trackRun(); @@ -53,6 +58,7 @@ export const performChromaticSnapshot = async ( page, networkTimeout: resourceArchiveTimeout, assetDomains, + httpCredentials, }); await use(); diff --git a/packages/shared/src/resource-archiver/index.ts b/packages/shared/src/resource-archiver/index.ts index e413ada0..3dbb2f97 100644 --- a/packages/shared/src/resource-archiver/index.ts +++ b/packages/shared/src/resource-archiver/index.ts @@ -40,10 +40,18 @@ export class ResourceArchiver { */ private firstUrl: URL; - constructor(cdpClient: CDPClient, allowedDomains?: string[]) { + /** TODO */ + private httpCredentials: { username: string; password: string }; // TODO type this out? + + constructor( + cdpClient: CDPClient, + allowedDomains?: string[], + httpCredentials?: { username: string; password: string } + ) { this.client = cdpClient; // tack on the protocol so we can properly check if requests are cross-origin this.assetDomains = (allowedDomains || []).map((domain) => `https://${domain}`); + this.httpCredentials = httpCredentials; } async watch() { @@ -67,11 +75,11 @@ export class ResourceArchiver { } async authRequired({ requestId, request, authChallenge }: Protocol.Fetch.authRequiredPayload) { - console.log(request); await this.clientSend(request, 'Fetch.continueWithAuth', { requestId, authChallengeResponse: { response: 'ProvideCredentials', + ...this.httpCredentials, }, }); } @@ -84,8 +92,6 @@ export class ResourceArchiver { responseErrorReason, responseHeaders, }: Protocol.Fetch.requestPausedPayload) { - const isRequest = !responseErrorReason && !responseStatusCode; - console.log(`${isRequest ? 'REQUEST' : 'RESPONSE'}, url: ${request.url}`); // We only need to capture assets that will render when the DOM snapshot is rendered, // so we only need to handle GET requests. if (!request.method.match(/get/i)) { From 0479b75a092897f54881e6ff6e271d968ddcd142 Mon Sep 17 00:00:00 2001 From: Andrew Ortwein Date: Tue, 3 Sep 2024 17:54:39 -0400 Subject: [PATCH 07/11] Define HttpCredentials type --- .../playwright/src/createResourceArchive.ts | 6 ++---- .../shared/src/resource-archiver/index.ts | 19 +++++++++++-------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/packages/playwright/src/createResourceArchive.ts b/packages/playwright/src/createResourceArchive.ts index 79b06677..0eca649d 100644 --- a/packages/playwright/src/createResourceArchive.ts +++ b/packages/playwright/src/createResourceArchive.ts @@ -4,6 +4,7 @@ import { ResourceArchive, DEFAULT_GLOBAL_RESOURCE_ARCHIVE_TIMEOUT_MS, logger, + HttpCredentials, } from '@chromatic-com/shared-e2e'; const idle = async (page: Page, networkTimeoutMs = DEFAULT_GLOBAL_RESOURCE_ARCHIVE_TIMEOUT_MS) => { @@ -41,10 +42,7 @@ export const createResourceArchive = async ({ page: Page; networkTimeout?: number; assetDomains?: string[]; - httpCredentials?: { - username: string; - password: string; - }; // TODO type this out? + httpCredentials?: HttpCredentials; }): Promise<() => Promise> => { const cdpClient = await page.context().newCDPSession(page); diff --git a/packages/shared/src/resource-archiver/index.ts b/packages/shared/src/resource-archiver/index.ts index 3dbb2f97..57757f77 100644 --- a/packages/shared/src/resource-archiver/index.ts +++ b/packages/shared/src/resource-archiver/index.ts @@ -16,6 +16,11 @@ export type ArchiveResponse = export type ResourceArchive = Record; +export type HttpCredentials = { + username: string; + password: string; +}; + // a custom interface that satisfies both playwright's CDPSession and chrome-remote-interface's CDP.Client types. interface CDPClient { on: (eventName: keyof Protocol.Events, handlerFunction: (params?: any) => void) => void; @@ -40,14 +45,12 @@ export class ResourceArchiver { */ private firstUrl: URL; - /** TODO */ - private httpCredentials: { username: string; password: string }; // TODO type this out? + /** + * HTTP Basic Auth credentials to use when accessing protected resources. + */ + private httpCredentials: HttpCredentials; - constructor( - cdpClient: CDPClient, - allowedDomains?: string[], - httpCredentials?: { username: string; password: string } - ) { + constructor(cdpClient: CDPClient, allowedDomains?: string[], httpCredentials?: HttpCredentials) { this.client = cdpClient; // tack on the protocol so we can properly check if requests are cross-origin this.assetDomains = (allowedDomains || []).map((domain) => `https://${domain}`); @@ -74,7 +77,7 @@ export class ResourceArchiver { } } - async authRequired({ requestId, request, authChallenge }: Protocol.Fetch.authRequiredPayload) { + async authRequired({ requestId, request }: Protocol.Fetch.authRequiredPayload): Promise { await this.clientSend(request, 'Fetch.continueWithAuth', { requestId, authChallengeResponse: { From fa17b53853ffd9a83b1a2570f1f168aa98a638be Mon Sep 17 00:00:00 2001 From: Andrew Ortwein Date: Tue, 3 Sep 2024 18:03:58 -0400 Subject: [PATCH 08/11] httpCredentials should be optional --- packages/playwright/src/makeTest.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/playwright/src/makeTest.ts b/packages/playwright/src/makeTest.ts index 652de5e7..9aee77a1 100644 --- a/packages/playwright/src/makeTest.ts +++ b/packages/playwright/src/makeTest.ts @@ -35,12 +35,8 @@ export const performChromaticSnapshot = async ( use: () => Promise, testInfo: TestInfo ) => { - const { - testId, - project: { - use: { httpCredentials }, - }, - } = testInfo; + const { testId, project } = testInfo; + const httpCredentials = project?.use?.httpCredentials; try { trackRun(); From 960f2b9d17de661bcedc12b417b167316d1e9f87 Mon Sep 17 00:00:00 2001 From: Andrew Ortwein Date: Tue, 3 Sep 2024 20:17:07 -0400 Subject: [PATCH 09/11] trigger test rerun From ccebbadf4de036b592afe2102d66bbb27dbd7f8f Mon Sep 17 00:00:00 2001 From: Andrew Ortwein Date: Wed, 4 Sep 2024 10:39:15 -0400 Subject: [PATCH 10/11] Update playwright at repo root --- package.json | 2 +- yarn.lock | 26 +------------------------- 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index 4db66a4c..6387fcd5 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "jest-environment-jsdom": "^27.0.6", "lint-staged": ">=10", "node-fetch": "2", - "playwright": "^1.32.2", + "playwright": "^1.46.1", "prettier": "^2.3.1", "prompts": "^2.4.2", "rimraf": "^3.0.2", diff --git a/yarn.lock b/yarn.lock index 81c7b064..dc605b9f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3689,7 +3689,7 @@ __metadata: jest-environment-jsdom: "npm:^27.0.6" lint-staged: "npm:>=10" node-fetch: "npm:2" - playwright: "npm:^1.32.2" + playwright: "npm:^1.46.1" prettier: "npm:^2.3.1" prompts: "npm:^2.4.2" rimraf: "npm:^3.0.2" @@ -15849,15 +15849,6 @@ __metadata: languageName: node linkType: hard -"playwright-core@npm:1.39.0": - version: 1.39.0 - resolution: "playwright-core@npm:1.39.0" - bin: - playwright-core: cli.js - checksum: dbd719ae77ae84a43f831beb89514ca5cca62840a2f0cce445645002ac045c256c19b5f4f3cf9a7aa205428a1571e9e8d946ff1937cc316033ea58090c549a76 - languageName: node - linkType: hard - "playwright-core@npm:1.46.1, playwright-core@npm:^1.46.1": version: 1.46.1 resolution: "playwright-core@npm:1.46.1" @@ -15882,21 +15873,6 @@ __metadata: languageName: node linkType: hard -"playwright@npm:^1.32.2": - version: 1.39.0 - resolution: "playwright@npm:1.39.0" - dependencies: - fsevents: "npm:2.3.2" - playwright-core: "npm:1.39.0" - dependenciesMeta: - fsevents: - optional: true - bin: - playwright: cli.js - checksum: b55adb3453a9c2a02fe61dbcbd5fcb0cbae1038ea6115158c7933d203ae5b62a13cb294905d6661836751a5825bc2cfdc71b67988082ec47ac6930ca744af724 - languageName: node - linkType: hard - "pluralize@npm:^8.0.0": version: 8.0.0 resolution: "pluralize@npm:8.0.0" From 23635f7d9d14dcf4733c5b550b2cc8ce1f8b00ef Mon Sep 17 00:00:00 2001 From: Andrew Ortwein Date: Wed, 4 Sep 2024 11:02:26 -0400 Subject: [PATCH 11/11] Run changeset --- .changeset/shaggy-candles-matter.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/shaggy-candles-matter.md diff --git a/.changeset/shaggy-candles-matter.md b/.changeset/shaggy-candles-matter.md new file mode 100644 index 00000000..bdb67e29 --- /dev/null +++ b/.changeset/shaggy-candles-matter.md @@ -0,0 +1,6 @@ +--- +'@chromatic-com/playwright': minor +'@chromatic-com/shared-e2e': minor +--- + +Support using httpCredentials in Playwright global config for basic authentication