Repository: jhipster/jhipster-lite (java)

Issue:
Move cypress home test
Cypress home test is generated in `src/test/webapp/component/common/primary/app/Home.spec.ts`, should be in `src/test/webapp/component/home/Home.spec.ts`

Pull request:
Move cypress home test
Fix #10875 

Patch:
diff --git a/src/main/java/tech/jhipster/lite/generator/client/tools/cypress/domain/CypressModuleFactory.java b/src/main/java/tech/jhipster/lite/generator/client/tools/cypress/domain/CypressModuleFactory.java
index 1e2bd401c..f42fa84cd 100644
--- a/src/main/java/tech/jhipster/lite/generator/client/tools/cypress/domain/CypressModuleFactory.java
+++ b/src/main/java/tech/jhipster/lite/generator/client/tools/cypress/domain/CypressModuleFactory.java
@@ -19,7 +19,7 @@ public class CypressModuleFactory {
   private static final JHipsterDestination CYPRESS_COMPONENT_TESTS = to("src/test/webapp/component");
   private static final JHipsterDestination CYPRESS_E2E_TESTS = to("src/test/webapp/e2e");
 
-  private static final String PRIMARY_APP = "common/primary/app";
+  private static final String HOME = "home";
   private static final String UTILS = "utils";
 
   private static final String CYPRESS_COMPONENT_TESTS_EXCLUSION = "\"src/test/webapp/component/**/*.ts\"";
@@ -94,7 +94,7 @@ public class CypressModuleFactory {
           .addTemplate("cypress-config.ts")
           .addFile("tsconfig.json")
           .and()
-        .batch(SOURCE.append(PRIMARY_APP), destinationFolder.append(PRIMARY_APP))
+        .batch(SOURCE.append(HOME), destinationFolder.append(HOME))
           .addTemplate("Home.spec.ts")
           .and()
         .batch(SOURCE.append(UTILS), destinationFolder.append(UTILS))


Test patch:
diff --git a/src/main/resources/generator/client/common/cypress/common/primary/app/Home.spec.ts.mustache b/src/main/resources/generator/client/common/cypress/home/Home.spec.ts.mustache
similarity index 100%
rename from src/main/resources/generator/client/common/cypress/common/primary/app/Home.spec.ts.mustache
rename to src/main/resources/generator/client/common/cypress/home/Home.spec.ts.mustache
diff --git a/src/test/java/tech/jhipster/lite/generator/client/tools/cypress/domain/CypressModuleFactoryTest.java b/src/test/java/tech/jhipster/lite/generator/client/tools/cypress/domain/CypressModuleFactoryTest.java
index 7509d6f90..645f1878b 100644
--- a/src/test/java/tech/jhipster/lite/generator/client/tools/cypress/domain/CypressModuleFactoryTest.java
+++ b/src/test/java/tech/jhipster/lite/generator/client/tools/cypress/domain/CypressModuleFactoryTest.java
@@ -100,7 +100,7 @@ class CypressModuleFactoryTest {
         .containing("specPattern: 'src/test/webapp/component/**/*.(spec|cy).ts',")
         .and()
         .hasPrefixedFiles("src/test/webapp/component", "tsconfig.json")
-        .hasFiles("src/test/webapp/component/common/primary/app/Home.spec.ts")
+        .hasFiles("src/test/webapp/component/home/Home.spec.ts")
         .hasPrefixedFiles("src/test/webapp/component/utils", "Interceptor.ts", "DataSelector.ts");
     }
   }
@@ -175,7 +175,7 @@ class CypressModuleFactoryTest {
         .containing("specPattern: 'src/test/webapp/e2e/**/*.(spec|cy).ts',")
         .and()
         .hasPrefixedFiles("src/test/webapp/e2e", "tsconfig.json")
-        .hasFiles("src/test/webapp/e2e/common/primary/app/Home.spec.ts")
+        .hasFiles("src/test/webapp/e2e/home/Home.spec.ts")
         .hasPrefixedFiles("src/test/webapp/e2e/utils", "Interceptor.ts", "DataSelector.ts");
     }
   }