diff --git a/packages/common/constants/servers.ts b/packages/common/constants/servers.ts index 3060c40f31..464a083425 100644 --- a/packages/common/constants/servers.ts +++ b/packages/common/constants/servers.ts @@ -13,15 +13,17 @@ const SERVERS = { web: { host: 'localhost', https: false, - port: 5172, + port: 3456, strictPort: true, + path: 'packages/web/', }, // @see: https://vitejs.dev/config/server-options.html 'web-react': { host: 'localhost', https: false, - port: 5173, + port: 3456, strictPort: true, + path: 'packages/web-react/', }, 'web-twig': { host: 'localhost', @@ -37,16 +39,16 @@ const SERVERS = { }, }, TESTING: { - web: process.env.DEMO_WEB_URL || 'https://spirit-design-system-demo.netlify.app/', - 'web-react': process.env.DEMO_WEB_REACT_URL || 'https://spirit-design-system-react.netlify.app/', + web: `${process.env.WEBSITE_URL || 'https://spirit-design-system.netlify.app'}/packages/web/`, + 'web-react': `${process.env.WEBSITE_URL || 'https://spirit-design-system.netlify.app/'}/packages/web-react/`, 'web-twig': process.env.DEMO_WEB_TWIG_URL || '', }, }; const getDevelopmentEndpointUri = (packageName, { isDocker } = { isDocker: false }) => { - const { https, host, port } = SERVERS.DEVELOPMENT[packageName]; + const { https, host, port, path } = SERVERS.DEVELOPMENT[packageName]; - return `http${https ? 's' : ''}://${isDocker ? 'host.docker.internal' : host}:${port}`; + return `http${https ? 's' : ''}://${isDocker ? 'host.docker.internal' : host}:${port}/${path}`; }; module.exports = { SERVERS, getDevelopmentEndpointUri }; diff --git a/playwright.config.ts b/playwright.config.ts index 3bf01bca2d..0194727a6f 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -24,7 +24,7 @@ export default 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: 'http://127.0.0.1:3000', + baseURL: process.env.WEBSITE_URL, /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: 'on-first-retry', diff --git a/tests/e2e/demo-components-compare.spec.ts b/tests/e2e/demo-components-compare.spec.ts index 9e8a4ad9a9..dba94e92d2 100644 --- a/tests/e2e/demo-components-compare.spec.ts +++ b/tests/e2e/demo-components-compare.spec.ts @@ -1,7 +1,7 @@ import { isTesting as isTestingEnvironment } from '@lmc-eu/spirit-common/constants/environments'; import { SERVERS, getDevelopmentEndpointUri } from '@lmc-eu/spirit-common/constants/servers'; -import { readdirSync } from 'fs'; import { expect, test } from '@playwright/test'; +import { readdirSync } from 'fs'; // Tests that are intentionally broken, but will be fixed in the future const IGNORED_TESTS = [