diff --git a/package.json b/package.json index d728cf8e318..5d92a9d7daa 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,8 @@ "dev": "npm-run-all --parallel dev:*", "dev:tikui": "tikui-core serve", "dev:vite": "vite", - "e2e": "cypress open --config-file src/test/webapp/e2e/cypress-config.ts", - "e2e:headless": "cypress run --headless --config-file src/test/webapp/e2e/cypress-config.ts", + "e2e": "cypress open --config-file src/test/webapp/component/cypress-config.ts", + "e2e:headless": "cypress run --headless --config-file src/test/webapp/component/cypress-config.ts", "format": "npm run prettier:format", "glyph:build": "rimraf .fontello-session && fontello-cli install --config src/main/glyph/config.json --font src/main/glyph/font --css src/main/glyph/css", "glyph:open": "rimraf .fontello-session && fontello-cli open --config src/main/glyph/config.json", @@ -37,8 +37,8 @@ "preview": "vite preview", "start": "npm run dev", "test": "npm run test:watch", - "test:component": "start-server-and-test tikui:serve-build http://localhost:9005 dev:vite http://localhost:9000 'cypress open --e2e --config-file src/test/webapp/component/cypress-config.ts'", - "test:component:headless": "start-server-and-test tikui:serve-build http://localhost:9005 dev:vite http://localhost:9000 'cypress run --headless --config-file src/test/webapp/component/cypress-config.ts'", + "test:component": "start-server-and-test tikui:serve-build http://localhost:9005 dev:vite http://localhost:9000 'cypress open --e2e --config-file src/test/webapp/component/cypress-config-9000.ts'", + "test:component:headless": "start-server-and-test tikui:serve-build http://localhost:9005 dev:vite http://localhost:9000 'cypress run --headless --config-file src/test/webapp/component/cypress-config-9000.ts'", "test:coverage": "vitest run --coverage", "test:watch": "vitest --", "tikui:serve-build": "tikui-core build && serve -p 9005 target/classes/public/style", diff --git a/src/test/webapp/component/cypress-config-9000.ts b/src/test/webapp/component/cypress-config-9000.ts new file mode 100644 index 00000000000..6f6aefbd37d --- /dev/null +++ b/src/test/webapp/component/cypress-config-9000.ts @@ -0,0 +1,12 @@ +import { defineConfig } from 'cypress'; + +export default defineConfig({ + e2e: { + baseUrl: 'http://localhost:9000', + specPattern: 'src/test/webapp/component/integration/**/*.spec.ts', + fixturesFolder: 'src/test/webapp/component/fixtures', + supportFolder: 'src/test/webapp/component/support', + supportFile: false, + video: false, + }, +}); diff --git a/src/test/webapp/component/cypress-config.ts b/src/test/webapp/component/cypress-config.ts index 6f6aefbd37d..90a354186b3 100644 --- a/src/test/webapp/component/cypress-config.ts +++ b/src/test/webapp/component/cypress-config.ts @@ -2,7 +2,7 @@ import { defineConfig } from 'cypress'; export default defineConfig({ e2e: { - baseUrl: 'http://localhost:9000', + baseUrl: 'http://localhost:7471', specPattern: 'src/test/webapp/component/integration/**/*.spec.ts', fixturesFolder: 'src/test/webapp/component/fixtures', supportFolder: 'src/test/webapp/component/support', diff --git a/src/test/webapp/e2e/cypress-config.ts b/src/test/webapp/e2e/cypress-config.ts deleted file mode 100644 index 43600759d76..00000000000 --- a/src/test/webapp/e2e/cypress-config.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { defineConfig } from 'cypress'; - -export default defineConfig({ - e2e: { - baseUrl: 'http://localhost:7471', - specPattern: 'src/test/webapp/e2e/integration/**/*.spec.ts', - fixturesFolder: 'src/test/e2e/cypress/fixtures', - supportFolder: 'src/test/e2e/cypress/support', - supportFile: false, - video: false, - }, -}); diff --git a/src/test/webapp/e2e/integration/Patch.spec.ts b/src/test/webapp/e2e/integration/Patch.spec.ts deleted file mode 100644 index 24d484d6cd8..00000000000 --- a/src/test/webapp/e2e/integration/Patch.spec.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { dataSelector } from '../support/selector'; - -describe('Patch', () => { - it('should display modules', () => { - cy.visit('/patches'); - - cy.get(dataSelector('modules-list')).should('be.visible'); - }); -}); diff --git a/src/test/webapp/e2e/support/selector.ts b/src/test/webapp/e2e/support/selector.ts deleted file mode 100644 index 5bc12330610..00000000000 --- a/src/test/webapp/e2e/support/selector.ts +++ /dev/null @@ -1 +0,0 @@ -export const dataSelector = (value: string) => `[data-selector="${value}"]`; diff --git a/src/test/webapp/e2e/tsconfig.json b/src/test/webapp/e2e/tsconfig.json deleted file mode 100644 index ec0fb92ca7c..00000000000 --- a/src/test/webapp/e2e/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "compilerOptions": { - "module": "esnext", - "strict": true, - "target": "es6", - "lib": ["es5", "es6", "dom", "dom.iterable"], - "types": ["cypress"] - }, - "include": ["**/*.spec.ts"] -}