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', () => {
let component: AppComponent;
let fixture: ComponentFixture<AppComponent>;
const navigationLocator = getDataTestIdOf('navigation-footer');
const navigationLocator: string = getDataTestIdOf('navigation-footer');
beforeEach(async () => {
await TestBed.configureTestingModule({
......@@ -37,7 +37,7 @@ describe('AppComponent', () => {
describe('template', () => {
describe('production bayern', () => {
it('should NOT show navigation', () => {
it('should NOT show navigation footer', () => {
component.isBayernProd = true;
fixture.detectChanges();
......@@ -45,7 +45,7 @@ describe('AppComponent', () => {
notExistsAsHtmlElement(fixture, navigationLocator);
});
it('should show navigation', () => {
it('should show navigation footer', () => {
component.isBayernProd = false;
fixture.detectChanges();
......
......@@ -10,9 +10,9 @@ import { environment } from '../environments/environment';
templateUrl: './app.component.html',
})
export class AppComponent implements OnInit {
public isBayernProd: boolean;
ngOnInit() {
this.isBayernProd = environment.production === true && environment.location === 'by';
this.isBayernProd = environment.production && environment.bundesland === 'by';
}
public isBayernProd: boolean;
}
export const environment = {
production: true,
location: 'by',
bundesland: 'by',
};
export const environment = {
production: true,
location: 'sh',
bundesland: 'sh',
};
export const environment = {
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