From 70b7bb0f339bb017ff701d76faca38ce4ab73a04 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 15 Sep 2025 11:44:07 +0200 Subject: [PATCH] Bug 38201: Move cypress components under t/cypress (cherry picked from commit 5cf8a60eb99e37abc365639d05e9da9ca931f7d6) Signed-off-by: Michaela Sieber Signed-off-by: Jonathan Druart Signed-off-by: Lucas Gass --- cypress.config.ts | 2 +- rspack.config.js | 3 ++- .../cypress/component}/ShowElementComponentType.vue | 0 t/cypress/component/ShowElement_spec.ts | 3 ++- .../Cypress => t/cypress/component}/UseBaseResource.vue | 2 +- t/cypress/component/baseResource.ts | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) rename {koha-tmpl/intranet-tmpl/prog/js/vue/components/Cypress => t/cypress/component}/ShowElementComponentType.vue (100%) rename {koha-tmpl/intranet-tmpl/prog/js/vue/components/Cypress => t/cypress/component}/UseBaseResource.vue (80%) diff --git a/cypress.config.ts b/cypress.config.ts index 42aa4d7a81..e8a4bf5ca9 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -31,7 +31,7 @@ export default defineConfig({ }); }, indexHtmlFile: "t/cypress/support/component-index.html", - specPattern: "t/cypress/component/**/*.*", + specPattern: "t/cypress/component/**/*.ts", supportFile: "t/cypress/support/component.ts", }, }); diff --git a/rspack.config.js b/rspack.config.js index e344ca9a3c..e05273fb7b 100644 --- a/rspack.config.js +++ b/rspack.config.js @@ -15,6 +15,7 @@ module.exports = [ __dirname, "koha-tmpl/intranet-tmpl/prog/js/vue" ), + "@cypress": path.resolve(__dirname, "t/cypress"), }, }, entry: { @@ -44,7 +45,7 @@ module.exports = [ options: { experimentalInlineMatchResource: true, }, - exclude: [path.resolve(__dirname, "t/cypress/")], + //exclude: [path.resolve(__dirname, "t/cypress/")], }, { test: /\.ts$/, diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Cypress/ShowElementComponentType.vue b/t/cypress/component/ShowElementComponentType.vue similarity index 100% rename from koha-tmpl/intranet-tmpl/prog/js/vue/components/Cypress/ShowElementComponentType.vue rename to t/cypress/component/ShowElementComponentType.vue diff --git a/t/cypress/component/ShowElement_spec.ts b/t/cypress/component/ShowElement_spec.ts index 690d60df4d..139fb20728 100644 --- a/t/cypress/component/ShowElement_spec.ts +++ b/t/cypress/component/ShowElement_spec.ts @@ -226,7 +226,8 @@ describe("ShowElement", () => { showElement: { type: "component", hidden: () => true, - componentPath: "./Cypress/ShowElementComponentType.vue", + componentPath: + "t/cypress/component/ShowElementComponentType.vue", componentProps: { testString: { type: "string", diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Cypress/UseBaseResource.vue b/t/cypress/component/UseBaseResource.vue similarity index 80% rename from koha-tmpl/intranet-tmpl/prog/js/vue/components/Cypress/UseBaseResource.vue rename to t/cypress/component/UseBaseResource.vue index 78516523d9..984e366b54 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Cypress/UseBaseResource.vue +++ b/t/cypress/component/UseBaseResource.vue @@ -1,7 +1,7 @@