From dbcc22882f0f41fcf0d2071cbd7f839abf8deb89 Mon Sep 17 00:00:00 2001 From: Chris Amico Date: Wed, 15 Nov 2023 13:18:05 -0500 Subject: [PATCH] Add cache, remove projects --- netlify.toml | 3 ++- package-lock.json | 7 +++++++ package.json | 1 + playwright.config.js | 4 ++-- plugins/test/index.js | 2 +- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/netlify.toml b/netlify.toml index b9f256257..0479b5010 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,2 +1,3 @@ [[context.deploy-preview.plugins]] -package = "/plugins/test" \ No newline at end of file + package = "netlify-plugin-playwright-cache" + package = "/plugins/test" diff --git a/package-lock.json b/package-lock.json index 77a73e919..44c0dc7eb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -74,6 +74,7 @@ "jest-environment-jsdom": "^29.7.0", "msw": "^1.2.3", "msw-storybook-addon": "^1.8.0", + "netlify-plugin-playwright-cache": "^0.0.1", "playwright": "^1.39.0", "prettier": "^3.0.2", "prettier-plugin-svelte": "^3.0.3", @@ -17626,6 +17627,12 @@ "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, + "node_modules/netlify-plugin-playwright-cache": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/netlify-plugin-playwright-cache/-/netlify-plugin-playwright-cache-0.0.1.tgz", + "integrity": "sha512-FECC4DtoYKpGGUNevxXVTE0GdD5LYSWwTPJpHv/WW4VlviTle8QlKBvF3Exfm48TDvZCUR3ofX1Zz+cJWOWBWA==", + "dev": true + }, "node_modules/next-tick": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", diff --git a/package.json b/package.json index c4d073dde..0bbd20136 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,7 @@ "jest-environment-jsdom": "^29.7.0", "msw": "^1.2.3", "msw-storybook-addon": "^1.8.0", + "netlify-plugin-playwright-cache": "^0.0.1", "playwright": "^1.39.0", "prettier": "^3.0.2", "prettier-plugin-svelte": "^3.0.3", diff --git a/playwright.config.js b/playwright.config.js index 1503494ba..f8349e8c9 100644 --- a/playwright.config.js +++ b/playwright.config.js @@ -27,12 +27,12 @@ export default defineConfig({ }, // Options specific to each project. + /* projects: [ { name: "chromium", use: devices["Desktop Chrome"], }, - /* { name: "firefox", use: devices["Desktop Firefox"], @@ -49,6 +49,6 @@ export default defineConfig({ name: "Mobile Safari", use: devices["iPhone 12"], }, - */ ], + */ }); diff --git a/plugins/test/index.js b/plugins/test/index.js index 24022af3a..55e3fbc7e 100644 --- a/plugins/test/index.js +++ b/plugins/test/index.js @@ -2,7 +2,7 @@ export async function onSuccess({ utils }) { console.log("Installing Playwright dependencies"); - await utils.run("playwright", ["install", "--with-deps", "chromium"]); + await utils.run("playwright", ["install"]); console.log("Running Playwright tests"); await utils.run("playwright", ["test"]);