diff --git a/packages/web-new/package-lock.json b/packages/web-new/package-lock.json index 367b4630..8785b804 100644 --- a/packages/web-new/package-lock.json +++ b/packages/web-new/package-lock.json @@ -35,7 +35,6 @@ "nodemon": "^3.0.1", "sass": "^1.64.0", "sass-loader": "^13.3.2", - "serve-handler": "^6.1.5", "style-loader": "^3.3.3", "webpack": "^5.88.2", "webpack-bundle-analyzer": "^4.9.0", @@ -4131,21 +4130,6 @@ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, - "node_modules/fast-url-parser": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", - "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==", - "dev": true, - "dependencies": { - "punycode": "^1.3.2" - } - }, - "node_modules/fast-url-parser/node_modules/punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", - "dev": true - }, "node_modules/fastest-levenshtein": { "version": "1.0.16", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", @@ -5922,12 +5906,6 @@ "node": ">=0.10.0" } }, - "node_modules/path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", - "dev": true - }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -7087,76 +7065,6 @@ "randombytes": "^2.1.0" } }, - "node_modules/serve-handler": { - "version": "6.1.5", - "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.5.tgz", - "integrity": "sha512-ijPFle6Hwe8zfmBxJdE+5fta53fdIY0lHISJvuikXB3VYFafRjMRpOffSPvCYsbKyBA7pvy9oYr/BT1O3EArlg==", - "dev": true, - "dependencies": { - "bytes": "3.0.0", - "content-disposition": "0.5.2", - "fast-url-parser": "1.1.3", - "mime-types": "2.1.18", - "minimatch": "3.1.2", - "path-is-inside": "1.0.2", - "path-to-regexp": "2.2.1", - "range-parser": "1.2.0" - } - }, - "node_modules/serve-handler/node_modules/bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/serve-handler/node_modules/content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/serve-handler/node_modules/mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/serve-handler/node_modules/mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", - "dev": true, - "dependencies": { - "mime-db": "~1.33.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/serve-handler/node_modules/path-to-regexp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", - "integrity": "sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==", - "dev": true - }, - "node_modules/serve-handler/node_modules/range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/serve-index": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", diff --git a/packages/web-new/package.json b/packages/web-new/package.json index d47a7fe8..a40af23a 100644 --- a/packages/web-new/package.json +++ b/packages/web-new/package.json @@ -37,7 +37,6 @@ "nodemon": "^3.0.1", "sass": "^1.64.0", "sass-loader": "^13.3.2", - "serve-handler": "^6.1.5", "style-loader": "^3.3.3", "webpack": "^5.88.2", "webpack-bundle-analyzer": "^4.9.0", diff --git a/packages/web-new/playwright.config.js b/packages/web-new/playwright.config.js index 44b0326f..36d9a544 100644 --- a/packages/web-new/playwright.config.js +++ b/packages/web-new/playwright.config.js @@ -14,29 +14,9 @@ ********************************************************************************/ // @ts-check const { defineConfig, devices } = require('@playwright/test'); -const handler = require("serve-handler"); -const http = require("http"); const isCI = process.env.CI; -if (isCI) { - const port = 5101; - const host = "http://localhost"; - const fullHost = host + ":" + port; - - const server = http.createServer((request, response) => { - // You pass two more arguments for config and middleware - // More details here: https://github.com/vercel/serve-handler#options - return handler(request, response); - }); - - /* ################### */ - /* MAIN */ - server.listen(port, () => { - console.log("Running siteTest at " + fullHost); - }); -} - module.exports = defineConfig({ testDir: './tests', // Folder for test artifacts such as screenshots, videos, traces, etc. @@ -54,7 +34,7 @@ module.exports = defineConfig({ /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { /* Base URL to use in actions like `await page.goto('/')`. */ - baseURL: isCI ? 'http://localhost:5101' : 'http://127.0.0.1:5100', + baseURL: isCI ? 'https://deploy-preview-515--thingweb-playground.netlify.app' : 'http://127.0.0.1:5100', /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: 'on-first-retry', @@ -87,7 +67,7 @@ module.exports = defineConfig({ /* Run your local dev server before starting the tests */ webServer: { command: isCI ? '' : 'npm run serve', - url: isCI ? 'http://localhost:5101' : 'http://127.0.0.1:5100', - reuseExistingServer: true, + url: isCI ? 'https://deploy-preview-515--thingweb-playground.netlify.app' : 'http://127.0.0.1:5100', + reuseExistingServer: !isCI, } });