Repository: jhipster/generator-jhipster
Pull request #11376 (2020-02-23 18:46:04)

Export supported client-framework string literals as constants
Export supported client-framework string literals as constants so 3rd-party modules and blueprints can use them.

-   [x] [All continuous integration tests](https://github.com/jhipster/generator-jhipster/actions) are green
-   [x] Tests are added where necessary
-   [x] Documentation is added/updated where necessary
-   [x] Coding Rules & Commit Guidelines as per our [CONTRIBUTING.md document](https://github.com/jhipster/generator-jhipster/blob/master/CONTRIBUTING.md) are followed


vivekmore: I have taken a note of the ci build failures.
Before I fix those, I'd like to know if the underlying suggestion is indeed acceptable to the JHipster team.

Patch:
diff --git a/cli/import-jdl.js b/cli/import-jdl.js
index 10bfcd1626..b361c1e964 100644
--- a/cli/import-jdl.js
+++ b/cli/import-jdl.js
@@ -31,9 +31,12 @@ const jhipsterUtils = require('../generators/utils');
 
 const packagejs = require('../package.json');
 const statistics = require('../generators/statistics');
+const constants = require('../generators/generator-constants');
 
 const runYeomanProcess = require.resolve('./run-yeoman-process.js');
 
+const ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
+
 // holds the state of generation for interactive mode
 const generationCompletionState = {
     exportedEntities: {},
@@ -278,7 +281,7 @@ class JDLProcessor {
             this.devDatabaseType = configuration.devDatabaseType || this.options.db;
             this.skipClient = configuration.skipClient;
             this.clientFramework = configuration.clientFramework;
-            this.clientFramework = this.clientFramework || 'angularX';
+            this.clientFramework = this.clientFramework || ANGULAR;
             this.clientPackageManager = configuration.clientPackageManager;
             if (!this.clientPackageManager) {
                 if (this.useNpm) {
diff --git a/generators/ci-cd/index.js b/generators/ci-cd/index.js
index 3876cb9ae0..c15e53e006 100644
--- a/generators/ci-cd/index.js
+++ b/generators/ci-cd/index.js
@@ -24,6 +24,8 @@ const statistics = require('../statistics');
 const packagejs = require('../../package.json');
 const constants = require('../generator-constants');
 
+const REACT = constants.SUPPORTED_CLIENT_FRAMEWORKS.REACT;
+
 module.exports = class extends BaseGenerator {
     constructor(args, opts) {
         super(args, opts);
@@ -138,7 +140,7 @@ module.exports = class extends BaseGenerator {
                 this.gitLabIndent = this.sendBuildToGitlab ? '    ' : '';
                 this.indent = this.insideDocker ? '    ' : '';
                 this.indent += this.gitLabIndent;
-                if (this.clientFramework === 'react') {
+                if (this.clientFramework === REACT) {
                     this.frontTestCommand = 'test-ci';
                 } else {
                     this.frontTestCommand = 'test';
diff --git a/generators/cleanup.js b/generators/cleanup.js
index 40d0e2dd00..14a7960de3 100644
--- a/generators/cleanup.js
+++ b/generators/cleanup.js
@@ -23,6 +23,8 @@ const ANGULAR_DIR = constants.ANGULAR_DIR;
 const CLIENT_MAIN_SRC_DIR = constants.CLIENT_MAIN_SRC_DIR;
 const CLIENT_TEST_SRC_DIR = constants.CLIENT_TEST_SRC_DIR;
 const SERVER_MAIN_RES_DIR = constants.SERVER_MAIN_RES_DIR;
+const ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
+const REACT = constants.SUPPORTED_CLIENT_FRAMEWORKS.REACT;
 
 module.exports = {
     cleanupOldFiles,
@@ -77,7 +79,7 @@ function cleanupOldFiles(generator) {
         generator.removeFile(`${ANGULAR_DIR}admin/metrics/metrics-modal.component.ts`);
         generator.removeFile(`${CLIENT_TEST_SRC_DIR}spec/app/admin/metrics/metrics-modal.component.spec.ts`);
     }
-    if (generator.isJhipsterVersionLessThan('6.3.0') && generator.configOptions && generator.configOptions.clientFramework === 'angularX') {
+    if (generator.isJhipsterVersionLessThan('6.3.0') && generator.configOptions && generator.configOptions.clientFramework === ANGULAR) {
         generator.removeFile(`${ANGULAR_DIR}account/index.ts`);
         generator.removeFile(`${ANGULAR_DIR}admin/index.ts`);
         generator.removeFile(`${ANGULAR_DIR}core/index.ts`);
@@ -87,16 +89,16 @@ function cleanupOldFiles(generator) {
         generator.removeFile(`${ANGULAR_DIR}shared/shared-common.module.ts`);
     }
 
-    if (generator.isJhipsterVersionLessThan('6.3.0') && generator.configOptions && generator.configOptions.clientFramework === 'react') {
+    if (generator.isJhipsterVersionLessThan('6.3.0') && generator.configOptions && generator.configOptions.clientFramework === REACT) {
         generator.removeFile('tslint.json');
     }
 
-    if (generator.isJhipsterVersionLessThan('6.4.0') && generator.configOptions && generator.configOptions.clientFramework === 'angularX') {
+    if (generator.isJhipsterVersionLessThan('6.4.0') && generator.configOptions && generator.configOptions.clientFramework === ANGULAR) {
         generator.removeFile(`${ANGULAR_DIR}admin/admin.route.ts`);
         generator.removeFile(`${ANGULAR_DIR}admin/admin.module.ts`);
     }
 
-    if (generator.isJhipsterVersionLessThan('6.6.1') && generator.configOptions && generator.configOptions.clientFramework === 'angularX') {
+    if (generator.isJhipsterVersionLessThan('6.6.1') && generator.configOptions && generator.configOptions.clientFramework === ANGULAR) {
         generator.removeFile(`${ANGULAR_DIR}core/language/language.helper.ts`);
     }
 }
diff --git a/generators/client/index.js b/generators/client/index.js
index caec750967..d7d6bc549f 100644
--- a/generators/client/index.js
+++ b/generators/client/index.js
@@ -27,6 +27,9 @@ const packagejs = require('../../package.json');
 const constants = require('../generator-constants');
 const statistics = require('../statistics');
 
+const ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
+const REACT = constants.SUPPORTED_CLIENT_FRAMEWORKS.REACT;
+
 let useBlueprints;
 
 module.exports = class extends BaseBlueprintGenerator {
@@ -92,11 +95,11 @@ module.exports = class extends BaseBlueprintGenerator {
                 this.clientFramework = configuration.get('clientFramework');
                 if (!this.clientFramework) {
                     /* for backward compatibility */
-                    this.clientFramework = 'angularX';
+                    this.clientFramework = ANGULAR;
                 }
                 if (this.clientFramework === 'angular' || this.clientFramework === 'angular2') {
                     /* for backward compatibility */
-                    this.clientFramework = 'angularX';
+                    this.clientFramework = ANGULAR;
                 }
 
                 this.clientTheme = configuration.get('clientTheme');
@@ -359,7 +362,7 @@ module.exports = class extends BaseBlueprintGenerator {
             write() {
                 if (this.skipClient) return;
                 switch (this.clientFramework) {
-                    case 'react':
+                    case REACT:
                         return writeReactFiles.call(this, useBlueprints);
                     default:
                         return writeAngularFiles.call(this, useBlueprints);
diff --git a/generators/client/prompts.js b/generators/client/prompts.js
index b98737c323..fbe56c025b 100644
--- a/generators/client/prompts.js
+++ b/generators/client/prompts.js
@@ -17,6 +17,10 @@
  * limitations under the License.
  */
 const chalk = require('chalk');
+const constants = require('../generator-constants');
+
+const ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
+const REACT = constants.SUPPORTED_CLIENT_FRAMEWORKS.REACT;
 
 module.exports = {
     askForModuleName,
@@ -39,11 +43,11 @@ function askForClient(meta) {
 
     const choices = [
         {
-            value: 'angularX',
+            value: ANGULAR,
             name: 'Angular'
         },
         {
-            value: 'react',
+            value: REACT,
             name: 'React'
         },
         {
@@ -58,7 +62,7 @@ function askForClient(meta) {
         when: response => applicationType !== 'microservice' && applicationType !== 'uaa',
         message: `Which ${chalk.yellow('*Framework*')} would you like to use for the client?`,
         choices,
-        default: 'angularX'
+        default: ANGULAR
     };
 
     if (meta) return PROMPT; // eslint-disable-line consistent-return
diff --git a/generators/entity-client/files.js b/generators/entity-client/files.js
index a815ef31e4..c6d9b57524 100644
--- a/generators/entity-client/files.js
+++ b/generators/entity-client/files.js
@@ -28,6 +28,8 @@ const Randexp = utils.RandexpWithFaker;
 const CLIENT_TEST_SRC_DIR = constants.CLIENT_TEST_SRC_DIR;
 const ANGULAR_DIR = constants.ANGULAR_DIR;
 const REACT_DIR = constants.ANGULAR_DIR;
+const ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
+const REACT = constants.SUPPORTED_CLIENT_FRAMEWORKS.REACT;
 
 const CLIENT_NG2_TEMPLATES_DIR = 'angular';
 const CLIENT_REACT_TEMPLATES_DIR = 'react';
@@ -313,12 +315,12 @@ function writeFiles() {
             let templatesDir;
             let microserviceName = this.microserviceName;
 
-            if (this.clientFramework === 'angularX') {
+            if (this.clientFramework === ANGULAR) {
                 files = angularFiles;
                 destDir = ANGULAR_DIR;
                 templatesDir = CLIENT_NG2_TEMPLATES_DIR;
                 microserviceName = this.microserviceName;
-            } else if (this.clientFramework === 'react') {
+            } else if (this.clientFramework === REACT) {
                 files = reactFiles;
                 destDir = REACT_DIR;
                 templatesDir = CLIENT_REACT_TEMPLATES_DIR;
diff --git a/generators/entity/index.js b/generators/entity/index.js
index 6ca0e97953..2ce2819a94 100644
--- a/generators/entity/index.js
+++ b/generators/entity/index.js
@@ -29,6 +29,7 @@ const statistics = require('../statistics');
 
 /* constants used throughout */
 const SUPPORTED_VALIDATION_RULES = constants.SUPPORTED_VALIDATION_RULES;
+const ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
 let useBlueprints;
 
 class EntityGenerator extends BaseBlueprintGenerator {
@@ -186,7 +187,7 @@ class EntityGenerator extends BaseBlueprintGenerator {
 
                 context.clientFramework = configuration.get('clientFramework');
                 if (!context.clientFramework) {
-                    context.clientFramework = 'angularX';
+                    context.clientFramework = ANGULAR;
                 }
                 context.clientPackageManager = configuration.get('clientPackageManager');
                 if (!context.clientPackageManager) {
@@ -1145,7 +1146,7 @@ class EntityGenerator extends BaseBlueprintGenerator {
                 if (this.isJhipsterVersionLessThan('5.0.0')) {
                     this.removeFile(`${constants.ANGULAR_DIR}entities/${entityName}/${entityName}.model.ts`);
                 }
-                if (this.isJhipsterVersionLessThan('6.3.0') && context.clientFramework === 'angularX') {
+                if (this.isJhipsterVersionLessThan('6.3.0') && context.clientFramework === ANGULAR) {
                     this.removeFile(`${constants.ANGULAR_DIR}entities/${context.entityFolderName}/index.ts`);
                 }
             },
diff --git a/generators/entity/prompts.js b/generators/entity/prompts.js
index 02b08a7758..83349abc8a 100644
--- a/generators/entity/prompts.js
+++ b/generators/entity/prompts.js
@@ -21,6 +21,10 @@ const path = require('path');
 const _ = require('lodash');
 const jhiCore = require('jhipster-core');
 const shelljs = require('shelljs');
+const constants = require('../generator-constants');
+
+const ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
+const REACT = constants.SUPPORTED_CLIENT_FRAMEWORKS.REACT;
 
 module.exports = {
     askForMicroserviceJson,
@@ -488,10 +492,10 @@ function askForField(done) {
                 if (input === 'id' || fieldNamesUnderscored.includes(_.snakeCase(input))) {
                     return 'Your field name cannot use an already existing field name';
                 }
-                if ((clientFramework === undefined || clientFramework === 'angularX') && jhiCore.isReservedFieldName(input, 'angularX')) {
+                if ((clientFramework === undefined || clientFramework === ANGULAR) && jhiCore.isReservedFieldName(input, ANGULAR)) {
                     return 'Your field name cannot contain a Java or Angular reserved keyword';
                 }
-                if ((clientFramework !== undefined || clientFramework === 'react') && jhiCore.isReservedFieldName(input, 'react')) {
+                if ((clientFramework !== undefined || clientFramework === REACT) && jhiCore.isReservedFieldName(input, REACT)) {
                     return 'Your field name cannot contain a Java or React reserved keyword';
                 }
                 if (prodDatabaseType === 'oracle' && input.length > 30 && !skipCheckLengthOfIdentifier) {
diff --git a/generators/generator-base-private.js b/generators/generator-base-private.js
index 00e5f22673..6b95f2576b 100644
--- a/generators/generator-base-private.js
+++ b/generators/generator-base-private.js
@@ -35,6 +35,8 @@ const { prettierTransform, prettierOptions } = require('./generator-transforms')
 
 const CLIENT_MAIN_SRC_DIR = constants.CLIENT_MAIN_SRC_DIR;
 const SERVER_TEST_SRC_DIR = constants.SERVER_TEST_SRC_DIR;
+const ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
+const REACT = constants.SUPPORTED_CLIENT_FRAMEWORKS.REACT;
 
 /**
  * This is the Generator base private class.
@@ -212,7 +214,7 @@ module.exports = class extends Generator {
      * @param languages
      */
     updateLanguagesInLanguageConstantNG2(languages) {
-        if (this.clientFramework !== 'angularX') {
+        if (this.clientFramework !== ANGULAR) {
             return;
         }
         const fullPath = `${CLIENT_MAIN_SRC_DIR}app/core/language/language.constants.ts`;
@@ -284,7 +286,7 @@ module.exports = class extends Generator {
      */
     updateLanguagesInLanguagePipe(languages) {
         const fullPath =
-            this.clientFramework === 'angularX'
+            this.clientFramework === ANGULAR
                 ? `${CLIENT_MAIN_SRC_DIR}app/shared/language/find-language-from-key.pipe.ts`
                 : `${CLIENT_MAIN_SRC_DIR}/app/config/translation.ts`;
         try {
@@ -1083,13 +1085,13 @@ module.exports = class extends Generator {
      * @param {Array|Object} fields - array of fields
      * @returns {Array} defaultVariablesValues
      */
-    generateEntityClientFieldDefaultValues(fields, clientFramework = 'angularX') {
+    generateEntityClientFieldDefaultValues(fields, clientFramework = ANGULAR) {
         const defaultVariablesValues = {};
         fields.forEach(field => {
             const fieldType = field.fieldType;
             const fieldName = field.fieldName;
             if (fieldType === 'Boolean') {
-                if (clientFramework === 'react') {
+                if (clientFramework === REACT) {
                     defaultVariablesValues[fieldName] = `${fieldName}: false,`;
                 } else {
                     defaultVariablesValues[fieldName] = `this.${fieldName} = this.${fieldName} || false;`;
@@ -1221,7 +1223,7 @@ module.exports = class extends Generator {
                 const importType = `I${otherEntityAngularName}`;
                 let importPath;
                 if (otherEntityAngularName === 'User') {
-                    importPath = clientFramework === 'angularX' ? 'app/core/user/user.model' : 'app/shared/model/user.model';
+                    importPath = clientFramework === ANGULAR ? 'app/core/user/user.model' : 'app/shared/model/user.model';
                 } else {
                     importPath = `app/shared/model/${relationship.otherEntityClientRootFolder}${relationship.otherEntityFileName}.model`;
                 }
@@ -1303,7 +1305,7 @@ module.exports = class extends Generator {
      */
     generateLanguageOptions(languages, clientFramework) {
         const selectedLangs = this.getAllSupportedLanguageOptions().filter(lang => languages.includes(lang.value));
-        if (clientFramework === 'react') {
+        if (clientFramework === REACT) {
             return selectedLangs.map(lang => `'${lang.value}': { name: '${lang.dispName}'${lang.rtl ? ', rtl: true' : ''} }`);
         }
 
diff --git a/generators/generator-base.js b/generators/generator-base.js
index 48b26a05a8..c1480faa49 100644
--- a/generators/generator-base.js
+++ b/generators/generator-base.js
@@ -39,6 +39,8 @@ const GENERATOR_JHIPSTER = 'generator-jhipster';
 
 const CLIENT_MAIN_SRC_DIR = constants.CLIENT_MAIN_SRC_DIR;
 const SERVER_MAIN_RES_DIR = constants.SERVER_MAIN_RES_DIR;
+const ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
+const REACT = constants.SUPPORTED_CLIENT_FRAMEWORKS.REACT;
 
 /**
  * This is the Generator base class.
@@ -54,9 +56,9 @@ module.exports = class extends PrivateBase {
      * @param {string} iconName - The name of the Font Awesome icon.
      */
     addIcon(iconName, clientFramework) {
-        if (clientFramework === 'angularX') {
+        if (clientFramework === ANGULAR) {
             this.needleApi.clientAngular.addIcon(iconName);
-        } else if (clientFramework === 'react') {
+        } else if (clientFramework === REACT) {
             // React
             // TODO:
         }
@@ -71,9 +73,9 @@ module.exports = class extends PrivateBase {
      * @param {string} clientFramework - The name of the client framework
      */
     addElementToMenu(routerName, iconName, enableTranslation, clientFramework, translationKeyMenu = _.camelCase(routerName)) {
-        if (clientFramework === 'angularX') {
+        if (clientFramework === ANGULAR) {
             this.needleApi.clientAngular.addElementToMenu(routerName, iconName, enableTranslation, translationKeyMenu);
-        } else if (clientFramework === 'react') {
+        } else if (clientFramework === REACT) {
             // React
             // TODO:
         }
@@ -98,9 +100,9 @@ module.exports = class extends PrivateBase {
      * @param {string} clientFramework - The name of the client framework
      */
     addElementToAdminMenu(routerName, iconName, enableTranslation, clientFramework, translationKeyMenu = _.camelCase(routerName)) {
-        if (clientFramework === 'angularX') {
+        if (clientFramework === ANGULAR) {
             this.needleApi.clientAngular.addElementToAdminMenu(routerName, iconName, enableTranslation, translationKeyMenu);
-        } else if (clientFramework === 'react') {
+        } else if (clientFramework === REACT) {
             // React
             // TODO:
         }
@@ -115,9 +117,9 @@ module.exports = class extends PrivateBase {
      * @param {string} entityTranslationKeyMenu - i18n key for entity entry in menu
      */
     addEntityToMenu(routerName, enableTranslation, clientFramework, entityTranslationKeyMenu = _.camelCase(routerName)) {
-        if (this.clientFramework === 'angularX') {
+        if (this.clientFramework === ANGULAR) {
             this.needleApi.clientAngular.addEntityToMenu(routerName, enableTranslation, entityTranslationKeyMenu);
-        } else if (this.clientFramework === 'react') {
+        } else if (this.clientFramework === REACT) {
             this.needleApi.clientReact.addEntityToMenu(routerName, enableTranslation, entityTranslationKeyMenu);
         }
     }
@@ -144,7 +146,7 @@ module.exports = class extends PrivateBase {
         clientFramework,
         microServiceName
     ) {
-        if (clientFramework === 'angularX') {
+        if (clientFramework === ANGULAR) {
             this.needleApi.clientAngular.addEntityToModule(
                 entityInstance,
                 entityClass,
@@ -154,7 +156,7 @@ module.exports = class extends PrivateBase {
                 entityUrl,
                 microServiceName
             );
-        } else if (clientFramework === 'react') {
+        } else if (clientFramework === REACT) {
             this.needleApi.clientReact.addEntityToModule(entityInstance, entityClass, entityName, entityFolderName, entityFileName);
         }
     }
diff --git a/generators/generator-constants.js b/generators/generator-constants.js
index 7c66664dcb..2955692d2a 100644
--- a/generators/generator-constants.js
+++ b/generators/generator-constants.js
@@ -102,6 +102,11 @@ const CLIENT_DIST_DIR = 'static/';
 
 const SUPPORTED_VALIDATION_RULES = ['required', 'unique', 'max', 'min', 'maxlength', 'minlength', 'maxbytes', 'minbytes', 'pattern'];
 
+const SUPPORTED_CLIENT_FRAMEWORKS = {
+    ANGULAR: 'angularX',
+    REACT: 'react'
+};
+
 // documentation constants
 const JHIPSTER_DOCUMENTATION_URL = 'https://www.jhipster.tech';
 const JHIPSTER_DOCUMENTATION_ARCHIVE_PATH = '/documentation-archive/';
@@ -268,6 +273,9 @@ const constants = {
     MAIN_DIR,
     TEST_DIR,
 
+    // supported client frameworks
+    SUPPORTED_CLIENT_FRAMEWORKS,
+
     CLIENT_MAIN_SRC_DIR: `${MAIN_DIR}webapp/`,
     CLIENT_TEST_SRC_DIR: `${TEST_DIR}javascript/`,
     CLIENT_WEBPACK_DIR: 'webpack/',
diff --git a/generators/languages/index.js b/generators/languages/index.js
index 36d08c7cd3..8c33009fa0 100644
--- a/generators/languages/index.js
+++ b/generators/languages/index.js
@@ -22,9 +22,11 @@ const _ = require('lodash');
 const BaseBlueprintGenerator = require('../generator-base-blueprint');
 const prompts = require('./prompts');
 const statistics = require('../statistics');
-
 const constants = require('../generator-constants');
 
+const ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
+const REACT = constants.SUPPORTED_CLIENT_FRAMEWORKS.REACT;
+
 let useBlueprints;
 
 module.exports = class extends BaseBlueprintGenerator {
@@ -228,10 +230,10 @@ module.exports = class extends BaseBlueprintGenerator {
                     this.updateLanguagesInLanguagePipe(this.languages);
                     this.updateLanguagesInLanguageConstantNG2(this.languages);
                     this.updateLanguagesInWebpack(this.languages);
-                    if (this.clientFramework === 'angularX') {
+                    if (this.clientFramework === ANGULAR) {
                         this.updateLanguagesInMomentWebpackNgx(this.languages);
                     }
-                    if (this.clientFramework === 'react') {
+                    if (this.clientFramework === REACT) {
                         this.updateLanguagesInMomentWebpackReact(this.languages);
                     }
                 }
diff --git a/generators/server/files.js b/generators/server/files.js
index f450a9a0ec..b6df41361e 100644
--- a/generators/server/files.js
+++ b/generators/server/files.js
@@ -28,6 +28,7 @@ const SERVER_MAIN_SRC_DIR = constants.SERVER_MAIN_SRC_DIR;
 const SERVER_MAIN_RES_DIR = constants.SERVER_MAIN_RES_DIR;
 const SERVER_TEST_SRC_DIR = constants.SERVER_TEST_SRC_DIR;
 const SERVER_TEST_RES_DIR = constants.SERVER_TEST_RES_DIR;
+const REACT = constants.SUPPORTED_CLIENT_FRAMEWORKS.REACT;
 
 const shouldSkipUserManagement = generator =>
     generator.skipUserManagement && (generator.applicationType !== 'monolith' || generator.authenticationType !== 'oauth2');
@@ -201,7 +202,7 @@ const serverFiles = {
     ],
     serverResource: [
         {
-            condition: generator => generator.clientFramework === 'react',
+            condition: generator => generator.clientFramework === REACT,
             path: SERVER_MAIN_RES_DIR,
             templates: [
                 {
@@ -213,7 +214,7 @@ const serverFiles = {
             ]
         },
         {
-            condition: generator => generator.clientFramework !== 'react',
+            condition: generator => generator.clientFramework !== REACT,
             path: SERVER_MAIN_RES_DIR,
             templates: [{ file: 'banner.txt', method: 'copy', noEjs: true }]
         },


Test patch:
diff --git a/test/app.spec.js b/test/app.spec.js
index 4ec918deb5..c3caa0175b 100644
--- a/test/app.spec.js
+++ b/test/app.spec.js
@@ -9,6 +9,8 @@ const constants = require('../generators/generator-constants');
 const angularFiles = require('../generators/client/files-angular').files;
 const reactFiles = require('../generators/client/files-react').files;
 
+const ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
+const REACT = constants.SUPPORTED_CLIENT_FRAMEWORKS.REACT;
 const CLIENT_MAIN_SRC_DIR = constants.CLIENT_MAIN_SRC_DIR;
 const SERVER_MAIN_SRC_DIR = constants.SERVER_MAIN_SRC_DIR;
 const SERVER_MAIN_RES_DIR = constants.SERVER_MAIN_RES_DIR;
@@ -23,7 +25,7 @@ describe('JHipster generator', () => {
                     .withOptions({ 'from-cli': true, skipInstall: true, skipChecks: true, jhiPrefix: 'test' })
                     .withPrompts({
                         baseName: 'jhipster',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
                         serviceDiscoveryType: false,
@@ -92,7 +94,7 @@ describe('JHipster generator', () => {
                     })
                     .withPrompts({
                         baseName: 'jhipster',
-                        clientFramework: 'react',
+                        clientFramework: REACT,
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
                         serviceDiscoveryType: false,
@@ -151,7 +153,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: false,
                         authenticationType: 'jwt',
                         cacheProvider: 'ehcache',
@@ -206,7 +208,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: false,
                         authenticationType: 'jwt',
                         cacheProvider: 'ehcache',
@@ -255,7 +257,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: false,
                         authenticationType: 'jwt',
                         cacheProvider: 'ehcache',
@@ -305,7 +307,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: false,
                         authenticationType: 'jwt',
                         cacheProvider: 'no',
@@ -344,7 +346,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: false,
                         authenticationType: 'jwt',
                         cacheProvider: 'no',
@@ -383,7 +385,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: false,
                         authenticationType: 'jwt',
                         cacheProvider: 'no',
@@ -422,7 +424,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: false,
                         authenticationType: 'jwt',
                         cacheProvider: 'no',
@@ -463,7 +465,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: false,
                         authenticationType: 'jwt',
                         cacheProvider: 'no',
@@ -502,7 +504,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: false,
                         authenticationType: 'jwt',
                         cacheProvider: 'no',
@@ -536,7 +538,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: false,
                         authenticationType: 'jwt',
                         cacheProvider: 'no',
@@ -615,7 +617,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: false,
                         authenticationType: 'oauth2',
                         cacheProvider: 'ehcache',
@@ -653,7 +655,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: false,
                         authenticationType: 'oauth2',
                         cacheProvider: 'ehcache',
@@ -689,7 +691,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: false,
                         authenticationType: 'oauth2',
                         cacheProvider: 'ehcache',
@@ -723,7 +725,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: false,
                         authenticationType: 'jwt',
                         cacheProvider: 'hazelcast',
@@ -834,7 +836,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: false,
                         authenticationType: 'jwt',
                         cacheProvider: 'memcached',
@@ -871,7 +873,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: false,
                         authenticationType: 'jwt',
                         cacheProvider: 'redis',
@@ -908,7 +910,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serverPort: '8080',
                         serviceDiscoveryType: false,
                         authenticationType: 'jwt',
@@ -953,7 +955,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serverPort: '8080',
                         serviceDiscoveryType: false,
                         authenticationType: 'jwt',
@@ -1001,7 +1003,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serverPort: '8080',
                         serviceDiscoveryType: false,
                         authenticationType: 'jwt',
@@ -1050,7 +1052,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.otherpackage',
                         packageFolder: 'com/otherpackage',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: false,
                         authenticationType: 'jwt',
                         cacheProvider: 'ehcache',
@@ -1084,7 +1086,7 @@ describe('JHipster generator', () => {
                         baseName: '21Points',
                         packageName: 'com.otherpackage',
                         packageFolder: 'com/otherpackage',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: false,
                         authenticationType: 'jwt',
                         cacheProvider: 'ehcache',
@@ -1120,7 +1122,7 @@ describe('JHipster generator', () => {
                         baseName: 'myapplication',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: false,
                         authenticationType: 'jwt',
                         cacheProvider: 'ehcache',
@@ -1155,7 +1157,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: false,
                         authenticationType: 'jwt',
                         cacheProvider: 'hazelcast',
@@ -1184,7 +1186,7 @@ describe('JHipster generator', () => {
                     .withOptions({ 'from-cli': true, skipInstall: true, skipChecks: true })
                     .withPrompts({
                         baseName: 'jhipster',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
                         serviceDiscoveryType: false,
@@ -1233,7 +1235,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: false,
                         authenticationType: 'jwt',
                         cacheProvider: 'ehcache',
@@ -1273,7 +1275,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: false,
                         authenticationType: 'session',
                         cacheProvider: 'ehcache',
@@ -1315,7 +1317,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serverPort: '8080',
                         authenticationType: 'jwt',
                         serviceDiscoveryType: false,
@@ -1365,7 +1367,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serverPort: '8080',
                         serviceDiscoveryType: false,
                         authenticationType: 'jwt',
@@ -1407,7 +1409,7 @@ describe('JHipster generator', () => {
                 .withOptions({ 'from-cli': true, skipInstall: true, skipServer: true, db: 'mysql', auth: 'jwt', skipChecks: true })
                 .withPrompts({
                     baseName: 'jhipster',
-                    clientFramework: 'angularX',
+                    clientFramework: ANGULAR,
                     packageName: 'com.mycompany.myapp',
                     packageFolder: 'com/mycompany/myapp',
                     serviceDiscoveryType: false,
@@ -1607,7 +1609,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: 'eureka',
                         authenticationType: 'jwt',
                         cacheProvider: 'ehcache',
@@ -1645,7 +1647,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: 'eureka',
                         authenticationType: 'jwt',
                         cacheProvider: 'hazelcast',
@@ -1720,7 +1722,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         authenticationType: 'jwt',
                         cacheProvider: 'ehcache',
                         enableHibernateCache: true,
@@ -1878,7 +1880,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: 'consul',
                         authenticationType: 'jwt',
                         cacheProvider: 'ehcache',
@@ -1915,7 +1917,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: 'consul',
                         authenticationType: 'jwt',
                         cacheProvider: 'hazelcast',
@@ -1990,7 +1992,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: false,
                         authenticationType: 'jwt',
                         cacheProvider: 'ehcache',
@@ -2027,7 +2029,7 @@ describe('JHipster generator', () => {
                         baseName: 'jhipster',
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         serviceDiscoveryType: false,
                         authenticationType: 'uaa',
                         uaaBaseName: 'jhipsterApp',
diff --git a/test/blueprint/app-blueprint.spec.js b/test/blueprint/app-blueprint.spec.js
index cc806148b0..b3ec079630 100644
--- a/test/blueprint/app-blueprint.spec.js
+++ b/test/blueprint/app-blueprint.spec.js
@@ -8,6 +8,9 @@ const expectedFiles = require('../utils/expected-files');
 const getFilesForOptions = require('../utils/utils').getFilesForOptions;
 const angularFiles = require('../../generators/client/files-angular').files;
 const jhipsterVersion = require('../../package').version;
+const constants = require('../../generators/generator-constants');
+
+const ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
 
 describe('JHipster application generator with blueprint', () => {
     describe('generate application with a version-compatible blueprint', () => {
@@ -36,7 +39,7 @@ describe('JHipster application generator with blueprint', () => {
                 })
                 .withPrompts({
                     baseName: 'jhipster',
-                    clientFramework: 'angularX',
+                    clientFramework: ANGULAR,
                     packageName: 'com.mycompany.myapp',
                     packageFolder: 'com/mycompany/myapp',
                     serviceDiscoveryType: false,
@@ -102,7 +105,7 @@ describe('JHipster application generator with blueprint', () => {
                 })
                 .withPrompts({
                     baseName: 'jhipster',
-                    clientFramework: 'angularX',
+                    clientFramework: ANGULAR,
                     packageName: 'com.mycompany.myapp',
                     packageFolder: 'com/mycompany/myapp',
                     serviceDiscoveryType: false,
@@ -153,7 +156,7 @@ describe('JHipster application generator with blueprint', () => {
                 })
                 .withPrompts({
                     baseName: 'jhipster',
-                    clientFramework: 'angularX',
+                    clientFramework: ANGULAR,
                     packageName: 'com.mycompany.myapp',
                     packageFolder: 'com/mycompany/myapp',
                     serviceDiscoveryType: false,
@@ -219,7 +222,7 @@ describe('JHipster application generator with blueprint', () => {
                 })
                 .withPrompts({
                     baseName: 'jhipster',
-                    clientFramework: 'angularX',
+                    clientFramework: ANGULAR,
                     packageName: 'com.mycompany.myapp',
                     packageFolder: 'com/mycompany/myapp',
                     serviceDiscoveryType: false,
diff --git a/test/blueprint/client-blueprint.spec.js b/test/blueprint/client-blueprint.spec.js
index 596b3af103..c6ab006616 100644
--- a/test/blueprint/client-blueprint.spec.js
+++ b/test/blueprint/client-blueprint.spec.js
@@ -3,6 +3,9 @@ const assert = require('yeoman-assert');
 const helpers = require('yeoman-test');
 const expectedFiles = require('../utils/expected-files');
 const ClientGenerator = require('../../generators/client');
+const constants = require('../../generators/generator-constants');
+
+const ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
 
 const mockBlueprintSubGen = class extends ClientGenerator {
     constructor(args, opts) {
@@ -71,7 +74,7 @@ describe('JHipster client generator with blueprint', () => {
                     .withGenerators([[mockBlueprintSubGen, 'jhipster-myblueprint:client']])
                     .withPrompts({
                         baseName: 'jhipster',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         enableTranslation: true,
                         nativeLanguage: 'en',
                         languages: ['fr']
@@ -103,7 +106,7 @@ describe('JHipster client generator with blueprint', () => {
                 .withGenerators([[helpers.createDummyGenerator(), 'jhipster-myblueprint:client']])
                 .withPrompts({
                     baseName: 'jhipster',
-                    clientFramework: 'angularX',
+                    clientFramework: ANGULAR,
                     enableTranslation: true,
                     nativeLanguage: 'en',
                     languages: ['fr']
diff --git a/test/blueprint/multiple-app-blueprints.spec.js b/test/blueprint/multiple-app-blueprints.spec.js
index 856b8df83b..52acf5f26a 100644
--- a/test/blueprint/multiple-app-blueprints.spec.js
+++ b/test/blueprint/multiple-app-blueprints.spec.js
@@ -7,6 +7,9 @@ const ClientGenerator = require('../../generators/client');
 const ServerGenerator = require('../../generators/server');
 const CommonGenerator = require('../../generators/common');
 const LanguagesGenerator = require('../../generators/languages');
+const constants = require('../../generators/generator-constants');
+
+const ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
 
 const createMockBlueprint = function(parent, spy) {
     return class extends parent {
@@ -69,7 +72,7 @@ const options = {
 
 const prompts = {
     baseName: 'jhipster',
-    clientFramework: 'angularX',
+    clientFramework: ANGULAR,
     packageName: 'com.mycompany.myapp',
     packageFolder: 'com/mycompany/myapp',
     serviceDiscoveryType: false,
diff --git a/test/blueprint/multiple-blueprints.spec.js b/test/blueprint/multiple-blueprints.spec.js
index 73f91c79f3..c71603e022 100644
--- a/test/blueprint/multiple-blueprints.spec.js
+++ b/test/blueprint/multiple-blueprints.spec.js
@@ -5,6 +5,9 @@ const helpers = require('yeoman-test');
 const expectedFiles = require('../utils/expected-files');
 const ClientGenerator = require('../../generators/client');
 const ServerGenerator = require('../../generators/server');
+const constants = require('../../generators/generator-constants');
+
+const ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
 
 const mockClientBlueprintSubGen = class extends ClientGenerator {
     constructor(args, opts) {
@@ -127,7 +130,7 @@ describe('JHipster entity generator with multiple blueprints', () => {
                     ])
                     .withPrompts({
                         baseName: 'jhipster',
-                        clientFramework: 'angularX',
+                        clientFramework: ANGULAR,
                         packageName: 'com.mycompany.myapp',
                         packageFolder: 'com/mycompany/myapp',
                         serviceDiscoveryType: false,
diff --git a/test/blueprint/scoped-blueprint.spec.js b/test/blueprint/scoped-blueprint.spec.js
index 4491f4c284..a1ac61100c 100644
--- a/test/blueprint/scoped-blueprint.spec.js
+++ b/test/blueprint/scoped-blueprint.spec.js
@@ -5,6 +5,9 @@ const fse = require('fs-extra');
 const expectedFiles = require('../utils/expected-files');
 const getFilesForOptions = require('../utils/utils').getFilesForOptions;
 const angularFiles = require('../../generators/client/files-angular').files;
+const constants = require('../../generators/generator-constants');
+
+const ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
 
 describe('JHipster application generator with scoped blueprint', () => {
     describe('generate monolith application with scoped blueprint', () => {
@@ -25,7 +28,7 @@ describe('JHipster application generator with scoped blueprint', () => {
                 })
                 .withPrompts({
                     baseName: 'jhipster',
-                    clientFramework: 'angularX',
+                    clientFramework: ANGULAR,
                     packageName: 'com.mycompany.myapp',
                     packageFolder: 'com/mycompany/myapp',
                     serviceDiscoveryType: false,
diff --git a/test/client.spec.js b/test/client.spec.js
index f9f2a54fb4..fffbd03cd0 100644
--- a/test/client.spec.js
+++ b/test/client.spec.js
@@ -5,6 +5,10 @@ const getFilesForOptions = require('./utils/utils').getFilesForOptions;
 const expectedFiles = require('./utils/expected-files');
 const angularFiles = require('../generators/client/files-angular').files;
 const reactFiles = require('../generators/client/files-react').files;
+const constants = require('../generators/generator-constants');
+
+const ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
+const REACT = constants.SUPPORTED_CLIENT_FRAMEWORKS.REACT;
 
 describe('JHipster client generator', () => {
     describe('generate client with React', () => {
@@ -18,7 +22,7 @@ describe('JHipster client generator', () => {
                     enableTranslation: true,
                     nativeLanguage: 'en',
                     languages: ['fr'],
-                    clientFramework: 'react'
+                    clientFramework: REACT
                 })
                 .on('end', done);
         });
@@ -49,7 +53,7 @@ describe('JHipster client generator', () => {
                     enableTranslation: true,
                     nativeLanguage: 'en',
                     languages: ['fr'],
-                    clientFramework: 'angularX'
+                    clientFramework: ANGULAR
                 })
                 .on('end', done);
         });
@@ -87,7 +91,7 @@ describe('JHipster client generator', () => {
                     enableTranslation: true,
                     nativeLanguage: 'en',
                     languages: ['fr'],
-                    clientFramework: 'angularX'
+                    clientFramework: ANGULAR
                 })
                 .on('end', done);
         });
diff --git a/test/generator-base-private.spec.js b/test/generator-base-private.spec.js
index 745e5b3c31..2e3267d8c2 100644
--- a/test/generator-base-private.spec.js
+++ b/test/generator-base-private.spec.js
@@ -2,6 +2,10 @@ const path = require('path');
 const expect = require('chai').expect;
 // using base generator which extends the private base
 const BaseGenerator = require('../generators/generator-base').prototype;
+const constants = require('../generators/generator-constants');
+
+const ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
+const REACT = constants.SUPPORTED_CLIENT_FRAMEWORKS.REACT;
 
 BaseGenerator.log = msg => {
     // eslint-disable-next-line no-console
@@ -117,8 +121,8 @@ export * from './entityFolderName/entityFileName.state';`;
                 ];
 
                 before(() => {
-                    importsForAngular = BaseGenerator.generateEntityClientImports(relationships, 'no', 'angularX');
-                    importsForReact = BaseGenerator.generateEntityClientImports(relationships, 'no', 'react');
+                    importsForAngular = BaseGenerator.generateEntityClientImports(relationships, 'no', ANGULAR);
+                    importsForReact = BaseGenerator.generateEntityClientImports(relationships, 'no', REACT);
                 });
 
                 it('adds the same imports regardless of the client framework', () => {
diff --git a/test/needle-api/needle-client-angular.spec.js b/test/needle-api/needle-client-angular.spec.js
index 36297e56a1..44547fa8c2 100644
--- a/test/needle-api/needle-client-angular.spec.js
+++ b/test/needle-api/needle-client-angular.spec.js
@@ -5,6 +5,7 @@ const helpers = require('yeoman-test');
 const ClientGenerator = require('../../generators/client');
 const constants = require('../../generators/generator-constants');
 
+const ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
 const CLIENT_MAIN_SRC_DIR = constants.CLIENT_MAIN_SRC_DIR;
 
 const mockBlueprintSubGen = class extends ClientGenerator {
@@ -45,9 +46,9 @@ const mockBlueprintSubGen = class extends ClientGenerator {
                 this.addVendorSCSSStyle('@import style_without_comment');
             },
             addToMenuStep() {
-                this.addElementToMenu('routerName1', 'iconName1', true, 'angularX');
-                this.addElementToAdminMenu('routerName2', 'iconName2', true, 'angularX');
-                this.addEntityToMenu('routerName3', true, 'angularX', 'routerName3');
+                this.addElementToMenu('routerName1', 'iconName1', true, ANGULAR);
+                this.addElementToAdminMenu('routerName2', 'iconName2', true, ANGULAR);
+                this.addEntityToMenu('routerName3', true, ANGULAR, 'routerName3');
             },
             addToModuleStep() {
                 this.addEntityToModule(
@@ -57,11 +58,11 @@ const mockBlueprintSubGen = class extends ClientGenerator {
                     'entityFolderName',
                     'entityFileName',
                     'entityUrl',
-                    'angularX',
+                    ANGULAR,
                     'microServiceName'
                 );
-                this.addAdminToModule('appName', 'adminAngularName', 'adminFolderName', 'adminFileName', true, 'angularX');
-                this.addAngularModule('appName', 'angularName', 'folderName', 'fileName', true, 'angularX');
+                this.addAdminToModule('appName', 'adminAngularName', 'adminFolderName', 'adminFileName', true, ANGULAR);
+                this.addAngularModule('appName', 'angularName', 'folderName', 'fileName', true, ANGULAR);
                 this.addAdminRoute('entity-audit', './entity-audit/entity-audit.module', 'EntityAuditModule');
             }
         };
@@ -93,7 +94,7 @@ describe('needle API Angular: JHipster client generator with blueprint', () => {
             .withGenerators([[mockBlueprintSubGen, 'jhipster-myblueprint:client']])
             .withPrompts({
                 baseName: 'jhipster',
-                clientFramework: 'angularX',
+                clientFramework: ANGULAR,
                 enableTranslation: true,
                 nativeLanguage: 'en',
                 languages: ['fr']
diff --git a/test/needle-api/needle-client-i18n.spec.js b/test/needle-api/needle-client-i18n.spec.js
index 36109a5895..090b888441 100644
--- a/test/needle-api/needle-client-i18n.spec.js
+++ b/test/needle-api/needle-client-i18n.spec.js
@@ -5,6 +5,7 @@ const fse = require('fs-extra');
 const LanguagesGenerator = require('../../generators/languages');
 const constants = require('../../generators/generator-constants');
 
+const ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
 const CLIENT_MAIN_SRC_DIR = constants.CLIENT_MAIN_SRC_DIR;
 
 const mockBlueprintSubGen = class extends LanguagesGenerator {
@@ -77,7 +78,7 @@ describe('needle API i18n: JHipster language generator with blueprint', () => {
             .withGenerators([[mockBlueprintSubGen, 'jhipster-myblueprint:languages']])
             .withPrompts({
                 baseName: 'jhipster',
-                clientFramework: 'angularX',
+                clientFramework: ANGULAR,
                 enableTranslation: true,
                 nativeLanguage: 'en',
                 languages: ['en', 'fr']
diff --git a/test/needle-api/needle-client-react.spec.js b/test/needle-api/needle-client-react.spec.js
index 2cb66bd328..4cbeff3e73 100644
--- a/test/needle-api/needle-client-react.spec.js
+++ b/test/needle-api/needle-client-react.spec.js
@@ -4,6 +4,7 @@ const helpers = require('yeoman-test');
 const ClientGenerator = require('../../generators/client');
 const constants = require('../../generators/generator-constants');
 
+const REACT = constants.SUPPORTED_CLIENT_FRAMEWORKS.REACT;
 const CLIENT_MAIN_SRC_DIR = constants.CLIENT_MAIN_SRC_DIR;
 
 const mockBlueprintSubGen = class extends ClientGenerator {
@@ -46,7 +47,7 @@ const mockBlueprintSubGen = class extends ClientGenerator {
                 this.addAppSCSSStyle('@import with-comment', 'my comment');
             },
             addEntityToMenuStep() {
-                this.addEntityToMenu('routerName', false, 'react', false);
+                this.addEntityToMenu('routerName', false, REACT, false);
             },
             addEntityToModuleStep() {
                 this.addEntityToModule(
@@ -56,7 +57,7 @@ const mockBlueprintSubGen = class extends ClientGenerator {
                     'entityFolderName',
                     'entityFileName',
                     'entityUrl',
-                    'react',
+                    REACT,
                     'microServiceNam'
                 );
             }
@@ -81,7 +82,7 @@ describe('needle API React: JHipster client generator with blueprint', () => {
             .withGenerators([[mockBlueprintSubGen, 'jhipster-myblueprint:client']])
             .withPrompts({
                 baseName: 'jhipster',
-                clientFramework: 'react',
+                clientFramework: REACT,
                 enableTranslation: true,
                 nativeLanguage: 'en',
                 languages: ['en', 'fr']
diff --git a/test/needle-api/needle-client-webpack.spec.js b/test/needle-api/needle-client-webpack.spec.js
index fa191692c9..6aa882ab38 100644
--- a/test/needle-api/needle-client-webpack.spec.js
+++ b/test/needle-api/needle-client-webpack.spec.js
@@ -4,6 +4,7 @@ const helpers = require('yeoman-test');
 const ClientGenerator = require('../../generators/client');
 const constants = require('../../generators/generator-constants');
 
+const ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
 const CLIENT_WEBPACK_DIR = constants.CLIENT_WEBPACK_DIR;
 const assetFrom = 'source';
 const assetTo = 'target';
@@ -66,7 +67,7 @@ describe('needle API Webpack: JHipster client generator with blueprint', () => {
             .withGenerators([[mockBlueprintSubGen, 'jhipster-myblueprint:client']])
             .withPrompts({
                 baseName: 'jhipster',
-                clientFramework: 'angularX',
+                clientFramework: ANGULAR,
                 enableTranslation: true,
                 nativeLanguage: 'en',
                 languages: ['en', 'fr']
diff --git a/test/needle-api/needle-client.spec.js b/test/needle-api/needle-client.spec.js
index cd159e3ffd..48efbb36a3 100644
--- a/test/needle-api/needle-client.spec.js
+++ b/test/needle-api/needle-client.spec.js
@@ -4,6 +4,7 @@ const helpers = require('yeoman-test');
 const ClientGenerator = require('../../generators/client');
 const constants = require('../../generators/generator-constants');
 
+const ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
 const CLIENT_MAIN_SRC_DIR = constants.CLIENT_MAIN_SRC_DIR;
 
 const mockBlueprintSubGen = class extends ClientGenerator {
@@ -64,7 +65,7 @@ describe('needle API Client: JHipster client generator with blueprint', () => {
             .withGenerators([[mockBlueprintSubGen, 'jhipster-myblueprint:client']])
             .withPrompts({
                 baseName: 'jhipster',
-                clientFramework: 'angularX',
+                clientFramework: ANGULAR,
                 enableTranslation: true,
                 nativeLanguage: 'en',
                 languages: ['en', 'fr']
diff --git a/test/upgrade.spec.js b/test/upgrade.spec.js
index eaa124a81e..053aa1b8a0 100644
--- a/test/upgrade.spec.js
+++ b/test/upgrade.spec.js
@@ -6,6 +6,9 @@ const fse = require('fs-extra');
 const expect = require('chai').expect;
 const expectedFiles = require('./utils/expected-files');
 const packageJson = require('../package.json');
+const constants = require('../generators/generator-constants');
+
+const ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
 
 describe('JHipster upgrade generator', function() {
     this.timeout(400000);
@@ -24,7 +27,7 @@ describe('JHipster upgrade generator', function() {
                 })
                 .withPrompts({
                     baseName: 'jhipster',
-                    clientFramework: 'angularX',
+                    clientFramework: ANGULAR,
                     packageName: 'com.mycompany.myapp',
                     packageFolder: 'com/mycompany/myapp',
                     serviceDiscoveryType: false,
@@ -110,7 +113,7 @@ describe('JHipster upgrade generator', function() {
                 })
                 .withPrompts({
                     baseName: 'jhipster',
-                    clientFramework: 'angularX',
+                    clientFramework: ANGULAR,
                     packageName: 'com.mycompany.myapp',
                     packageFolder: 'com/mycompany/myapp',
                     serviceDiscoveryType: false,