From 20407aa08f0087f87f4e1c10016368b1e459daf6 Mon Sep 17 00:00:00 2001 From: Anthony Viard Date: Mon, 26 Oct 2020 11:52:54 +0100 Subject: [PATCH 1/2] Add link step for the blueprint to avoid errors in test --- .github/workflows/generator.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generator.yml b/.github/workflows/generator.yml index 3a03c6af..34593e86 100644 --- a/.github/workflows/generator.yml +++ b/.github/workflows/generator.yml @@ -17,7 +17,7 @@ jobs: with: node-version: '12' - run: npm ci - - run: npm run pretest + - run: npm link - run: npm run test if: >- !contains(github.event.head_commit.message, '[skip ci]') && From 19cf69012848eab1c2e7deeac2cee106fa90308e Mon Sep 17 00:00:00 2001 From: Anthony Viard Date: Mon, 26 Oct 2020 12:17:37 +0100 Subject: [PATCH 2/2] Fix main class name in test --- test/server.spec.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/server.spec.js b/test/server.spec.js index a9a962f9..0808a4ed 100644 --- a/test/server.spec.js +++ b/test/server.spec.js @@ -5,6 +5,7 @@ const constants = require('generator-jhipster/generators/generator-constants'); const expectedFiles = require('./utils/expected-files'); const appBaseName = 'entandoPlugin'; +const mainClassName = 'EntandoPluginApp'; const { DOCKER_DIR, SERVER_MAIN_SRC_DIR, SERVER_MAIN_RES_DIR } = constants; describe('Subgenerator server of entando JHipster blueprint', () => { @@ -311,7 +312,7 @@ describe('Subgenerator server of entando JHipster blueprint', () => { it('Main application file contains Entando modification', () => { assert.fileContent( - `${SERVER_MAIN_SRC_DIR}com/mycompany/myapp/${appBaseName}App.java`, + `${SERVER_MAIN_SRC_DIR}com/mycompany/myapp/${mainClassName}.java`, 'implements InitializingBean', ); });