Skip to content
Snippets Groups Projects
Commit 6549fd56 authored by Alexander Reifschneider's avatar Alexander Reifschneider
Browse files

OZG-7166 Improve code

parent a58bb693
Branches
Tags
1 merge request!37OZG-7166 Add impressum page
...@@ -8,7 +8,7 @@ describe('AppComponent', () => { ...@@ -8,7 +8,7 @@ describe('AppComponent', () => {
let component: AppComponent; let component: AppComponent;
let fixture: ComponentFixture<AppComponent>; let fixture: ComponentFixture<AppComponent>;
const navigationLocator = getDataTestIdOf('navigation-footer'); const navigationLocator: string = getDataTestIdOf('navigation-footer');
beforeEach(async () => { beforeEach(async () => {
await TestBed.configureTestingModule({ await TestBed.configureTestingModule({
...@@ -37,7 +37,7 @@ describe('AppComponent', () => { ...@@ -37,7 +37,7 @@ describe('AppComponent', () => {
describe('template', () => { describe('template', () => {
describe('production bayern', () => { describe('production bayern', () => {
it('should NOT show navigation', () => { it('should NOT show navigation footer', () => {
component.isBayernProd = true; component.isBayernProd = true;
fixture.detectChanges(); fixture.detectChanges();
...@@ -45,7 +45,7 @@ describe('AppComponent', () => { ...@@ -45,7 +45,7 @@ describe('AppComponent', () => {
notExistsAsHtmlElement(fixture, navigationLocator); notExistsAsHtmlElement(fixture, navigationLocator);
}); });
it('should show navigation', () => { it('should show navigation footer', () => {
component.isBayernProd = false; component.isBayernProd = false;
fixture.detectChanges(); fixture.detectChanges();
......
...@@ -10,9 +10,9 @@ import { environment } from '../environments/environment'; ...@@ -10,9 +10,9 @@ import { environment } from '../environments/environment';
templateUrl: './app.component.html', templateUrl: './app.component.html',
}) })
export class AppComponent implements OnInit { export class AppComponent implements OnInit {
public isBayernProd: boolean;
ngOnInit() { ngOnInit() {
this.isBayernProd = environment.production === true && environment.location === 'by'; this.isBayernProd = environment.production && environment.bundesland === 'by';
} }
public isBayernProd: boolean;
} }
export const environment = { export const environment = {
production: true, production: true,
location: 'by', bundesland: 'by',
}; };
export const environment = { export const environment = {
production: true, production: true,
location: 'sh', bundesland: 'sh',
}; };
export const environment = { export const environment = {
production: false, production: false,
location: 'dev', bundesland: 'sh',
}; };
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment