Skip to content
Snippets Groups Projects
Commit bd8114dc authored by OZGCloud's avatar OZGCloud
Browse files

Merge pull request 'OZG-7000 feature toggle in navigation and pages' (#848)...

Merge pull request 'OZG-7000 feature toggle in navigation and pages' (#848) from OZG-7000-feature-toggle into master

Reviewed-on: https://git.ozg-sh.de/ozgcloud-app/alfa/pulls/848


Reviewed-by: default avatarOZGCloud <ozgcloud@mgm-tp.com>
parents 13888938 e50e6479
Branches
Tags
No related merge requests found
Showing
with 351 additions and 28 deletions
......@@ -40,22 +40,32 @@
</header>
<div class="flex h-screen w-full justify-center overflow-y-auto">
<ods-navbar data-test-id="navigation">
<ng-container *ngIf="apiRoot | hasLink: ApiRootLinkRel.CONFIGURATION">
<ods-nav-item caption="Benutzer & Rollen" path="/benutzer_und_rollen">
<ng-container *ngIf="apiRoot | hasLink: apiRootLinkRel.CONFIGURATION">
<ng-container *ngIf="environment.features.benutzerRollen">
<ods-nav-item data-test-id="users-roles-navigation" caption="Benutzer & Rollen" path="/benutzer_und_rollen">
<ods-users-icon class="stroke-text" icon />
</ods-nav-item>
<hr />
<ods-nav-item caption="Postfach" path="/postfach">
</ng-container>
<ng-container *ngIf="environment.features.postfach">
<ods-nav-item data-test-id="postfach-navigation" caption="Postfach" path="/postfach">
<ods-mailbox-icon icon />
</ods-nav-item>
<ods-nav-item caption="Organisationseinheiten" path="/organisationseinheiten">
</ng-container>
<ng-container *ngIf="apiRoot | hasLink: apiRootLinkRel.ORGANISATIONS_EINHEIT">
<ods-nav-item
data-test-id="organisations-einheiten-navigation"
caption="Organisationseinheiten"
path="/organisationseinheiten"
>
<ods-orga-unit-icon icon />
</ods-nav-item>
</ng-container>
</ng-container>
</ods-navbar>
<main class="flex-1 overflow-y-auto bg-white px-6 py-4">
<router-outlet
*ngIf="apiRoot | hasLink: ApiRootLinkRel.CONFIGURATION; else configurationResourceLinkNotAvailable"
*ngIf="apiRoot | hasLink: apiRootLinkRel.CONFIGURATION; else configurationResourceLinkNotAvailable"
data-test-id="router-outlet"
></router-outlet>
<ng-template #configurationResourceLinkNotAvailable>
......
......@@ -23,6 +23,7 @@
*/
import { ApiRootLinkRel, ApiRootResource, ApiRootService } from '@alfa-client/api-root-shared';
import { BuildInfoComponent } from '@alfa-client/common';
import { getEnvironmentFactory } from '@alfa-client/environment-shared';
import { HasLinkPipe, createEmptyStateResource, createStateResource } from '@alfa-client/tech-shared';
import {
Mock,
......@@ -44,6 +45,7 @@ import {
} from '@ods/system';
import { AuthenticationService } from 'authentication';
import { createApiRootResource } from 'libs/api-root-shared/test/api-root';
import { createEnvironment } from 'libs/environment-shared/test/environment';
import { getDataTestIdOf } from 'libs/tech-shared/test/data-test';
import { MockComponent, MockDirective } from 'ng-mocks';
import { of } from 'rxjs';
......@@ -51,6 +53,8 @@ import { UserProfileButtonContainerComponent } from '../common/user-profile-butt
import { UnavailablePageComponent } from '../pages/unavailable/unavailable-page/unavailable-page.component';
import { AppComponent } from './app.component';
jest.mock('@alfa-client/environment-shared');
describe('AppComponent', () => {
let component: AppComponent;
let fixture: ComponentFixture<AppComponent>;
......@@ -59,9 +63,15 @@ describe('AppComponent', () => {
const buildInfoSelector: string = getDataTestIdOf('build-info');
const userProfileButtonSelector: string = getDataTestIdOf('user-profile-button');
const navigationSelector: string = getDataTestIdOf('navigation');
const usersRolesNavigationSelector: string = getDataTestIdOf('users-roles-navigation');
const postfachNavigationSelector: string = getDataTestIdOf('postfach-navigation');
const organisationsEinheitenNavigationSelector: string = getDataTestIdOf('organisations-einheiten-navigation');
const logoLink: string = getDataTestIdOf('logo-link');
const routerOutletSelector: string = getDataTestIdOf('router-outlet');
const environment = createEnvironment();
(getEnvironmentFactory as jest.Mock).mockReturnValue(environment);
const authenticationService: Mock<AuthenticationService> = {
...mock(AuthenticationService),
login: jest.fn().mockResolvedValue(Promise.resolve()),
......@@ -208,8 +218,11 @@ describe('AppComponent', () => {
});
describe('navigation', () => {
it('should show links if configuration link exists', () => {
beforeEach(() => {
component.apiRootStateResource$ = of(createStateResource(createApiRootResource([ApiRootLinkRel.CONFIGURATION])));
});
it('should show links if configuration link exists', () => {
fixture.detectChanges();
const navbarElement: HTMLElement = getElementFromFixture(fixture, navigationSelector);
......@@ -225,6 +238,49 @@ describe('AppComponent', () => {
expect(navbarElement.children.length).toBe(0);
});
it('should show postfach link if postfach feature toggle is true', () => {
component.environment.features.postfach = true;
fixture.detectChanges();
existsAsHtmlElement(fixture, postfachNavigationSelector);
});
it('should not show postfach link if postfach feature toggle is false', () => {
component.environment.features.postfach = false;
fixture.detectChanges();
notExistsAsHtmlElement(fixture, postfachNavigationSelector);
});
it('should show benutzer & rollen if benutzerRollen feature toggle is true', () => {
component.environment.features.benutzerRollen = true;
fixture.detectChanges();
existsAsHtmlElement(fixture, usersRolesNavigationSelector);
});
it('should not show benutzer & rollen if benutzerRollen feature toggle is false', () => {
component.environment.features.benutzerRollen = false;
fixture.detectChanges();
notExistsAsHtmlElement(fixture, usersRolesNavigationSelector);
});
it('should show organisationsEinheiten if link in apiRoot exists', () => {
component.apiRootStateResource$ = of(
createStateResource(createApiRootResource([ApiRootLinkRel.ORGANISATIONS_EINHEIT, ApiRootLinkRel.CONFIGURATION])),
);
fixture.detectChanges();
existsAsHtmlElement(fixture, organisationsEinheitenNavigationSelector);
});
it('should not show organisationsEinheiten if link in apiRoot does not exist', () => {
fixture.detectChanges();
notExistsAsHtmlElement(fixture, organisationsEinheitenNavigationSelector);
});
});
describe('build version', () => {
......
......@@ -22,6 +22,7 @@
* unter der Lizenz sind dem Lizenztext zu entnehmen.
*/
import { ApiRootLinkRel, ApiRootResource, ApiRootService } from '@alfa-client/api-root-shared';
import { Environment, getEnvironmentFactory } from '@alfa-client/environment-shared';
import { StateResource } from '@alfa-client/tech-shared';
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Params, Router } from '@angular/router';
......@@ -37,6 +38,9 @@ export class AppComponent implements OnInit {
readonly title = 'admin';
public apiRootStateResource$: Observable<StateResource<ApiRootResource>>;
public readonly environment: Environment = getEnvironmentFactory();
public readonly apiRootLinkRel = ApiRootLinkRel;
constructor(
public authenticationService: AuthenticationService,
......@@ -63,6 +67,4 @@ export class AppComponent implements OnInit {
const { iss, state, session_state, code, ...queryParams } = this.route.snapshot.queryParams;
return queryParams;
}
protected readonly ApiRootLinkRel = ApiRootLinkRel;
}
......@@ -23,4 +23,8 @@
unter der Lizenz sind dem Lizenztext zu entnehmen.
-->
<admin-organisationseinheit-form-container/>
\ No newline at end of file
<ng-container *ngIf="(apiRootStateResource$ | async)?.resource as apiRoot">
@if (apiRoot | hasLink: apiRootLinkRel.ORGANISATIONS_EINHEIT) {
<admin-organisationseinheit-form-container data-test-id="organisations-einheit-form" />
}
</ng-container>
......@@ -22,17 +22,32 @@
* unter der Lizenz sind dem Lizenztext zu entnehmen.
*/
import { OrganisationsEinheitFormContainerComponent } from '@admin-client/admin-settings';
import { ApiRootLinkRel, ApiRootResource, ApiRootService } from '@alfa-client/api-root-shared';
import { createStateResource, StateResource, TechSharedModule } from '@alfa-client/tech-shared';
import { existsAsHtmlElement, mock, Mock, notExistsAsHtmlElement } from '@alfa-client/test-utils';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { createApiRootResource } from 'libs/api-root-shared/test/api-root';
import { getDataTestIdOf } from 'libs/tech-shared/test/data-test';
import { singleColdCompleted } from 'libs/tech-shared/test/marbles';
import { MockComponent } from 'ng-mocks';
import { Observable, of } from 'rxjs';
import { OrganisationsEinheitFormPageComponent } from './organisationseinheit-form-page.component';
describe('OrganisationsEinheitFormPageComponent', () => {
let component: OrganisationsEinheitFormPageComponent;
let fixture: ComponentFixture<OrganisationsEinheitFormPageComponent>;
const organisationsEinheitFormSelector: string = getDataTestIdOf('organisations-einheit-form');
let apiRootService: Mock<ApiRootService>;
beforeEach(async () => {
apiRootService = mock(ApiRootService);
await TestBed.configureTestingModule({
imports: [TechSharedModule],
declarations: [OrganisationsEinheitFormPageComponent, MockComponent(OrganisationsEinheitFormContainerComponent)],
providers: [{ provide: ApiRootService, useValue: apiRootService }],
}).compileComponents();
});
......@@ -46,4 +61,45 @@ describe('OrganisationsEinheitFormPageComponent', () => {
it('should create', () => {
expect(component).toBeTruthy();
});
describe('component', () => {
describe('ngOnInit', () => {
const apiRootStateResource: StateResource<ApiRootResource> = createStateResource(createApiRootResource());
const apiRootStateResource$: Observable<StateResource<ApiRootResource>> = of(apiRootStateResource);
beforeEach(() => {
apiRootService.getApiRoot.mockReturnValue(apiRootStateResource$);
});
it('should call apiRootService getApiRoot', () => {
component.ngOnInit();
expect(apiRootService.getApiRoot).toHaveBeenCalled();
});
it('should get apiRootStateResource$', () => {
component.ngOnInit();
expect(component.apiRootStateResource$).toBeObservable(singleColdCompleted(apiRootStateResource));
});
});
});
describe('template', () => {
describe('admin-organisationseinheit-form-container', () => {
it('should be rendered if apiRootState has link', () => {
component.apiRootStateResource$ = of(createStateResource(createApiRootResource([ApiRootLinkRel.ORGANISATIONS_EINHEIT])));
fixture.detectChanges();
existsAsHtmlElement(fixture, organisationsEinheitFormSelector);
});
it('should not be rendered if apiRootState has no link', () => {
component.apiRootStateResource$ = of(createStateResource(createApiRootResource()));
fixture.detectChanges();
notExistsAsHtmlElement(fixture, organisationsEinheitFormSelector);
});
});
});
});
......@@ -21,10 +21,23 @@
* Die sprachspezifischen Genehmigungen und Beschränkungen
* unter der Lizenz sind dem Lizenztext zu entnehmen.
*/
import { Component } from '@angular/core';
import { ApiRootLinkRel, ApiRootResource, ApiRootService } from '@alfa-client/api-root-shared';
import { createEmptyStateResource, StateResource } from '@alfa-client/tech-shared';
import { Component, inject, OnInit } from '@angular/core';
import { Observable, of } from 'rxjs';
@Component({
selector: 'organisationseinheit-form-page',
templateUrl: './organisationseinheit-form-page.component.html',
})
export class OrganisationsEinheitFormPageComponent {}
export class OrganisationsEinheitFormPageComponent implements OnInit {
private apiRootService = inject(ApiRootService);
public apiRootStateResource$: Observable<StateResource<ApiRootResource>> = of(createEmptyStateResource<ApiRootResource>());
public readonly apiRootLinkRel = ApiRootLinkRel;
ngOnInit(): void {
this.apiRootStateResource$ = this.apiRootService.getApiRoot();
}
}
......@@ -23,4 +23,8 @@
unter der Lizenz sind dem Lizenztext zu entnehmen.
-->
<admin-organisationseinheit-container/>
<ng-container *ngIf="(apiRootStateResource$ | async)?.resource as apiRoot">
@if (apiRoot | hasLink: apiRootLinkRel.ORGANISATIONS_EINHEIT) {
<admin-organisationseinheit-container data-test-id="organisations-einheit-container" />
}
</ng-container>
......@@ -22,17 +22,32 @@
* unter der Lizenz sind dem Lizenztext zu entnehmen.
*/
import { OrganisationsEinheitContainerComponent } from '@admin-client/admin-settings';
import { ApiRootLinkRel, ApiRootResource, ApiRootService } from '@alfa-client/api-root-shared';
import { createStateResource, StateResource, TechSharedModule } from '@alfa-client/tech-shared';
import { existsAsHtmlElement, mock, Mock, notExistsAsHtmlElement } from '@alfa-client/test-utils';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { createApiRootResource } from 'libs/api-root-shared/test/api-root';
import { getDataTestIdOf } from 'libs/tech-shared/test/data-test';
import { singleColdCompleted } from 'libs/tech-shared/test/marbles';
import { MockComponent } from 'ng-mocks';
import { Observable, of } from 'rxjs';
import { OrganisationsEinheitPageComponent } from './organisationseinheit-page.component';
describe('OrganisationsEinheitPageComponent', () => {
let component: OrganisationsEinheitPageComponent;
let fixture: ComponentFixture<OrganisationsEinheitPageComponent>;
const organisationsEinheitContainerSelector: string = getDataTestIdOf('organisations-einheit-container');
let apiRootService: Mock<ApiRootService>;
beforeEach(async () => {
apiRootService = mock(ApiRootService);
await TestBed.configureTestingModule({
imports: [TechSharedModule],
declarations: [OrganisationsEinheitPageComponent, MockComponent(OrganisationsEinheitContainerComponent)],
providers: [{ provide: ApiRootService, useValue: apiRootService }],
}).compileComponents();
});
......@@ -46,4 +61,45 @@ describe('OrganisationsEinheitPageComponent', () => {
it('should create', () => {
expect(component).toBeTruthy();
});
describe('component', () => {
describe('ngOnInit', () => {
const apiRootStateResource: StateResource<ApiRootResource> = createStateResource(createApiRootResource());
const apiRootStateResource$: Observable<StateResource<ApiRootResource>> = of(apiRootStateResource);
beforeEach(() => {
apiRootService.getApiRoot.mockReturnValue(apiRootStateResource$);
});
it('should call apiRootService getApiRoot', () => {
component.ngOnInit();
expect(apiRootService.getApiRoot).toHaveBeenCalled();
});
it('should get apiRootStateResource$', () => {
component.ngOnInit();
expect(component.apiRootStateResource$).toBeObservable(singleColdCompleted(apiRootStateResource));
});
});
});
describe('template', () => {
describe('admin-organisationseinheit-container', () => {
it('should be rendered if apiRootState has link', () => {
component.apiRootStateResource$ = of(createStateResource(createApiRootResource([ApiRootLinkRel.ORGANISATIONS_EINHEIT])));
fixture.detectChanges();
existsAsHtmlElement(fixture, organisationsEinheitContainerSelector);
});
it('should not be rendered if apiRootState has no link', () => {
component.apiRootStateResource$ = of(createStateResource(createApiRootResource()));
fixture.detectChanges();
notExistsAsHtmlElement(fixture, organisationsEinheitContainerSelector);
});
});
});
});
......@@ -21,10 +21,23 @@
* Die sprachspezifischen Genehmigungen und Beschränkungen
* unter der Lizenz sind dem Lizenztext zu entnehmen.
*/
import { Component } from '@angular/core';
import { ApiRootLinkRel, ApiRootResource, ApiRootService } from '@alfa-client/api-root-shared';
import { createEmptyStateResource, StateResource } from '@alfa-client/tech-shared';
import { Component, inject, OnInit } from '@angular/core';
import { Observable, of } from 'rxjs';
@Component({
selector: 'organisationseinheit-page',
templateUrl: './organisationseinheit-page.component.html',
})
export class OrganisationsEinheitPageComponent {}
export class OrganisationsEinheitPageComponent implements OnInit {
private apiRootService = inject(ApiRootService);
public apiRootStateResource$: Observable<StateResource<ApiRootResource>> = of(createEmptyStateResource<ApiRootResource>());
public readonly apiRootLinkRel = ApiRootLinkRel;
ngOnInit(): void {
this.apiRootStateResource$ = this.apiRootService.getApiRoot();
}
}
......@@ -23,4 +23,6 @@
unter der Lizenz sind dem Lizenztext zu entnehmen.
-->
<admin-postfach-container></admin-postfach-container>
@if (environment.features.postfach) {
<admin-postfach-container data-test-id="postfach-container" />
}
......@@ -22,14 +22,25 @@
* unter der Lizenz sind dem Lizenztext zu entnehmen.
*/
import { PostfachContainerComponent } from '@admin-client/admin-settings';
import { getEnvironmentFactory } from '@alfa-client/environment-shared';
import { existsAsHtmlElement, notExistsAsHtmlElement } from '@alfa-client/test-utils';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { createEnvironment } from 'libs/environment-shared/test/environment';
import { getDataTestIdOf } from 'libs/tech-shared/test/data-test';
import { MockComponent } from 'ng-mocks';
import { PostfachPageComponent } from './postfach-page.component';
jest.mock('@alfa-client/environment-shared');
describe('PostfachPageComponent', () => {
let component: PostfachPageComponent;
let fixture: ComponentFixture<PostfachPageComponent>;
const postfachContainerSelector: string = getDataTestIdOf('postfach-container');
const environment = createEnvironment();
(getEnvironmentFactory as jest.Mock).mockReturnValue(environment);
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [PostfachPageComponent, MockComponent(PostfachContainerComponent)],
......@@ -39,11 +50,28 @@ describe('PostfachPageComponent', () => {
beforeEach(() => {
fixture = TestBed.createComponent(PostfachPageComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
describe('template', () => {
describe('admin-postfach-container', () => {
it('should be rendered if feature toggle postfach is true', () => {
environment.features.postfach = true;
fixture.detectChanges();
existsAsHtmlElement(fixture, postfachContainerSelector);
});
it('should not be rendered if feature toggle postfach is false', () => {
environment.features.postfach = false;
fixture.detectChanges();
notExistsAsHtmlElement(fixture, postfachContainerSelector);
});
});
});
});
......@@ -21,10 +21,13 @@
* Die sprachspezifischen Genehmigungen und Beschränkungen
* unter der Lizenz sind dem Lizenztext zu entnehmen.
*/
import { Environment, getEnvironmentFactory } from '@alfa-client/environment-shared';
import { Component } from '@angular/core';
@Component({
selector: 'postfach-page',
templateUrl: './postfach-page.component.html',
})
export class PostfachPageComponent {}
export class PostfachPageComponent {
public readonly environment: Environment = getEnvironmentFactory();
}
......@@ -23,4 +23,6 @@
unter der Lizenz sind dem Lizenztext zu entnehmen.
-->
<admin-user-add-form />
@if (environment.features.benutzerRollen) {
<admin-user-add-form data-test-id="user-add-form" />
}
......@@ -22,14 +22,25 @@
* unter der Lizenz sind dem Lizenztext zu entnehmen.
*/
import { UserAddFormComponent } from '@admin-client/admin-settings';
import { getEnvironmentFactory } from '@alfa-client/environment-shared';
import { existsAsHtmlElement, notExistsAsHtmlElement } from '@alfa-client/test-utils';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { createEnvironment } from 'libs/environment-shared/test/environment';
import { getDataTestIdOf } from 'libs/tech-shared/test/data-test';
import { MockComponent } from 'ng-mocks';
import { UserAddPageComponent } from './user-add-page.component';
jest.mock('@alfa-client/environment-shared');
describe('UserAddPageComponent', () => {
let component: UserAddPageComponent;
let fixture: ComponentFixture<UserAddPageComponent>;
const userAddFormSelector: string = getDataTestIdOf('user-add-form');
const environment = createEnvironment();
(getEnvironmentFactory as jest.Mock).mockReturnValue(environment);
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [UserAddPageComponent, MockComponent(UserAddFormComponent)],
......@@ -43,4 +54,22 @@ describe('UserAddPageComponent', () => {
it('should create', () => {
expect(component).toBeTruthy();
});
describe('template', () => {
describe('admin-user-add-form', () => {
it('should be rendered if feature toggle for benutzerRollen is true', () => {
environment.features.benutzerRollen = true;
fixture.detectChanges();
existsAsHtmlElement(fixture, userAddFormSelector);
});
it('should not be rendered if feature toggle for benutzerRollen is false', () => {
environment.features.benutzerRollen = false;
fixture.detectChanges();
notExistsAsHtmlElement(fixture, userAddFormSelector);
});
});
});
});
......@@ -21,10 +21,13 @@
* Die sprachspezifischen Genehmigungen und Beschränkungen
* unter der Lizenz sind dem Lizenztext zu entnehmen.
*/
import { Environment, getEnvironmentFactory } from '@alfa-client/environment-shared';
import { Component } from '@angular/core';
@Component({
selector: 'user-add-page',
templateUrl: './user-add-page.component.html',
})
export class UserAddPageComponent {}
export class UserAddPageComponent {
public readonly environment: Environment = getEnvironmentFactory();
}
......@@ -23,4 +23,6 @@
unter der Lizenz sind dem Lizenztext zu entnehmen.
-->
<admin-users-roles />
\ No newline at end of file
@if (environment.features.benutzerRollen) {
<admin-users-roles data-test-id="users-roles" />
}
......@@ -22,14 +22,25 @@
* unter der Lizenz sind dem Lizenztext zu entnehmen.
*/
import { UsersRolesComponent } from '@admin-client/admin-settings';
import { getEnvironmentFactory } from '@alfa-client/environment-shared';
import { existsAsHtmlElement, notExistsAsHtmlElement } from '@alfa-client/test-utils';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { createEnvironment } from 'libs/environment-shared/test/environment';
import { getDataTestIdOf } from 'libs/tech-shared/test/data-test';
import { MockComponent } from 'ng-mocks';
import { UserRolesPageComponent } from './user-roles-page.component';
jest.mock('@alfa-client/environment-shared');
describe('UserRolesPageComponent', () => {
let component: UserRolesPageComponent;
let fixture: ComponentFixture<UserRolesPageComponent>;
const usersRolesSelector: string = getDataTestIdOf('users-roles');
const environment = createEnvironment();
(getEnvironmentFactory as jest.Mock).mockReturnValue(environment);
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [UserRolesPageComponent],
......@@ -44,4 +55,22 @@ describe('UserRolesPageComponent', () => {
it('should create', () => {
expect(component).toBeTruthy();
});
describe('template', () => {
describe('admin-users-roles', () => {
it('should be rendered if feature toggle benutzerRollen is true', () => {
environment.features.benutzerRollen = true;
fixture.detectChanges();
existsAsHtmlElement(fixture, usersRolesSelector);
});
it('should not be rendered component if feature toggle benutzerRollen is false', () => {
environment.features.benutzerRollen = false;
fixture.detectChanges();
notExistsAsHtmlElement(fixture, usersRolesSelector);
});
});
});
});
......@@ -21,10 +21,13 @@
* Die sprachspezifischen Genehmigungen und Beschränkungen
* unter der Lizenz sind dem Lizenztext zu entnehmen.
*/
import { Environment, getEnvironmentFactory } from '@alfa-client/environment-shared';
import { Component } from '@angular/core';
@Component({
selector: 'app-user-roles-page',
templateUrl: './user-roles-page.component.html',
})
export class UserRolesPageComponent {}
export class UserRolesPageComponent {
public readonly environment: Environment = getEnvironmentFactory();
}
......@@ -30,4 +30,8 @@ export interface Environment {
realm: string;
clientId: string;
processorNames: string[];
features: {
postfach: boolean;
benutzerRollen: boolean;
};
}
......@@ -32,6 +32,10 @@ const environment: Environment = {
realm: faker.word.sample(),
clientId: faker.string.uuid(),
processorNames: [faker.person.fullName()],
features: {
postfach: true,
benutzerRollen: true,
},
};
export function createEnvironment(): Environment {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment