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

OZG-2139 OZG-3440 adapt new structure; cleanup

parent 4c22fec4
No related branches found
No related tags found
No related merge requests found
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
--> -->
<h3>Antragstellerdaten</h3> <h3>Antragstellerdaten</h3>
<mat-list *ngIf="antragstellerExists; else noAntragsteller" data-test-id="antragsteller-mat-list"> <mat-list *ngIf="antragsteller; else noAntragsteller" data-test-id="antragsteller-mat-list">
<mat-list-item *ngIf="name" > <mat-list-item *ngIf="name" >
<mat-icon mat-list-icon class="material-icons-outlined" aria-label="Name" aria-hidden="false">assignment_ind</mat-icon> <mat-icon mat-list-icon class="material-icons-outlined" aria-label="Name" aria-hidden="false">assignment_ind</mat-icon>
<div mat-line data-test-id="antragsteller-name">{{ name }}</div> <div mat-line data-test-id="antragsteller-name">{{ name }}</div>
......
...@@ -27,7 +27,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; ...@@ -27,7 +27,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MatRipple } from '@angular/material/core'; import { MatRipple } from '@angular/material/core';
import { MatIcon } from '@angular/material/icon'; import { MatIcon } from '@angular/material/icon';
import { MatList, MatListItem } from '@angular/material/list'; import { MatList, MatListItem } from '@angular/material/list';
import { EMPTY_STRING } from '@goofy-client/tech-shared';
import { Antragsteller } from '@goofy-client/vorgang-shared'; import { Antragsteller } from '@goofy-client/vorgang-shared';
import { getElementFromFixture } from 'libs/test-utils/src/lib/helper'; import { getElementFromFixture } from 'libs/test-utils/src/lib/helper';
import { createAntragsteller } from 'libs/vorgang-shared/test/vorgang'; import { createAntragsteller } from 'libs/vorgang-shared/test/vorgang';
...@@ -50,24 +49,6 @@ describe('VorgangDetailAntragstellerComponent', () => { ...@@ -50,24 +49,6 @@ describe('VorgangDetailAntragstellerComponent', () => {
const noAntragsteller: string = '[data-test-id="no-antragsteller"]'; const noAntragsteller: string = '[data-test-id="no-antragsteller"]';
const antragsteller: Antragsteller = createAntragsteller(); const antragsteller: Antragsteller = createAntragsteller();
const emptyAntragsteller: Antragsteller = createEmptyAntragsteller();
function createEmptyAntragsteller(): Antragsteller {
return {
anrede: EMPTY_STRING,
geburtsdatum: EMPTY_STRING,
geburtsname: EMPTY_STRING,
geburtsort: EMPTY_STRING,
nachname: EMPTY_STRING,
vorname: EMPTY_STRING,
email: EMPTY_STRING,
telefon: EMPTY_STRING,
strasse: EMPTY_STRING,
hausnummer: EMPTY_STRING,
plz: EMPTY_STRING,
ort: EMPTY_STRING
}
}
beforeEach(async () => { beforeEach(async () => {
await TestBed.configureTestingModule({ await TestBed.configureTestingModule({
...@@ -237,7 +218,7 @@ describe('VorgangDetailAntragstellerComponent', () => { ...@@ -237,7 +218,7 @@ describe('VorgangDetailAntragstellerComponent', () => {
describe('antragsteller empty', () => { describe('antragsteller empty', () => {
beforeEach(() => { beforeEach(() => {
component.antragsteller = emptyAntragsteller; component.antragsteller = null;
fixture.detectChanges(); fixture.detectChanges();
}); });
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
import { Component, Input } from '@angular/core'; import { Component, Input } from '@angular/core';
import { formatFullDate, isParsableToDate } from '@goofy-client/tech-shared'; import { formatFullDate, isParsableToDate } from '@goofy-client/tech-shared';
import { Antragsteller } from '@goofy-client/vorgang-shared'; import { Antragsteller } from '@goofy-client/vorgang-shared';
import { isEmpty } from 'lodash-es';
@Component({ @Component({
selector: 'goofy-client-vorgang-detail-antragsteller', selector: 'goofy-client-vorgang-detail-antragsteller',
...@@ -35,18 +34,6 @@ export class VorgangDetailAntragstellerComponent { ...@@ -35,18 +34,6 @@ export class VorgangDetailAntragstellerComponent {
@Input() antragsteller: Antragsteller; @Input() antragsteller: Antragsteller;
get antragstellerExists(): boolean {
if (isEmpty(this.name)
&& isEmpty(this.antragstellerStrasseHausnummer)
&& isEmpty(this.antragstellerPlzOrt)
&& isEmpty(this.geburt)
&& isEmpty(this.antragsteller.telefon)
&& isEmpty(this.antragsteller.email)) {
return false;
}
return true;
}
get name(): string { get name(): string {
return [this.antragsteller.anrede, this.antragsteller.vorname, this.antragsteller.nachname].join(' ').trim(); return [this.antragsteller.anrede, this.antragsteller.vorname, this.antragsteller.nachname].join(' ').trim();
} }
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</div> </div>
</div> </div>
<div class="sticky-right"> <div class="sticky-right">
<goofy-client-vorgang-detail-antragsteller *ngIf="vorgangResource.eingang.antragsteller as antragsteller" [antragsteller]="antragsteller" data-test-id="vorgang-detail-antragsteller"></goofy-client-vorgang-detail-antragsteller> <goofy-client-vorgang-detail-antragsteller [antragsteller]="vorgangResource.eingang.antragsteller" data-test-id="vorgang-detail-antragsteller"></goofy-client-vorgang-detail-antragsteller>
<goofy-client-postfach-mail-list-container *ngIf="vorgangResource | hasLink: linkRel.POSTFACH_MAILS" [vorgang]="vorgangResource" data-test-id="postfach-nachrichten-container-in-vorgang" class="scroll-area"></goofy-client-postfach-mail-list-container> <goofy-client-postfach-mail-list-container *ngIf="vorgangResource | hasLink: linkRel.POSTFACH_MAILS" [vorgang]="vorgangResource" data-test-id="postfach-nachrichten-container-in-vorgang" class="scroll-area"></goofy-client-postfach-mail-list-container>
</div> </div>
</ng-container> </ng-container>
\ No newline at end of file
...@@ -46,7 +46,6 @@ describe('VorgangDetailAreaComponent', () => { ...@@ -46,7 +46,6 @@ describe('VorgangDetailAreaComponent', () => {
const wiedervorlagenContainer: string = '[data-test-id="wiedervorlagen-container-in-vorgang"]'; const wiedervorlagenContainer: string = '[data-test-id="wiedervorlagen-container-in-vorgang"]';
const kommentarContainer: string = '[data-test-id="kommentar-container-in-vorgang"]'; const kommentarContainer: string = '[data-test-id="kommentar-container-in-vorgang"]';
const postfachNachrichtenContainer: string = '[data-test-id="postfach-nachrichten-container-in-vorgang"]'; const postfachNachrichtenContainer: string = '[data-test-id="postfach-nachrichten-container-in-vorgang"]';
const vorgangDetailAntragsteller: string = '[data-test-id="vorgang-detail-antragsteller"]';
const forwardingContainer: string = '[data-test-id="forwarding-container-in-vorgang"]'; const forwardingContainer: string = '[data-test-id="forwarding-container-in-vorgang"]';
const vorgang: VorgangWithEingangResource = createVorgangWithEingangResource(); const vorgang: VorgangWithEingangResource = createVorgangWithEingangResource();
...@@ -148,34 +147,6 @@ describe('VorgangDetailAreaComponent', () => { ...@@ -148,34 +147,6 @@ describe('VorgangDetailAreaComponent', () => {
}) })
}) })
describe('antragsteller details', () => {
it('should be visible', () => {
component.vorgangStateResource = createStateResource(vorgang);
fixture.detectChanges();
const element = fixture.nativeElement.querySelector(vorgangDetailAntragsteller);
expect(element).toBeInstanceOf(HTMLElement);
})
it('should be hidden', () => {
const vorgangOhneAntragsteller: VorgangWithEingangResource = {
...vorgang,
eingang: {
...vorgang.eingang,
antragsteller: null,
}
};
component.vorgangStateResource = createStateResource(vorgangOhneAntragsteller);
fixture.detectChanges();
const element = fixture.nativeElement.querySelector(vorgangDetailAntragsteller);
expect(element).not.toBeInstanceOf(HTMLElement);
})
})
describe('forwarding', () => { describe('forwarding', () => {
it('should be visible', () => { it('should be visible', () => {
...@@ -196,6 +167,4 @@ describe('VorgangDetailAreaComponent', () => { ...@@ -196,6 +167,4 @@ describe('VorgangDetailAreaComponent', () => {
expect(element).not.toBeInstanceOf(HTMLElement); expect(element).not.toBeInstanceOf(HTMLElement);
}) })
}) })
}); });
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment