Repository: jhipster/generator-jhipster
Pull request #8055 (2018-08-01 03:14:09)

fix react webpack profile to look for correct file
React projects currently rebuild the frontend on every call to maven/gradle

- Please make sure the below checklist is followed for Pull Requests.

- [ ] [Travis tests](https://travis-ci.org/jhipster/generator-jhipster/pull_requests) 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

<!--
Please also reference the issue number in a commit message to [automatically close the related Github issue](https://help.github.com/articles/closing-issues-via-commit-messages/)

Note: It is also possible to add `[skip ci]` to your commit message to skip Travis tests
-->



Patch:
diff --git a/generators/client/files-angular.js b/generators/client/files-angular.js
index 2fffc3fd95..c21f56cb95 100644
--- a/generators/client/files-angular.js
+++ b/generators/client/files-angular.js
@@ -460,14 +460,7 @@ const files = {
                 'jest.ts',
                 'jest-global-mocks.ts',
                 'spec/test.module.ts',
-                'spec/app/admin/configuration/configuration.component.spec.ts',
-                'spec/app/admin/configuration/configuration.service.spec.ts',
                 'spec/app/admin/health/health.component.spec.ts',
-                'spec/app/admin/logs/logs.component.spec.ts',
-                'spec/app/admin/logs/logs.service.spec.ts',
-                'spec/app/admin/metrics/metrics.component.spec.ts',
-                'spec/app/admin/metrics/metrics.service.spec.ts',
-                'spec/app/admin/metrics/metrics-modal.component.spec.ts',
                 'spec/helpers/spyobject.ts',
                 'spec/helpers/mock-account.service.ts',
                 'spec/helpers/mock-principal.service.ts',
diff --git a/generators/client/templates/angular/src/main/webapp/app/shared/login/login.component.ts.ejs b/generators/client/templates/angular/src/main/webapp/app/shared/login/login.component.ts.ejs
index e094c530bf..dc18edde44 100644
--- a/generators/client/templates/angular/src/main/webapp/app/shared/login/login.component.ts.ejs
+++ b/generators/client/templates/angular/src/main/webapp/app/shared/login/login.component.ts.ejs
@@ -48,7 +48,7 @@ export class <%=jhiPrefixCapitalized%>LoginModalComponent implements AfterViewIn
     }
 
     ngAfterViewInit() {
-        setTimeout(() => this.renderer.invokeElementMethod(this.elementRef.nativeElement.querySelector('#username'), 'focus', []), 0);
+        this.renderer.invokeElementMethod(this.elementRef.nativeElement.querySelector('#username'), 'focus', []);
     }
 
     cancel() {
diff --git a/generators/client/templates/react/src/main/webapp/app/modules/account/activate/activate.tsx.ejs b/generators/client/templates/react/src/main/webapp/app/modules/account/activate/activate.tsx.ejs
index 5533b7f04d..65da4a2408 100644
--- a/generators/client/templates/react/src/main/webapp/app/modules/account/activate/activate.tsx.ejs
+++ b/generators/client/templates/react/src/main/webapp/app/modules/account/activate/activate.tsx.ejs
@@ -20,7 +20,7 @@ import React from 'react';
 import { connect } from 'react-redux';
 import { Link, RouteComponentProps } from 'react-router-dom';
 import { Row, Col, Alert } from 'reactstrap';
-import { Translate, getUrlParameter } from 'react-jhipster';
+import { Translate } from 'react-jhipster';
 
 import { IRootState } from 'app/shared/reducers';
 import { activateAction, reset } from './activate.reducer';
@@ -52,7 +52,7 @@ export class ActivatePage extends React.Component<IActivateProps> {
   }
 
   componentDidMount() {
-    const key = getUrlParameter('key', this.props.location.search);
+    const { key } = this.props.match.params;
     this.props.activateAction(key);
   }
 
diff --git a/generators/client/templates/react/src/main/webapp/app/modules/account/password-reset/finish/password-reset-finish.tsx.ejs b/generators/client/templates/react/src/main/webapp/app/modules/account/password-reset/finish/password-reset-finish.tsx.ejs
index b2fcb30248..c570f3b3ea 100644
--- a/generators/client/templates/react/src/main/webapp/app/modules/account/password-reset/finish/password-reset-finish.tsx.ejs
+++ b/generators/client/templates/react/src/main/webapp/app/modules/account/password-reset/finish/password-reset-finish.tsx.ejs
@@ -20,7 +20,7 @@ import React from 'react';
 import { connect } from 'react-redux';
 import { Alert, Col, Row, Button } from 'reactstrap';
 import { AvForm, AvField } from 'availity-reactstrap-validation';
-import { Translate, translate, getUrlParameter } from 'react-jhipster';
+import { Translate, translate } from 'react-jhipster';
 import { RouteComponentProps } from 'react-router-dom';
 
 import { IRootState } from 'app/shared/reducers';
@@ -37,7 +37,7 @@ export interface IPasswordResetFinishState {
 export class PasswordResetFinishPage extends React.Component<IPasswordResetFinishProps, IPasswordResetFinishState> {
   state: IPasswordResetFinishState = {
     password: '',
-    key: getUrlParameter('key', this.props.location.search)
+    key: this.props.match.params.key
   };
 
   componentWillUnmount() {
diff --git a/generators/generator-base.js b/generators/generator-base.js
index 4d5fbad64b..ef88e3431f 100644
--- a/generators/generator-base.js
+++ b/generators/generator-base.js
@@ -1960,7 +1960,7 @@ module.exports = class extends PrivateBase {
         if (limit > 0) {
             const halfLimit = Math.floor(limit / 2);
             const entityTable = this.getTableName(entityName).substring(0, halfLimit);
-            const relationTable = this.getTableName(relationshipName).substring(0, limit - entityTable.length - 1);
+            const relationTable = this.getTableName(relationshipName).substring(0, halfLimit - 1);
             return `${entityTable}_${relationTable}`;
         }
         return joinTableName;
@@ -1984,11 +1984,11 @@ module.exports = class extends PrivateBase {
             constraintName = `${constraintNamePrefix}${this.getTableName(entityName)}_${this.getTableName(columnOrRelationName)}`;
         }
         let limit = 0;
-        if (prodDatabaseType === 'oracle' && constraintName.length >= 27 && !this.skipCheckLengthOfIdentifier) {
+        if (prodDatabaseType === 'oracle' && constraintName.length > 30 && !this.skipCheckLengthOfIdentifier) {
             this.warning(`The generated constraint name "${constraintName}" is too long for Oracle (which has a 30 characters limit). It will be truncated!`);
 
             limit = 28;
-        } else if (prodDatabaseType === 'mysql' && constraintName.length >= 61 && !this.skipCheckLengthOfIdentifier) {
+        } else if (prodDatabaseType === 'mysql' && constraintName.length > 64 && !this.skipCheckLengthOfIdentifier) {
             this.warning(`The generated constraint name "${constraintName}" is too long for MySQL (which has a 64 characters limit). It will be truncated!`);
 
             limit = 62;
@@ -1996,7 +1996,7 @@ module.exports = class extends PrivateBase {
         if (limit > 0) {
             const halfLimit = Math.floor(limit / 2);
             const entityTable = noSnakeCase ? entityName.substring(0, halfLimit) : this.getTableName(entityName).substring(0, halfLimit);
-            const otherTable = noSnakeCase ? columnOrRelationName.substring(0, limit - entityTable.length - 2) : this.getTableName(columnOrRelationName).substring(0, limit - entityTable.length - 2);
+            const otherTable = noSnakeCase ? columnOrRelationName.substring(0, halfLimit - 2) : this.getTableName(columnOrRelationName).substring(0, halfLimit - 2);
             return `${entityTable}_${otherTable}`;
         }
         return constraintName;
diff --git a/generators/generator-constants.js b/generators/generator-constants.js
index a4427cd6df..85f6c79ccb 100644
--- a/generators/generator-constants.js
+++ b/generators/generator-constants.js
@@ -59,8 +59,8 @@ const SCALA_VERSION = '2.12.6';
 
 // version of Node, Yarn, NPM
 const NODE_VERSION = '8.11.3';
-const YARN_VERSION = '1.9.2';
-const NPM_VERSION = '6.2.0';
+const YARN_VERSION = '1.6.0';
+const NPM_VERSION = '6.1.0';
 
 // all constants used throughout all generators
 
diff --git a/generators/server/templates/gradle/profile_dev.gradle.ejs b/generators/server/templates/gradle/profile_dev.gradle.ejs
index a635c9b05a..7144c8cf46 100644
--- a/generators/server/templates/gradle/profile_dev.gradle.ejs
+++ b/generators/server/templates/gradle/profile_dev.gradle.ejs
@@ -75,6 +75,6 @@ processResources.dependsOn webpackBuildDev
 yarn_install.onlyIf { shouldWebpackRun() == true }
 
 def shouldWebpackRun() {
-    file('build/www/app/global.bundle.js').exists() == false || project.hasProperty('webpack')
+    file('build/www/app/<% if (clientFramework === 'angularX') { %>global<% } else if (clientFramework === 'react') { %>main<% } %>.bundle.js').exists() == false || project.hasProperty('webpack')
 }
 <%_ } _%>
diff --git a/generators/server/templates/pom.xml.ejs b/generators/server/templates/pom.xml.ejs
index fa3a9d0807..94ac348adb 100644
--- a/generators/server/templates/pom.xml.ejs
+++ b/generators/server/templates/pom.xml.ejs
@@ -44,7 +44,7 @@
     </repositories>
 
     <!-- jhipster-needle-distribution-management -->
-    
+
     <properties>
         <!-- Build properties -->
         <maven.version>3.0.0</maven.version>
@@ -1158,7 +1158,7 @@
             <id>webpack</id>
             <activation>
                 <file>
-                    <missing>${basedir}/target/www/app/global.bundle.js</missing>
+                    <missing>${basedir}/target/www/app/<% if (clientFramework === 'angularX') { %>global<% } else if (clientFramework === 'react') { %>main<% } %>.bundle.js</missing>
                 </file>
             </activation>
             <dependencies>
diff --git a/generators/server/templates/src/main/resources/config/application-dev.yml.ejs b/generators/server/templates/src/main/resources/config/application-dev.yml.ejs
index 39853b280f..670f4187b5 100644
--- a/generators/server/templates/src/main/resources/config/application-dev.yml.ejs
+++ b/generators/server/templates/src/main/resources/config/application-dev.yml.ejs
@@ -359,7 +359,7 @@ jhipster:
 <%_ } _%>
     mail: # specific JHipster mail property, for standard properties see MailProperties
         from: <%= baseName %>@localhost
-        base-url: http://127.0.0.1:<%= applicationType !== 'uaa' ? serverPort : 8080 %>
+        base-url: http://127.0.0.1:<%= serverPort %>
     metrics: # DropWizard Metrics configuration, used by MetricsConfiguration
         jmx:
             enabled: true
diff --git a/generators/server/templates/src/main/resources/templates/mail/activationEmail.html.ejs b/generators/server/templates/src/main/resources/templates/mail/activationEmail.html.ejs
index aa3822981e..718960291d 100644
--- a/generators/server/templates/src/main/resources/templates/mail/activationEmail.html.ejs
+++ b/generators/server/templates/src/main/resources/templates/mail/activationEmail.html.ejs
@@ -13,8 +13,13 @@
             Your JHipster account has been created, please click on the URL below to activate it:
         </p>
         <p>
+            <% if (clientFramework === 'react') { %>
+            <a th:href="@{|${baseUrl}/#/activate/${user.activationKey}|}"
+               th:text="@{|${baseUrl}/#/activate/${user.activationKey}|}">Activation Link</a>
+            <% } else { %>
             <a th:href="@{|${baseUrl}/#/activate?key=${user.activationKey}|}"
                th:text="@{|${baseUrl}/#/activate?key=${user.activationKey}|}">Activation Link</a>
+            <% } %>
         </p>
         <p>
             <span th:text="#{email.activation.text2}">Regards, </span>
diff --git a/generators/server/templates/src/main/resources/templates/mail/passwordResetEmail.html.ejs b/generators/server/templates/src/main/resources/templates/mail/passwordResetEmail.html.ejs
index 5a90f208b5..8bdff465c7 100644
--- a/generators/server/templates/src/main/resources/templates/mail/passwordResetEmail.html.ejs
+++ b/generators/server/templates/src/main/resources/templates/mail/passwordResetEmail.html.ejs
@@ -13,8 +13,13 @@
             For your JHipster account a password reset was requested, please click on the URL below to reset it:
         </p>
         <p>
+            <% if (clientFramework === 'react') { %>
+            <a th:href="@{|${baseUrl}/#/reset/finish/${user.resetKey}|}"
+             th:text="@{|${baseUrl}/#/reset/finish/${user.resetKey}|}">Login link</a>
+            <% } else { %>
             <a th:href="@{|${baseUrl}/#/reset/finish?key=${user.resetKey}|}"
              th:text="@{|${baseUrl}/#/reset/finish?key=${user.resetKey}|}">Login link</a>
+            <% } %>
         </p>
         <p>
             <span th:text="#{email.reset.text2}">Regards, </span>


Test patch:
diff --git a/generators/client/templates/angular/src/test/javascript/spec/app/admin/configuration/configuration.component.spec.ts.ejs b/generators/client/templates/angular/src/test/javascript/spec/app/admin/configuration/configuration.component.spec.ts.ejs
deleted file mode 100644
index 5c805550ea..0000000000
--- a/generators/client/templates/angular/src/test/javascript/spec/app/admin/configuration/configuration.component.spec.ts.ejs
+++ /dev/null
@@ -1,89 +0,0 @@
-<%#
-Copyright 2013-2018 the original author or authors from the JHipster project.
-
-    This file is part of the JHipster project, see https://www.jhipster.tech/
-    for more information.
-
-        Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-limitations under the License.
--%>
-import { ComponentFixture, TestBed, async } from '@angular/core/testing';
-import { of } from 'rxjs';
-import { HttpHeaders, HttpResponse } from '@angular/common/http';
-
-import { <%=angularXAppName%>TestModule } from '../../../test.module';
-import { <%=jhiPrefixCapitalized%>ConfigurationComponent } from 'app/admin/configuration/configuration.component';
-import { <%=jhiPrefixCapitalized%>ConfigurationService } from 'app/admin/configuration/configuration.service';
-import { ITEMS_PER_PAGE } from 'app/shared';
-import { Log } from 'app/admin';
-
-describe('Component Tests', () => {
-    describe('<%=jhiPrefixCapitalized%>ConfigurationComponent', () => {
-        let comp: <%=jhiPrefixCapitalized%>ConfigurationComponent;
-        let fixture: ComponentFixture<<%=jhiPrefixCapitalized%>ConfigurationComponent>;
-        let service: <%=jhiPrefixCapitalized%>ConfigurationService;
-
-        beforeEach(async(() => {
-            TestBed.configureTestingModule({
-                imports: [<%=angularXAppName%>TestModule],
-                declarations: [<%=jhiPrefixCapitalized%>ConfigurationComponent],
-                providers: [<%=jhiPrefixCapitalized%>ConfigurationService]
-            })
-                .overrideTemplate(<%=jhiPrefixCapitalized%>ConfigurationComponent, '')
-                .compileComponents();
-        }));
-
-        beforeEach(() => {
-            fixture = TestBed.createComponent(<%=jhiPrefixCapitalized%>ConfigurationComponent);
-            comp = fixture.componentInstance;
-            service = fixture.debugElement.injector.get(<%=jhiPrefixCapitalized%>ConfigurationService);
-        });
-
-        describe('OnInit', () => {
-            it('should set all default values correctly', () => {
-                expect(comp.configKeys).toEqual([]);
-                expect(comp.filter).toBe('');
-                expect(comp.orderProp).toBe('prefix');
-                expect(comp.reverse).toBe(false);
-            });
-            it('Should call load all on init', () => {
-                // GIVEN
-                const body = [{config: 'test', properties: 'test'}, {config: 'test2'}]
-                const envConfig = {envConfig: 'test'}
-                spyOn(service, 'get').and.returnValue(of(body));
-                spyOn(service, 'getEnv').and.returnValue(of(envConfig));
-
-                // WHEN
-                comp.ngOnInit();
-
-                // THEN
-                expect(service.get).toHaveBeenCalled();
-                expect(service.getEnv).toHaveBeenCalled();
-                expect(comp.configKeys).toEqual([["0", "1", "2", "3"]]);
-                expect(comp.allConfiguration).toEqual(envConfig);
-            });
-        });
-        describe('keys method', () => {
-            it('should return the keys of an Object', () => {
-                // GIVEN
-                const data = {
-                    key1: 'test',
-                    key2: 'test2'
-                }
-
-                // THEN
-                expect(comp.keys(data)).toEqual(['key1', 'key2']);
-                expect(comp.keys(undefined)).toEqual([]);
-            });
-        });
-    });
-});
diff --git a/generators/client/templates/angular/src/test/javascript/spec/app/admin/configuration/configuration.service.spec.ts.ejs b/generators/client/templates/angular/src/test/javascript/spec/app/admin/configuration/configuration.service.spec.ts.ejs
deleted file mode 100644
index 5da05469ea..0000000000
--- a/generators/client/templates/angular/src/test/javascript/spec/app/admin/configuration/configuration.service.spec.ts.ejs
+++ /dev/null
@@ -1,85 +0,0 @@
-<%#
-Copyright 2013-2018 the original author or authors from the JHipster project.
-
-    This file is part of the JHipster project, see https://www.jhipster.tech/
-    for more information.
-
-        Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-limitations under the License.
--%>
-import { TestBed } from '@angular/core/testing';
-
-import { <%=jhiPrefixCapitalized%>ConfigurationService } from 'app/admin/configuration/configuration.service';
-import { SERVER_API_URL } from 'app/app.constants';
-import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
-import { HttpResponse } from '@angular/common/http';
-
-describe('Service Tests', () => {
-    describe('Logs Service', () => {
-        let service: <%=jhiPrefixCapitalized%>ConfigurationService;
-        let httpMock;
-
-        beforeEach(() => {
-            TestBed.configureTestingModule({
-                imports: [HttpClientTestingModule]
-            });
-
-            service = TestBed.get(<%=jhiPrefixCapitalized%>ConfigurationService);
-            httpMock = TestBed.get(HttpTestingController);
-        });
-
-        afterEach(() => {
-            httpMock.verify();
-        });
-
-        describe('Service methods', () => {
-            it('should call correct URL', () => {
-                service.get().subscribe(() => {});
-
-                const req = httpMock.expectOne({ method: 'GET' });
-                const resourceUrl = SERVER_API_URL + 'management/configprops';
-                expect(req.request.url).toEqual(resourceUrl);
-            });
-
-            it('should get the config', () => {
-                const angularConfig = {
-                    contexts: {
-                        angular: {
-                            beans: [
-                                'test2'
-                            ]
-                        }
-                    }
-                }
-                service.get().subscribe(received => {
-                    expect(received.body[0]).toEqual(angularConfig);
-                });
-
-                const req = httpMock.expectOne({ method: 'GET' });
-                req.flush(angularConfig);
-            });
-
-            it('should get the env', () => {
-                const propertySources = new HttpResponse({body: [
-                    {name: 'test1', properties: 'test1'},
-                    {name: 'test2', properties: 'test2'},
-                ]})
-                service.get().subscribe(received => {
-                    expect(received.body[0]).toEqual(propertySources);
-                });
-
-                const req = httpMock.expectOne({ method: 'GET' });
-                req.flush(propertySources);
-            });
-        });
-    });
-});
diff --git a/generators/client/templates/angular/src/test/javascript/spec/app/admin/health/health.component.spec.ts.ejs b/generators/client/templates/angular/src/test/javascript/spec/app/admin/health/health.component.spec.ts.ejs
index e3674ff6c1..ec8b4782ef 100644
--- a/generators/client/templates/angular/src/test/javascript/spec/app/admin/health/health.component.spec.ts.ejs
+++ b/generators/client/templates/angular/src/test/javascript/spec/app/admin/health/health.component.spec.ts.ejs
@@ -17,8 +17,6 @@
  limitations under the License.
 -%>
 import { ComponentFixture, TestBed, async } from '@angular/core/testing';
-import { HttpResponse, HttpErrorResponse } from '@angular/common/http';
-import { of, throwError } from 'rxjs';
 
 import { <%=angularXAppName%>TestModule } from '../../../test.module';
 import { <%=jhiPrefixCapitalized%>HealthCheckComponent } from 'app/admin/health/health.component';
@@ -71,272 +69,233 @@ describe('Component Tests', () => {
                 const expected = [];
                 expect(service.transformHealthData(data)).toEqual(expected);
             });
+        });
 
-            it('should flatten health data with no subsystems', () => {
-                const data = {
-                    details: {
-                        status: 'UP',
-                        db: {
-                            status: 'UP',
-                            database: 'H2',
-                            hello: '1'
-                        },
-                        mail: {
-                            status: 'UP',
-                            error: 'mail.a.b.c'
-                        }
-                    }
-                };
-                const expected = [
-                    {
-                        name: 'db',
-                        status: 'UP',
-                        details: {
-                            database: 'H2',
-                            hello: '1'
-                        }
+        it('should flatten health data with no subsystems', () => {
+            const data = {
+                'details': {
+                    'status': 'UP',
+                    'db': {
+                        'status': 'UP',
+                        'database': 'H2',
+                        'hello': '1'
                     },
-                    {
-                        name: 'mail',
-                        error: 'mail.a.b.c',
-                        status: 'UP'
+                    'mail': {
+                        'status': 'UP',
+                        'error': 'mail.a.b.c'
                     }
-                ];
-                expect(service.transformHealthData(data)).toEqual(expected);
-            });
-
-            it('should flatten health data with subsystems at level 1, main system has no additional information', () => {
-                const data = {
-                    details: {
-                        status: 'UP',
-                        db: {
-                            status: 'UP',
-                            database: 'H2',
-                            hello: '1'
-                        },
-                        mail: {
-                            status: 'UP',
-                            error: 'mail.a.b.c'
-                        },
-                        system: {
-                            status: 'DOWN',
-                            subsystem1: {
-                                status: 'UP',
-                                property1: 'system.subsystem1.property1'
-                            },
-                            subsystem2: {
-                                status: 'DOWN',
-                                error: 'system.subsystem1.error',
-                                property2: 'system.subsystem2.property2'
-                            }
-                        }
+                }
+            };
+            const expected = [
+                {
+                    'name': 'db',
+                    'status': 'UP',
+                    'details': {
+                        'database': 'H2',
+                        'hello': '1'
                     }
-                };
-                const expected = [
-                    {
-                        name: 'db',
-                        status: 'UP',
-                        details: {
-                            database: 'H2',
-                            hello: '1'
-                        }
-                    },
-                    {
-                        name: 'mail',
-                        error: 'mail.a.b.c',
-                        status: 'UP'
+                },
+                {
+                    'name': 'mail',
+                    'error': 'mail.a.b.c',
+                    'status': 'UP'
+                }
+            ];
+            expect(service.transformHealthData(data)).toEqual(expected);
+        });
+
+        it('should flatten health data with subsystems at level 1, main system has no additional information', () => {
+            const data = {
+                'details': {
+                    'status': 'UP',
+                    'db': {
+                        'status': 'UP',
+                        'database': 'H2',
+                        'hello': '1'
                     },
-                    {
-                        name: 'system.subsystem1',
-                        status: 'UP',
-                        details: {
-                            property1: 'system.subsystem1.property1'
-                        }
+                    'mail': {
+                        'status': 'UP',
+                        'error': 'mail.a.b.c'
                     },
-                    {
-                        name: 'system.subsystem2',
-                        error: 'system.subsystem1.error',
-                        status: 'DOWN',
-                        details: {
-                            property2: 'system.subsystem2.property2'
-                        }
-                    }
-                ];
-                expect(service.transformHealthData(data)).toEqual(expected);
-            });
-
-            it('should flatten health data with subsystems at level 1, main system has additional information', () => {
-                const data = {
-                    details: {
-                        status: 'UP',
-                        db: {
-                            status: 'UP',
-                            database: 'H2',
-                            hello: '1'
+                    'system': {
+                        'status': 'DOWN',
+                        'subsystem1': {
+                            'status': 'UP',
+                            'property1': 'system.subsystem1.property1'
                         },
-                        mail: {
-                            status: 'UP',
-                            error: 'mail.a.b.c'
-                        },
-                        system: {
-                            status: 'DOWN',
-                            property1: 'system.property1',
-                            subsystem1: {
-                                status: 'UP',
-                                property1: 'system.subsystem1.property1'
-                            },
-                            subsystem2: {
-                                status: 'DOWN',
-                                error: 'system.subsystem1.error',
-                                property2: 'system.subsystem2.property2'
-                            }
+                        'subsystem2': {
+                            'status': 'DOWN',
+                            'error': 'system.subsystem1.error',
+                            'property2': 'system.subsystem2.property2'
                         }
                     }
-                };
-                const expected = [
-                    {
-                        name: 'db',
-                        status: 'UP',
-                        details: {
-                            database: 'H2',
-                            hello: '1'
-                        }
-                    },
-                    {
-                        name: 'mail',
-                        error: 'mail.a.b.c',
-                        status: 'UP'
-                    },
-                    {
-                        name: 'system',
-                        status: 'DOWN',
-                        details: {
-                            property1: 'system.property1'
-                        }
-                    },
-                    {
-                        name: 'system.subsystem1',
-                        status: 'UP',
-                        details: {
-                            property1: 'system.subsystem1.property1'
-                        }
-                    },
-                    {
-                        name: 'system.subsystem2',
-                        error: 'system.subsystem1.error',
-                        status: 'DOWN',
-                        details: {
-                            property2: 'system.subsystem2.property2'
-                        }
+                }
+            };
+            const expected = [
+                {
+                    'name': 'db',
+                    'status': 'UP',
+                    'details': {
+                        'database': 'H2',
+                        'hello': '1'
                     }
-                ];
-                expect(service.transformHealthData(data)).toEqual(expected);
-            });
+                },
+                {
+                    'name': 'mail',
+                    'error': 'mail.a.b.c',
+                    'status': 'UP'
+                },
+                {
+                    'name': 'system.subsystem1',
+                    'status': 'UP',
+                    'details': {
+                        'property1': 'system.subsystem1.property1'
+                    }
+                },
+                {
+                    'name': 'system.subsystem2',
+                    'error': 'system.subsystem1.error',
+                    'status': 'DOWN',
+                    'details': {
+                        'property2': 'system.subsystem2.property2'
+                    }
+                }
+            ];
+            expect(service.transformHealthData(data)).toEqual(expected);
+        });
 
-            it('should flatten health data with subsystems at level 1, main system has additional error', () => {
-                const data = {
-                    details: {
-                        status: 'UP',
-                        db: {
-                            status: 'UP',
-                            database: 'H2',
-                            hello: '1'
-                        },
-                        mail: {
-                            status: 'UP',
-                            error: 'mail.a.b.c'
+        it('should flatten health data with subsystems at level 1, main system has additional information', () => {
+            const data = {
+                'details': {
+                    'status': 'UP',
+                    'db': {
+                        'status': 'UP',
+                        'database': 'H2',
+                        'hello': '1'
+                    },
+                    'mail': {
+                        'status': 'UP',
+                        'error': 'mail.a.b.c'
+                    },
+                    'system': {
+                        'status': 'DOWN',
+                        'property1': 'system.property1',
+                        'subsystem1': {
+                            'status': 'UP',
+                            'property1': 'system.subsystem1.property1'
                         },
-                        system: {
-                            status: 'DOWN',
-                            error: 'show me',
-                            subsystem1: {
-                                status: 'UP',
-                                property1: 'system.subsystem1.property1'
-                            },
-                            subsystem2: {
-                                status: 'DOWN',
-                                error: 'system.subsystem1.error',
-                                property2: 'system.subsystem2.property2'
-                            }
+                        'subsystem2': {
+                            'status': 'DOWN',
+                            'error': 'system.subsystem1.error',
+                            'property2': 'system.subsystem2.property2'
                         }
                     }
-                };
-                const expected = [
-                    {
-                        name: 'db',
-                        status: 'UP',
-                        details: {
-                            database: 'H2',
-                            hello: '1'
-                        }
-                    },
-                    {
-                        name: 'mail',
-                        error: 'mail.a.b.c',
-                        status: 'UP'
-                    },
-                    {
-                        name: 'system',
-                        error: 'show me',
-                        status: 'DOWN'
+                }
+            };
+            const expected = [
+                {
+                    'name': 'db',
+                    'status': 'UP',
+                    'details': {
+                        'database': 'H2',
+                        'hello': '1'
+                    }
+                },
+                {
+                    'name': 'mail',
+                    'error': 'mail.a.b.c',
+                    'status': 'UP'
+                },
+                {
+                    'name': 'system',
+                    'status': 'DOWN',
+                    'details': {
+                        'property1': 'system.property1'
+                    }
+                },
+                {
+                    'name': 'system.subsystem1',
+                    'status': 'UP',
+                    'details': {
+                        'property1': 'system.subsystem1.property1'
+                    }
+                },
+                {
+                    'name': 'system.subsystem2',
+                    'error': 'system.subsystem1.error',
+                    'status': 'DOWN',
+                    'details': {
+                        'property2': 'system.subsystem2.property2'
+                    }
+                }
+            ];
+            expect(service.transformHealthData(data)).toEqual(expected);
+        });
+
+        it('should flatten health data with subsystems at level 1, main system has additional error', () => {
+            const data = {
+                'details': {
+                    'status': 'UP',
+                    'db': {
+                        'status': 'UP',
+                        'database': 'H2',
+                        'hello': '1'
                     },
-                    {
-                        name: 'system.subsystem1',
-                        status: 'UP',
-                        details: {
-                            property1: 'system.subsystem1.property1'
-                        }
+                    'mail': {
+                        'status': 'UP',
+                        'error': 'mail.a.b.c'
                     },
-                    {
-                        name: 'system.subsystem2',
-                        error: 'system.subsystem1.error',
-                        status: 'DOWN',
-                        details: {
-                            property2: 'system.subsystem2.property2'
+                    'system': {
+                        'status': 'DOWN',
+                        'error': 'show me',
+                        'subsystem1': {
+                            'status': 'UP',
+                            'property1': 'system.subsystem1.property1'
+                        },
+                        'subsystem2': {
+                            'status': 'DOWN',
+                            'error': 'system.subsystem1.error',
+                            'property2': 'system.subsystem2.property2'
                         }
                     }
-                ];
-                expect(service.transformHealthData(data)).toEqual(expected);
-            });
-        });
-
-        describe('getBadgeClass', () => {
-            it('should get badge class', () => {
-                const upBadgeClass = comp.getBadgeClass('UP')
-                const downBadgeClass = comp.getBadgeClass('DOWN')
-                expect(upBadgeClass).toEqual('badge-success');
-                expect(downBadgeClass).toEqual('badge-danger');
-            });
-        });
-
-        describe('refresh', () => {
-            it('should call refresh on init', () => {
-                // GIVEN
-                spyOn(service, 'checkHealth').and.returnValue(of(new HttpResponse()));
-                spyOn(service, 'transformHealthData').and.returnValue(of({data: 'test'}));
-
-                // WHEN
-                comp.ngOnInit()
-
-                // THEN
-                expect(service.checkHealth).toHaveBeenCalled();
-                expect(service.transformHealthData).toHaveBeenCalled();
-                expect(comp.healthData.value).toEqual({data: 'test'});
-            });
-            it('should handle a 503 on refreshing health data', () => {
-                // GIVEN
-                spyOn(service, 'checkHealth').and.returnValue(throwError(new HttpErrorResponse({status: 503, error: 'Mail down'})));
-                spyOn(service, 'transformHealthData').and.returnValue(of({health: 'down'}));
-
-                // WHEN
-                comp.refresh();
-
-                // THEN
-                expect(service.checkHealth).toHaveBeenCalled();
-                expect(service.transformHealthData).toHaveBeenCalled();
-                expect(comp.healthData.value).toEqual({health: 'down'});
-            });
+                }
+            };
+            const expected = [
+                {
+                    'name': 'db',
+                    'status': 'UP',
+                    'details': {
+                        'database': 'H2',
+                        'hello': '1'
+                    }
+                },
+                {
+                    'name': 'mail',
+                    'error': 'mail.a.b.c',
+                    'status': 'UP'
+                },
+                {
+                    'name': 'system',
+                    'error': 'show me',
+                    'status': 'DOWN'
+                },
+                {
+                    'name': 'system.subsystem1',
+                    'status': 'UP',
+                    'details': {
+                        'property1': 'system.subsystem1.property1'
+                    }
+                },
+                {
+                    'name': 'system.subsystem2',
+                    'error': 'system.subsystem1.error',
+                    'status': 'DOWN',
+                    'details': {
+                        'property2': 'system.subsystem2.property2'
+                    }
+                }
+            ];
+            expect(service.transformHealthData(data)).toEqual(expected);
         });
     });
 });
-
diff --git a/generators/client/templates/angular/src/test/javascript/spec/app/admin/logs/logs.component.spec.ts.ejs b/generators/client/templates/angular/src/test/javascript/spec/app/admin/logs/logs.component.spec.ts.ejs
deleted file mode 100644
index cd0a9095b3..0000000000
--- a/generators/client/templates/angular/src/test/javascript/spec/app/admin/logs/logs.component.spec.ts.ejs
+++ /dev/null
@@ -1,95 +0,0 @@
-<%#
-Copyright 2013-2018 the original author or authors from the JHipster project.
-
-    This file is part of the JHipster project, see https://www.jhipster.tech/
-    for more information.
-
-        Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-limitations under the License.
--%>
-import { ComponentFixture, TestBed, async } from '@angular/core/testing';
-import { of } from 'rxjs';
-import { HttpHeaders, HttpResponse } from '@angular/common/http';
-
-import { <%=angularXAppName%>TestModule } from '../../../test.module';
-import { LogsComponent } from 'app/admin/logs/logs.component';
-import { LogsService } from 'app/admin/logs/logs.service';
-import { ITEMS_PER_PAGE } from 'app/shared';
-import { Log } from 'app/admin';
-
-describe('Component Tests', () => {
-    describe('LogsComponent', () => {
-        let comp: LogsComponent;
-        let fixture: ComponentFixture<LogsComponent>;
-        let service: LogsService;
-
-        beforeEach(async(() => {
-            TestBed.configureTestingModule({
-                imports: [<%=angularXAppName%>TestModule],
-                declarations: [LogsComponent],
-                providers: [LogsService]
-            })
-                .overrideTemplate(LogsComponent, '')
-                .compileComponents();
-        }));
-
-        beforeEach(() => {
-            fixture = TestBed.createComponent(LogsComponent);
-            comp = fixture.componentInstance;
-            service = fixture.debugElement.injector.get(LogsService);
-        });
-
-        describe('OnInit', () => {
-            it('should set all default values correctly', () => {
-                expect(comp.filter).toBe('');
-                expect(comp.orderProp).toBe('name');
-                expect(comp.reverse).toBe(false);
-            });
-            it('Should call load all on init', () => {
-                // GIVEN
-                const headers = new HttpHeaders().append('link', 'link;link');
-                const log = new Log('main', 'WARN');
-                spyOn(service, 'findAll').and.returnValue(
-                    of(
-                        new HttpResponse({
-                            body: [log],
-                            headers
-                        })
-                    )
-                );
-
-                // WHEN
-                comp.ngOnInit();
-
-                // THEN
-                expect(service.findAll).toHaveBeenCalled();
-                expect(comp.loggers[0]).toEqual(jasmine.objectContaining(log));
-            });
-        });
-        describe('change log level', () => {
-            it('should change log level correctly', () => {
-                // GIVEN
-                const log = new Log('main', 'ERROR');
-                spyOn(service, 'changeLevel').and.returnValue(of(new HttpResponse()));
-                spyOn(service, 'findAll').and.returnValue(of(new HttpResponse({ body: [log] })));
-
-                // WHEN
-                comp.changeLevel('main', 'ERROR');
-
-                // THEN
-                expect(service.changeLevel).toHaveBeenCalled();
-                expect(service.findAll).toHaveBeenCalled();
-                expect(comp.loggers[0]).toEqual(jasmine.objectContaining(log));
-            });
-        });
-    });
-});
diff --git a/generators/client/templates/angular/src/test/javascript/spec/app/admin/logs/logs.service.spec.ts.ejs b/generators/client/templates/angular/src/test/javascript/spec/app/admin/logs/logs.service.spec.ts.ejs
deleted file mode 100644
index 1066bcb930..0000000000
--- a/generators/client/templates/angular/src/test/javascript/spec/app/admin/logs/logs.service.spec.ts.ejs
+++ /dev/null
@@ -1,76 +0,0 @@
-<%#
-Copyright 2013-2018 the original author or authors from the JHipster project.
-
-    This file is part of the JHipster project, see https://www.jhipster.tech/
-    for more information.
-
-        Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-limitations under the License.
--%>
-import { TestBed } from '@angular/core/testing';
-
-import { LogsService } from 'app/admin/logs/logs.service';
-import { Log } from 'app/admin/logs/log.model';
-import { SERVER_API_URL } from 'app/app.constants';
-import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
-
-describe('Service Tests', () => {
-    describe('Logs Service', () => {
-        let service: LogsService;
-        let httpMock;
-
-        beforeEach(() => {
-            TestBed.configureTestingModule({
-                imports: [HttpClientTestingModule]
-            });
-
-            service = TestBed.get(LogsService);
-            httpMock = TestBed.get(HttpTestingController);
-        });
-
-        afterEach(() => {
-            httpMock.verify();
-        });
-
-        describe('Service methods', () => {
-            it('should call correct URL', () => {
-                service.findAll().subscribe(() => {});
-
-                const req = httpMock.expectOne({ method: 'GET' });
-                const resourceUrl = SERVER_API_URL + 'management/logs';
-                expect(req.request.url).toEqual(resourceUrl);
-            });
-
-            it('should return Logs', () => {
-                const log = new Log('main', 'ERROR');
-
-                service.findAll().subscribe(received => {
-                    expect(received.body[0]).toEqual(log);
-                });
-
-                const req = httpMock.expectOne({ method: 'GET' });
-                req.flush([log]);
-            });
-
-            it('should change log level', () => {
-                const log = new Log('main', 'ERROR');
-
-                service.changeLevel(log).subscribe(received => {
-                    expect(received.body[0]).toEqual(log);
-                });
-
-                const req = httpMock.expectOne({ method: 'PUT' });
-                req.flush([log]);
-            });
-        });
-    });
-});
diff --git a/generators/client/templates/angular/src/test/javascript/spec/app/admin/metrics/metrics-modal.component.spec.ts.ejs b/generators/client/templates/angular/src/test/javascript/spec/app/admin/metrics/metrics-modal.component.spec.ts.ejs
deleted file mode 100644
index fa5a997a72..0000000000
--- a/generators/client/templates/angular/src/test/javascript/spec/app/admin/metrics/metrics-modal.component.spec.ts.ejs
+++ /dev/null
@@ -1,106 +0,0 @@
-<%#
-Copyright 2013-2018 the original author or authors from the JHipster project.
-
-    This file is part of the JHipster project, see https://www.jhipster.tech/
-    for more information.
-
-        Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-limitations under the License.
--%>
-import { ComponentFixture, TestBed, async } from '@angular/core/testing';
-import { HttpResponse, HttpErrorResponse } from '@angular/common/http';
-import { of, throwError } from 'rxjs';
-
-import { <%=angularXAppName%>TestModule } from '../../../test.module';
-import { <%=jhiPrefixCapitalized%>MetricsMonitoringModalComponent } from 'app/admin/metrics/metrics-modal.component';
-import { <%=jhiPrefixCapitalized%>MetricsService } from 'app/admin/metrics/metrics.service';
-
-describe('Component Tests', () => {
-    describe('<%=jhiPrefixCapitalized%>MetricsMonitoringModalComponent', () => {
-        let comp: <%=jhiPrefixCapitalized%>MetricsMonitoringModalComponent;
-        let fixture: ComponentFixture<<%=jhiPrefixCapitalized%>MetricsMonitoringModalComponent>;
-        let service: <%=jhiPrefixCapitalized%>MetricsService;
-
-        beforeEach(async(() => {
-            TestBed.configureTestingModule({
-                imports: [<%=angularXAppName%>TestModule],
-                declarations: [<%=jhiPrefixCapitalized%>MetricsMonitoringModalComponent]
-            })
-                .overrideTemplate(<%=jhiPrefixCapitalized%>MetricsMonitoringModalComponent, '')
-                .compileComponents();
-        }));
-
-        beforeEach(() => {
-            fixture = TestBed.createComponent(<%=jhiPrefixCapitalized%>MetricsMonitoringModalComponent);
-            comp = fixture.componentInstance;
-            service = fixture.debugElement.injector.get(<%=jhiPrefixCapitalized%>MetricsService);
-        });
-
-        describe('ngOnInit', () => {
-            it('should count the numbers of each thread type', () => {
-                comp.threadDump = [
-                    {name: 'test1', threadState: 'RUNNABLE'},
-                    {name: 'test2', threadState: 'WAITING'},
-                    {name: 'test3', threadState: 'TIMED_WAITING'},
-                    {name: 'test4', threadState: 'BLOCKED'},
-                    {name: 'test5', threadState: 'BLOCKED'},
-                    {name: 'test5', threadState: 'NONE'}
-                ]
-                fixture.detectChanges()
-
-                expect(comp.threadDumpRunnable).toBe(1)
-                expect(comp.threadDumpWaiting).toBe(1)
-                expect(comp.threadDumpTimedWaiting).toBe(1)
-                expect(comp.threadDumpBlocked).toBe(2)
-                expect(comp.threadDumpAll).toBe(5)
-            });
-
-            it('should return badge-info for WAITING', () => {
-                expect(comp.getBadgeClass('WAITING')).toBe('badge-info');
-            });
-
-            it('should return badge-warning for TIMED_WAITING', () => {
-                expect(comp.getBadgeClass('TIMED_WAITING')).toBe('badge-warning');
-            });
-
-            it('should return badge-danger for BLOCKED', () => {
-                expect(comp.getBadgeClass('BLOCKED')).toBe('badge-danger');
-            });
-
-            it('should return undefined for anything else', () => {
-                expect(comp.getBadgeClass('')).toBe(undefined);
-            });
-        });
-
-        describe('getBadgeClass', () => {
-            it('should return badge-success for RUNNABLE', () => {
-                expect(comp.getBadgeClass('RUNNABLE')).toBe('badge-success');
-            });
-
-            it('should return badge-info for WAITING', () => {
-                expect(comp.getBadgeClass('WAITING')).toBe('badge-info');
-            });
-
-            it('should return badge-warning for TIMED_WAITING', () => {
-                expect(comp.getBadgeClass('TIMED_WAITING')).toBe('badge-warning');
-            });
-
-            it('should return badge-danger for BLOCKED', () => {
-                expect(comp.getBadgeClass('BLOCKED')).toBe('badge-danger');
-            });
-
-            it('should return undefined for anything else', () => {
-                expect(comp.getBadgeClass('')).toBe(undefined);
-            });
-        });
-    });
-});
diff --git a/generators/client/templates/angular/src/test/javascript/spec/app/admin/metrics/metrics.component.spec.ts.ejs b/generators/client/templates/angular/src/test/javascript/spec/app/admin/metrics/metrics.component.spec.ts.ejs
deleted file mode 100644
index 1a86aee61a..0000000000
--- a/generators/client/templates/angular/src/test/javascript/spec/app/admin/metrics/metrics.component.spec.ts.ejs
+++ /dev/null
@@ -1,82 +0,0 @@
-<%#
-Copyright 2013-2018 the original author or authors from the JHipster project.
-
-    This file is part of the JHipster project, see https://www.jhipster.tech/
-    for more information.
-
-        Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-limitations under the License.
--%>
-import { ComponentFixture, TestBed, async } from '@angular/core/testing';
-import { HttpResponse, HttpErrorResponse } from '@angular/common/http';
-import { of, throwError } from 'rxjs';
-
-import { <%=angularXAppName%>TestModule } from '../../../test.module';
-import { <%=jhiPrefixCapitalized%>MetricsMonitoringComponent } from 'app/admin/metrics/metrics.component';
-import { <%=jhiPrefixCapitalized%>MetricsService } from 'app/admin/metrics/metrics.service';
-
-describe('Component Tests', () => {
-    describe('<%=jhiPrefixCapitalized%>MetricsMonitoringComponent', () => {
-        let comp: <%=jhiPrefixCapitalized%>MetricsMonitoringComponent;
-        let fixture: ComponentFixture<<%=jhiPrefixCapitalized%>MetricsMonitoringComponent>;
-        let service: <%=jhiPrefixCapitalized%>MetricsService;
-
-        beforeEach(async(() => {
-            TestBed.configureTestingModule({
-                imports: [<%=angularXAppName%>TestModule],
-                declarations: [<%=jhiPrefixCapitalized%>MetricsMonitoringComponent]
-            })
-                .overrideTemplate(<%=jhiPrefixCapitalized%>MetricsMonitoringComponent, '')
-                .compileComponents();
-        }));
-
-        beforeEach(() => {
-            fixture = TestBed.createComponent(<%=jhiPrefixCapitalized%>MetricsMonitoringComponent);
-            comp = fixture.componentInstance;
-            service = fixture.debugElement.injector.get(<%=jhiPrefixCapitalized%>MetricsService);
-        });
-
-        describe('refresh', () => {
-            it('should call refresh on init', () => {
-                // GIVEN
-                const response = {
-                    timers: {
-                        service: 'test',
-                        unrelatedKey: 'test'
-                    },
-                    gauges: {
-                        'jcache.statistics': {
-                            value: 2
-                        },
-                        unrelatedKey: 'test'
-                    }
-                }
-                spyOn(service, 'getMetrics').and.returnValue(of((response)));
-
-                // WHEN
-                comp.ngOnInit()
-
-                // THEN
-                expect(service.getMetrics).toHaveBeenCalled();
-                expect(comp.servicesStats).toEqual({ service: 'test' });
-                expect(comp.cachesStats).toEqual({ jcache: { name: 17, value: 2 } });
-            });
-        });
-
-        describe('isNan', () => {
-            it('should return if a variable is NaN', () => {
-                expect(comp.filterNaN(1)).toBe(1);
-                expect(comp.filterNaN('test')).toBe(0);
-            });
-        });
-    });
-});
diff --git a/generators/client/templates/angular/src/test/javascript/spec/app/admin/metrics/metrics.service.spec.ts.ejs b/generators/client/templates/angular/src/test/javascript/spec/app/admin/metrics/metrics.service.spec.ts.ejs
deleted file mode 100644
index fa46dd7173..0000000000
--- a/generators/client/templates/angular/src/test/javascript/spec/app/admin/metrics/metrics.service.spec.ts.ejs
+++ /dev/null
@@ -1,77 +0,0 @@
-<%#
-Copyright 2013-2018 the original author or authors from the JHipster project.
-
-    This file is part of the JHipster project, see https://www.jhipster.tech/
-    for more information.
-
-        Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-limitations under the License.
--%>
-import { TestBed } from '@angular/core/testing';
-
-import { <%=jhiPrefixCapitalized%>MetricsService } from 'app/admin/metrics/metrics.service';
-import { SERVER_API_URL } from 'app/app.constants';
-import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
-
-describe('Service Tests', () => {
-    describe('Logs Service', () => {
-        let service: <%=jhiPrefixCapitalized%>MetricsService;
-        let httpMock;
-
-        beforeEach(() => {
-            TestBed.configureTestingModule({
-                imports: [HttpClientTestingModule]
-            });
-
-            service = TestBed.get(<%=jhiPrefixCapitalized%>MetricsService);
-            httpMock = TestBed.get(HttpTestingController);
-        });
-
-        afterEach(() => {
-            httpMock.verify();
-        });
-
-        describe('Service methods', () => {
-            it('should call correct URL', () => {
-                service.getMetrics().subscribe(() => {});
-
-                const req = httpMock.expectOne({ method: 'GET' });
-                const resourceUrl = SERVER_API_URL + 'management/metrics';
-                expect(req.request.url).toEqual(resourceUrl);
-            });
-
-            it('should return Metrics', () => {
-                const metrics = [];
-
-                service.getMetrics().subscribe(received => {
-                    expect(received.body[0]).toEqual(metrics);
-                });
-
-                const req = httpMock.expectOne({ method: 'GET' });
-                req.flush([metrics]);
-            });
-
-            it('should return Thread Dump', () => {
-                const dump = [
-                    {name: 'test1', threadState: 'RUNNABLE'}
-                ];
-
-                service.threadDump().subscribe(received => {
-                    expect(received.body[0]).toEqual(dump);
-                });
-
-                const req = httpMock.expectOne({ method: 'GET' });
-                req.flush([dump]);
-            });
-        });
-    });
-});
diff --git a/test/generator-base.spec.js b/test/generator-base.spec.js
index fef3e0e367..11077504a8 100644
--- a/test/generator-base.spec.js
+++ b/test/generator-base.spec.js
@@ -128,20 +128,6 @@ describe('Generator Base', () => {
                 expect(BaseGenerator.getFKConstraintName('entityLongerNameWithPaginationAndDTO', 'relationshipLongerNameWithPaginationAndDTO', 'mysql')).to.equal('entity_longer_name_with_paginat_relationship_longer_name_with_id');
             });
         });
-        describe('when called with a long name that is near limit and mysql', () => {
-            it('returns a proper constraint name', () => {
-                expect(BaseGenerator.getFKConstraintName('testCustomTableName', 'userManyToManyUserManyToMany', 'mysql').length).to.be.lessThan(64);
-                expect(BaseGenerator.getFKConstraintName('testCustomTableName', 'userManyToManyUserManyToMany', 'mysql')).to.equal('test_custom_table_name_user_many_to_many_user_many_to_many_id');
-                expect(BaseGenerator.getFKConstraintName('testCustomTableName', 'userManyToManyUserManyToManies', 'mysql').length).to.be.lessThan(64);
-                expect(BaseGenerator.getFKConstraintName('testCustomTableName', 'userManyToManyUserManyToManies', 'mysql')).to.equal('test_custom_table_name_user_many_to_many_user_many_to_manies_id');
-            });
-        });
-        describe('when called with a long name that is equal to limit and mysql', () => {
-            it('returns a proper constraint name', () => {
-                expect(BaseGenerator.getFKConstraintName('testCustomTableNames', 'userManyToManyUserManyToManies', 'mysql')).to.have.length(64);
-                expect(BaseGenerator.getFKConstraintName('testCustomTableNames', 'userManyToManyUserManyToManies', 'mysql')).to.equal('test_custom_table_names_user_many_to_many_user_many_to_manies_id');
-            });
-        });
         describe('when called with a long name and no snake case', () => {
             it('returns a proper constraint name', () => {
                 expect(BaseGenerator.getFKConstraintName('entityNameLongerName', 'relationshipLongerName', 'oracle', true)).to.have.length(30);
@@ -172,18 +158,6 @@ describe('Generator Base', () => {
                 expect(BaseGenerator.getUXConstraintName('entityLongerNameWithPaginationAndDTO', 'columnLongerNameWithPaginationAndDTO', 'mysql')).to.equal('ux_entity_longer_name_with_paginat_column_longer_name_with_pagin');
             });
         });
-        describe('when called with a long name that is near limit and mysql', () => {
-            it('returns a proper constraint name', () => {
-                expect(BaseGenerator.getUXConstraintName('testCustomTableName', 'userManyToManyUserManyToManies', 'mysql').length).to.be.lessThan(64);
-                expect(BaseGenerator.getUXConstraintName('testCustomTableName', 'userManyToManyUserManyToManies', 'mysql')).to.equal('ux_test_custom_table_name_user_many_to_many_user_many_to_manies');
-            });
-        });
-        describe('when called with a long name that is equal to limit and mysql', () => {
-            it('returns a proper constraint name', () => {
-                expect(BaseGenerator.getUXConstraintName('testCustomTableNames', 'userManyToManyUserManyToManies', 'mysql')).to.have.length(64);
-                expect(BaseGenerator.getUXConstraintName('testCustomTableNames', 'userManyToManyUserManyToManies', 'mysql')).to.equal('ux_test_custom_table_names_user_many_to_many_user_many_to_manies');
-            });
-        });
         describe('when called with a long name and mysql and no snake case', () => {
             it('returns a proper constraint name', () => {
                 expect(BaseGenerator.getUXConstraintName('entityLongerNameWithPaginationAndDTO', 'columnLongerNameWithPaginationAndDTO', 'mysql', true)).to.have.length(64);
diff --git a/test/utils/expected-files.js b/test/utils/expected-files.js
index 64be6b72af..f97e9c43c3 100644
--- a/test/utils/expected-files.js
+++ b/test/utils/expected-files.js
@@ -354,14 +354,7 @@ const expectedFiles = {
         `${CLIENT_TEST_SRC_DIR}spec/app/account/settings/settings.component.spec.ts`,
         `${CLIENT_TEST_SRC_DIR}spec/app/admin/audits/audits.component.spec.ts`,
         `${CLIENT_TEST_SRC_DIR}spec/app/admin/audits/audits.service.spec.ts`,
-        `${CLIENT_TEST_SRC_DIR}spec/app/admin/configuration/configuration.component.spec.ts`,
-        `${CLIENT_TEST_SRC_DIR}spec/app/admin/configuration/configuration.service.spec.ts`,
         `${CLIENT_TEST_SRC_DIR}spec/app/admin/health/health.component.spec.ts`,
-        `${CLIENT_TEST_SRC_DIR}spec/app/admin/logs/logs.component.spec.ts`,
-        `${CLIENT_TEST_SRC_DIR}spec/app/admin/logs/logs.service.spec.ts`,
-        `${CLIENT_TEST_SRC_DIR}spec/app/admin/metrics/metrics.component.spec.ts`,
-        `${CLIENT_TEST_SRC_DIR}spec/app/admin/metrics/metrics.service.spec.ts`,
-        `${CLIENT_TEST_SRC_DIR}spec/app/admin/metrics/metrics-modal.component.spec.ts`,
         `${CLIENT_TEST_SRC_DIR}spec/app/shared/alert/alert-error.component.spec.ts`,
         `${CLIENT_TEST_SRC_DIR}spec/app/shared/login/login.component.spec.ts`,
         `${CLIENT_TEST_SRC_DIR}spec/helpers/mock-account.service.ts`,