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

OZG-2499 Tab "Historie" nicht disablen, sondern ausblenden

.. wenn Link "historie" nicht vorhanden
parent c3845573
No related branches found
No related tags found
No related merge requests found
......@@ -23,8 +23,7 @@
<goofy-client-vorgang-detail-attachment-list data-test-id="tab-attachments-list" [vorgangWithEingang]="vorgangWithEingang"></goofy-client-vorgang-detail-attachment-list>
</ng-template>
</mat-tab>
<mat-tab label="Historie"
[disabled]="vorgangWithEingang | notHasLink:vorgangWithEingangLinkRel.HISTORIE">
<mat-tab label="Historie" *ngIf="vorgangWithEingang | hasLink:vorgangWithEingangLinkRel.HISTORIE">
<ng-template matTabContent>
<goofy-client-vorgang-historie-container data-test-id="tab-historie-container" [vorgangWithEingang]="vorgangWithEingang"></goofy-client-vorgang-historie-container>
</ng-template>
......
......@@ -145,22 +145,22 @@ describe('VorgangDetailFormularDatenComponent', () => {
})
describe('Tab Historie', () => {
it('should be enabled if Link "historie" exists', () => {
it('should be visible if Link "historie" exists', () => {
component.vorgangWithEingang = vorgangWithHistorie;
fixture.detectChanges();
const tab = getElementFromFixture(fixture, tabHistorie);
expect(tab).not.toHaveClass('mat-tab-disabled');
expect(tab).toBeInTheDocument();
})
it('should be disable if no Link "historie"', () => {
it('should not be visible if no Link "historie"', () => {
component.vorgangWithEingang = vorgang;
fixture.detectChanges();
const tab = getElementFromFixture(fixture, tabHistorie);
expect(tab).toHaveClass('mat-tab-disabled');
expect(tab).not.toBeInTheDocument();
})
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment