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

Merge remote-tracking branch 'origin/master' into OZG-5665-xDomea-Bescheid-Dateien-Download

parents dbb9326c 512b4505
No related branches found
No related tags found
No related merge requests found
Showing
with 225 additions and 185 deletions
import { OrganisationseinheitContainerComponent } from '@admin-client/admin-settings';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { OrganisationseinheitPageComponent } from './organisationseinheit-page.component';
import { MockComponent } from 'ng-mocks';
import { OrganisationseinheitContainerComponent } from '@admin-client/admin-settings';
import { OrganisationseinheitPageComponent } from './organisationseinheit-page.component';
describe('OrganisationseinheitPageComponent', () => {
let component: OrganisationseinheitPageComponent;
......
import { PostfachContainerComponent } from '@admin-client/admin-settings';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { PostfachPageComponent } from './postfach-page.component';
import { MockComponent } from 'ng-mocks';
import { PostfachContainerComponent } from '@admin-client/admin-settings';
import { PostfachPageComponent } from './postfach-page.component';
describe('PostfachPageComponent', () => {
let component: PostfachPageComponent;
......
globalThis.ngJest = {
testEnvironmentOptions: {
errorOnUnknownElements: true,
errorOnUnknownProperties: true
}
errorOnUnknownProperties: true,
},
};
import 'jest-preset-angular/setup-jest';
{
"compilerOptions": {
"target": "es2022",
"useDefineForClassFields": false,
"useDefineForClassFields": false
// "forceConsistentCasingInFileNames": true,
// "strict": true,
// "noImplicitOverride": true,
......
......@@ -19,3 +19,11 @@ Beispiel Namespace: sh-mastere2emain-dev
3. Host Eintrag ergänzen: In `/etc/hosts` folgenden Eintrag ergänzen: `127.0.0.1 vorgang-manager-database-0.vorgang-manager-database-svc.sh-mastere2emain-dev.svc.cluster.local`
4. Cypress mit entsprechender config starten: `npm run cypress:open -- --config-file cypress-master-main.json`
## docker-compose
### -march Architektur
In die `.env` Datei eintragen:
USER_MANAGER_DOCKER_IMAGE=march-snapshot-latest
\ No newline at end of file
......@@ -49,6 +49,13 @@ services:
- SPRING_DATA_MONGODB_DATABASE=local
- SPRING_PROFILES_ACTIVE=${SPRING_PROFILE:-local,e2e}
- LOGGING_CONFIG=classpath:log4j2-local.xml
- GRPC_CLIENT_PLUTO_NEGOTIATIONTYPE=PLAINTEXT
- GRPC_CLIENT_VORGANG-MANAGER_NEGOTIATIONTYPE=PLAINTEXT
- GRPC_CLIENT_EMAIL_NEGOTIATIONTYPE=PLAINTEXT
- GRPC_CLIENT_NACHRICHTEN-MANAGER_NEGOTIATIONTYPE=PLAINTEXT
- GRPC_CLIENT_INFO-MANAGER_NEGOTIATIONTYPE=PLAINTEXT
- GRPC_CLIENT_COMMAND-MANAGER_NEGOTIATIONTYPE=PLAINTEXT
- GRPC_SERVER_SECURITY_ENABLED=false
ports:
- 9091:9090
depends_on:
......@@ -64,6 +71,7 @@ services:
- GRPC_CLIENT_USER-MANAGER_ADDRESS=static://user-manager:9000
- GRPC_CLIENT_USER-MANAGER_NEGOTIATIONTYPE=PLAINTEXT
- GRPC_CLIENT_VORGANG-MANAGER_ADDRESS=static://vorgang-manager:9090
- GRPC_CLIENT_VORGANG-MANAGER_NEGOTIATIONTYPE=PLAINTEXT
- KEYCLOAK_AUTH_SERVER_URL=https://sso.dev.by.ozg-cloud.de
- KEYCLOAK_REALM=${KEYCLOAK_REALM:-by-e2e-tests-local-dev}
- KEYCLOAK_RESOURCE=${KEYCLOAK_CLIENT:-alfa}
......
......@@ -45,7 +45,7 @@ export class VorgangBescheidWizardE2EComponent {
private readonly bescheidSpeichernButton: string =
'bescheiderstellung-abbrechen-entwurf-speichern';
private readonly uploadBescheidFile: string = '-single-file-upload-button';
private readonly uploadAttachment: string = 'Attachment_hochladen-file-upload-button';
private readonly uploadAttachment: string = 'Anhang_hochladen-file-upload-button';
private readonly saveBescheid: string = 'save-button';
private readonly confirmAndSaveButton: string = 'confirm-and-save-button';
......
......@@ -17,28 +17,24 @@
<div class="w-96">
<ods-attachment-container>
<ods-attachment
documentName="Mein_2Bescheid.pdf"
caption="Mein_2Bescheid.pdf"
description="234 kB"
fileType="pdf"
isLoading="true"
>
</ods-attachment>
<ods-attachment documentName="Mein_Bescheid.xml" description="234 kB" fileType="xml">
<ods-attachment caption="Mein_Bescheid.xml" description="234 kB" fileType="xml">
</ods-attachment>
<ods-attachment documentName="Mein_Bescheid.xml" description="234 kB" fileType="image">
<ods-attachment caption="Mein_Bescheid.xml" description="234 kB" fileType="image">
</ods-attachment>
<ods-attachment documentName="Mein_Bescheid.doc" description="234 kB" fileType="doc">
<ods-attachment caption="Mein_Bescheid.doc" description="234 kB" fileType="doc">
</ods-attachment>
<ods-attachment documentName="Mein_Bescheid.doc" description="234 kB" fileType="doc">
<ods-attachment caption="Mein_Bescheid.doc" description="234 kB" fileType="doc">
</ods-attachment>
<ods-attachment
documentName="Mein_Bescheid.doc"
description="234 kB"
fileType="exclamation"
>
<ods-attachment caption="Mein_Bescheid.doc" description="234 kB" fileType="exclamation">
</ods-attachment>
<ods-attachment
documentName="Katzenanmeldung_1231231_eingsdfsdsdfdsfdsfsdfang.pdf"
caption="Katzenanmeldung_1231231_eingsdfsdsdfdsfdsfsdfang.pdf"
description="234 kB"
fileType="pdf"
>
......@@ -153,7 +149,7 @@
<ods-button-card
class="w-72"
[isLoading]="false"
text="Bescheid-Dokument"
text="Bescheiddokument"
subText="automatisch erstellen"
>
<ods-bescheid-generate-icon icon />
......@@ -164,7 +160,7 @@
<ods-button-card
class="w-72"
[isLoading]="true"
text="Bescheid-Dokument"
text="Bescheiddokument"
subText="automatisch erstellen"
>
<ods-bescheid-generate-icon icon />
......@@ -175,7 +171,7 @@
<ods-button-card
class="w-72"
[isLoading]="true"
text="Bescheid-Dokument"
text="Bescheiddokument"
subText="automatisch erstellen"
>
<ods-bescheid-generate-icon icon />
......@@ -186,7 +182,7 @@
<ods-button-card
class="w-96"
[isLoading]="true"
text="Bescheid-Dokument und noch mehr"
text="Bescheiddokument und noch mehr"
subText="Subtext in der 2ten Reihe"
>
<ods-bescheid-generate-icon icon />
......@@ -194,7 +190,7 @@
</div>
<div class="mt-4">
<ods-button-card class="w-72" [isLoading]="true" text="Bescheid-Dokument">
<ods-button-card class="w-72" [isLoading]="true" text="Bescheiddokument">
<ods-bescheid-generate-icon icon />
</ods-button-card>
</div>
......@@ -203,14 +199,14 @@
<ods-file-upload-button class="w-72" [isLoading]="false" id="upload117">
<ods-bescheid-upload-icon icon />
<ods-spinner-icon spinner size="extra-large" />
<p text class="text-center">Bescheid-Dokument<br />hochladen</p></ods-file-upload-button
<p text class="text-center">Bescheiddokument<br />hochladen</p></ods-file-upload-button
>
</div>
<div class="mt-4">
<ods-file-upload-button class="w-72" [isLoading]="true" id="upload117">
<ods-bescheid-upload-icon icon />
<ods-spinner-icon spinner size="extra-large" />
<p text class="text-center">Bescheid-Dokument<br />hochladen</p></ods-file-upload-button
<p text class="text-center">Bescheiddokument<br />hochladen</p></ods-file-upload-button
>
</div>
......
export * from './lib/admin-settings.module';
export * from './lib/postfach/postfach-container/postfach-container.component';
export * from './lib/organisationseinheit/organisationseinheit-container/organisationseinheit-container.component';
export * from './lib/postfach/postfach-container/postfach-container.component';
export * from './lib/shared/navigation-item/navigation-item.component';
import {
ListResourceServiceConfig,
ResourceListService,
ResourceRepository,
} from '@alfa-client/tech-shared';
import { Resource } from '@ngxp/rest';
import { SettingListLinkRel } from './admin-settings.linkrel';
import { SettingItemResource, SettingListResource } from './admin-settings.model';
import { ConfigurationLinkRel } from './configuration/configuration.linkrel';
import { ConfigurationResource } from './configuration/configuration.model';
import { ConfigurationService } from './configuration/configuration.service';
export class SettingListResourceService extends ResourceListService<
Resource,
SettingListResource,
SettingItemResource
> {}
export function createSettingListResourceService(
repository: ResourceRepository,
configurationService: ConfigurationService,
) {
return new ResourceListService(buildConfig(configurationService), repository);
}
function buildConfig(
configurationService: ConfigurationService,
): ListResourceServiceConfig<ConfigurationResource> {
return {
baseResource: configurationService.get(),
createLinkRel: SettingListLinkRel.CREATE,
listLinkRel: ConfigurationLinkRel.SETTING,
listResourceListLinkRel: SettingListLinkRel.LIST,
};
}
import { NgModule } from '@angular/core';
import { ApiRootService } from '@alfa-client/api-root-shared';
import { Environment, ENVIRONMENT_CONFIG } from '@alfa-client/environment-shared';
import { ResourceRepository, TechSharedModule } from '@alfa-client/tech-shared';
import { CommonModule } from '@angular/common';
import { TechSharedModule } from '@alfa-client/tech-shared';
import { NavigationItemComponent } from './shared/navigation-item/navigation-item.component';
import { RouterModule } from '@angular/router';
import { NgModule } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { PostfachContainerComponent } from './postfach/postfach-container/postfach-container.component';
import { PostfachFormComponent } from './postfach/postfach-container/postfach-form/postfach-form.component';
import { TextFieldComponent } from './shared/text-field/text-field.component';
import { RouterModule } from '@angular/router';
import KcAdminClient from '@keycloak/keycloak-admin-client';
import {
createSettingListResourceService,
SettingListResourceService,
} from './admin-settings-resource.service';
import { SettingsService } from './admin-settings.service';
import {
ConfigurationResourceService,
createConfigurationResourceService,
} from './configuration/configuration-resource.service';
import { ConfigurationService } from './configuration/configuration.service';
import { NavigationComponent } from './navigation/navigation.component';
import { OrganisationseinheitContainerComponent } from './organisationseinheit/organisationseinheit-container/organisationseinheit-container.component';
import { OrganisationseinheitFormComponent } from './organisationseinheit/organisationseinheit-container/organisationseinheit-form/organisationseinheit-form.component';
import { PrimaryButtonComponent } from './shared/primary-button/primary-button.component';
import { SecondaryButtonComponent } from './shared/secondary-button/secondary-button.component';
import { OrganisationseinheitListComponent } from './organisationseinheit/organisationseinheit-container/organisationseinheit-list/organisationseinheit-list.component';
import { OrganisationseinheitNavigationItemComponent } from './organisationseinheit/organisationseinheit-navigation-item/organisationseinheit-navigation-item.component';
import { PostfachContainerComponent } from './postfach/postfach-container/postfach-container.component';
import { PostfachFormComponent } from './postfach/postfach-container/postfach-form/postfach-form.component';
import { PostfachNavigationItemComponent } from './postfach/postfach-navigation-item/postfach-navigation-item.component';
import { SettingsService } from './admin-settings.service';
import {
createPostfachResourceService,
PostfachResourceService,
} from './postfach/postfach-resource.service';
import { PostfachService } from './postfach/postfach.service';
import { ConfigurationService } from './configuration/configuration.service';
import { NavigationComponent } from './navigation/navigation.component';
import { OrganisationseinheitNavigationItemComponent } from './organisationseinheit/organisationseinheit-navigation-item/organisationseinheit-navigation-item.component';
import KcAdminClient from '@keycloak/keycloak-admin-client';
import { Environment, ENVIRONMENT_CONFIG } from '@alfa-client/environment-shared';
import { MoreMenuComponent } from './shared/more-menu/more-menu.component';
import { MoreItemButtonComponent } from './shared/more-menu/more-item-button/more-item-button.component';
import { MoreMenuComponent } from './shared/more-menu/more-menu.component';
import { NavigationItemComponent } from './shared/navigation-item/navigation-item.component';
import { PrimaryButtonComponent } from './shared/primary-button/primary-button.component';
import { SecondaryButtonComponent } from './shared/secondary-button/secondary-button.component';
import { SpinnerComponent } from './shared/spinner/spinner.component';
import { TextFieldComponent } from './shared/text-field/text-field.component';
@NgModule({
declarations: [
......@@ -62,6 +75,21 @@ import { SpinnerComponent } from './shared/spinner/spinner.component';
}),
deps: [ENVIRONMENT_CONFIG],
},
{
provide: PostfachResourceService,
useFactory: createPostfachResourceService,
deps: [ResourceRepository, SettingsService],
},
{
provide: ConfigurationResourceService,
useFactory: createConfigurationResourceService,
deps: [ResourceRepository, ApiRootService],
},
{
provide: SettingListResourceService,
useFactory: createSettingListResourceService,
deps: [ResourceRepository, ConfigurationService],
},
],
})
export class AdminSettingsModule {}
import { Mock, mock, useFromMock } from '@alfa-client/test-utils';
import { ResourceRepository } from 'libs/tech-shared/src/lib/resource/resource.repository';
import { SettingsService } from './admin-settings.service';
import { SettingListResource } from './admin-settings.model';
import {
StateResource,
createEmptyStateResource,
createStateResource,
StateResource,
} from '@alfa-client/tech-shared';
import { Mock, mock, useFromMock } from '@alfa-client/test-utils';
import { Observable, of } from 'rxjs';
import { ListResourceServiceConfig } from 'libs/tech-shared/src/lib/resource/resource.model';
import { PostfachResource } from './postfach/postfach.model';
import { createSettingItemResource, createPostfachResource } from '../../test/postfach/postfach';
import { singleCold } from '../../../tech-shared/test/marbles';
import { createSettingsListResource } from '../../test/admin-settings';
import { ConfigurationService } from './configuration/configuration.service';
import { createConfigurationResource } from '../../test/configuration/configuration';
import { ConfigurationResource } from './configuration/configuration.model';
import { singleCold } from '../../../tech-shared/src/lib/resource/marbles';
import { SettingListLinkRel } from './admin-settings.linkrel';
import { createPostfachResource, createSettingItemResource } from '../../test/postfach/postfach';
import { SettingListResourceService } from './admin-settings-resource.service';
import { SettingListResource } from './admin-settings.model';
import { SettingsService } from './admin-settings.service';
import { PostfachResource } from './postfach/postfach.model';
describe('SettingsService', () => {
let service: SettingsService;
let configurationService: Mock<ConfigurationService>;
let repository: Mock<ResourceRepository>;
const configurationStateResource$: Observable<StateResource<ConfigurationResource>> = of(
createStateResource(createConfigurationResource()),
);
let settingListResourceService: Mock<SettingListResourceService>;
beforeEach(() => {
configurationService = mock(ConfigurationService);
configurationService.getConfigurationResource.mockReturnValue(configurationStateResource$);
repository = mock(ResourceRepository);
settingListResourceService = mock(SettingListResourceService);
service = new SettingsService(useFromMock(configurationService), useFromMock(repository));
service = new SettingsService(useFromMock(settingListResourceService));
});
it('should create', () => {
expect(service).toBeTruthy();
});
it('should create resourceService', () => {
expect(service.resourceService).toBeTruthy();
});
describe('build config', () => {
it('should have baseResource', () => {
const config: ListResourceServiceConfig<ConfigurationResource> = service.buildConfig();
expect(config.baseResource).toBe(configurationStateResource$);
});
it('should have createLinkRel', () => {
const config: ListResourceServiceConfig<ConfigurationResource> = service.buildConfig();
expect(config.createLinkRel).toBe(SettingListLinkRel.CREATE);
});
it('should have istLinKRel', () => {
const config: ListResourceServiceConfig<ConfigurationResource> = service.buildConfig();
expect(config.listLinkRel).toBe(SettingListLinkRel.LIST);
});
});
describe('get Postfach', () => {
const postfachResource = createPostfachResource();
const postfachStateResource: StateResource<PostfachResource> =
......@@ -73,13 +36,13 @@ describe('SettingsService', () => {
);
beforeEach(() => {
service.resourceService.getList = jest.fn().mockReturnValue(of(settingsListResource));
settingListResourceService.getList = jest.fn().mockReturnValue(of(settingsListResource));
});
it('should call resource service', () => {
service.getPostfach();
expect(service.resourceService.getList).toHaveBeenCalled();
expect(settingListResourceService.getList).toHaveBeenCalled();
});
it('should return null for non postfach resource', () => {
......@@ -87,7 +50,7 @@ describe('SettingsService', () => {
createSettingsListResource([createSettingItemResource()]),
);
service.resourceService.getList = jest
settingListResourceService.getList = jest
.fn()
.mockReturnValue(singleCold(emptySettingsListResource));
......@@ -96,7 +59,9 @@ describe('SettingsService', () => {
});
it('should return item resource as postfach resource', () => {
service.resourceService.getList = jest.fn().mockReturnValue(singleCold(settingsListResource));
settingListResourceService.getList = jest
.fn()
.mockReturnValue(singleCold(settingsListResource));
const postfach: Observable<StateResource<PostfachResource>> = service.getPostfach();
......
import { Injectable } from '@angular/core';
import { ResourceListService } from 'libs/tech-shared/src/lib/resource/list-resource.service';
import { SettingItemResource, SettingListResource } from './admin-settings.model';
import { ResourceRepository } from 'libs/tech-shared/src/lib/resource/resource.repository';
import { ListResourceServiceConfig } from 'libs/tech-shared/src/lib/resource/resource.model';
import { map, Observable } from 'rxjs';
import { StateResource } from '@alfa-client/tech-shared';
import { PostfachResource } from './postfach/postfach.model';
import { ConfigurationService } from './configuration/configuration.service';
import { ConfigurationResource } from './configuration/configuration.model';
import { Injectable } from '@angular/core';
import { Observable, map } from 'rxjs';
import { SettingListResourceService } from './admin-settings-resource.service';
import { getPostfachResource } from './admin-settings.util';
import { SettingListLinkRel } from './admin-settings.linkrel';
import { PostfachResource } from './postfach/postfach.model';
@Injectable()
export class SettingsService {
resourceService: ResourceListService<
ConfigurationResource,
SettingListResource,
SettingItemResource
>;
constructor(
private configurationService: ConfigurationService,
repository: ResourceRepository,
) {
this.resourceService = new ResourceListService(this.buildConfig(), repository);
}
buildConfig(): ListResourceServiceConfig<ConfigurationResource> {
return {
baseResource: this.configurationService.getConfigurationResource(),
createLinkRel: SettingListLinkRel.CREATE,
listLinkRel: SettingListLinkRel.LIST,
};
}
constructor(private settingListResourceService: SettingListResourceService) {}
public getPostfach(): Observable<StateResource<PostfachResource>> {
return this.resourceService.getList().pipe(map(getPostfachResource));
return this.settingListResourceService.getList().pipe(map(getPostfachResource));
}
}
import { PostfachResource } from './postfach/postfach.model';
import { createPostfachResource } from '../../test/postfach/postfach';
import {
createEmptyStateResource,
createStateResource,
StateResource,
} from '@alfa-client/tech-shared';
import { SettingListResource } from './admin-settings.model';
import { createFilledSettingsListResource } from '../../test/admin-settings';
import { createPostfachResource } from '../../test/postfach/postfach';
import { SettingListResource } from './admin-settings.model';
import { getPostfachResource } from './admin-settings.util';
import { PostfachResource } from './postfach/postfach.model';
describe('get postfach resource', () => {
it('should return state resource with postfach resource if exists', () => {
......
......@@ -5,9 +5,9 @@ import {
isNotNil,
StateResource,
} from '@alfa-client/tech-shared';
import { PostfachResource } from './postfach/postfach.model';
import { SettingItemResource, SettingListResource, SettingName } from './admin-settings.model';
import { SettingListLinkRel } from './admin-settings.linkrel';
import { SettingItemResource, SettingListResource, SettingName } from './admin-settings.model';
import { PostfachResource } from './postfach/postfach.model';
export function getPostfachResource(
settingsListResource: StateResource<SettingListResource>,
......
import { ApiRootLinkRel, ApiRootResource, ApiRootService } from '@alfa-client/api-root-shared';
import {
ApiResourceService,
ResourceRepository,
ResourceServiceConfig,
} from '@alfa-client/tech-shared';
import { ConfigurationResource } from './configuration.model';
export class ConfigurationResourceService extends ApiResourceService<
ApiRootResource,
ConfigurationResource
> {}
export function createConfigurationResourceService(
repository: ResourceRepository,
apiRootService: ApiRootService,
) {
return new ApiResourceService(buildConfig(apiRootService), repository);
}
function buildConfig(apiRootService: ApiRootService): ResourceServiceConfig<ApiRootResource> {
return {
resource: apiRootService.getApiRoot(),
getLinkRel: ApiRootLinkRel.CONFIGURATION,
};
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment