AAE-22043 Fix long form flow outside container (#10265)

* AAE-22043 Fix long form flow outside container

* AAE-22043 Fix unit test
This commit is contained in:
Diogo Bastos
2024-10-04 11:11:57 +01:00
committed by GitHub
parent 2aa9f5b4be
commit 0e085bc73a
3 changed files with 20 additions and 12 deletions

View File

@@ -36,7 +36,11 @@
</button>
</adf-toolbar>
<mat-card appearance="outlined" [class.adf-cloud-form-content-card]="displayConfiguration?.options?.fullscreen">
<mat-card
appearance="outlined"
class="adf-cloud-form-content-card"
[class.adf-cloud-form-content-card-fullscreen]="displayMode === 'fullScreen'"
>
<div class="adf-cloud-form-content-card-container">
<mat-card-header *ngIf="showTitle || showRefreshButton || showValidationIcon">
<mat-card-title>
@@ -93,4 +97,4 @@
</div>
</mat-card>
</div>
</div>
</div>

View File

@@ -67,18 +67,22 @@
}
&-content-card {
padding: 0;
height: 100%;
width: 100%;
overflow-y: auto;
.adf-cloud-form-content-card-container {
display: flex;
flex-direction: column;
&-fullscreen {
padding: 0;
height: 100%;
width: 100%;
#{$mat-card-content} {
.adf-cloud-form-content-card-container {
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden auto;
#{$mat-card-content} {
height: 100%;
overflow: hidden auto;
}
}
}
}

View File

@@ -1319,7 +1319,7 @@ describe('FormCloudComponent', () => {
});
it('should not set the styles for the card', () => {
const fullScreenCard = fixture.debugElement.query(By.css('.adf-cloud-form-content-card'));
const fullScreenCard = fixture.debugElement.query(By.css('.adf-cloud-form-content-card-fullscreen'));
expect(fullScreenCard).toBeNull();
});
@@ -1405,7 +1405,7 @@ describe('FormCloudComponent', () => {
});
it('should set the styles for the card', () => {
const fullScreenCard = fixture.debugElement.query(By.css('.adf-cloud-form-content-card'));
const fullScreenCard = fixture.debugElement.query(By.css('.adf-cloud-form-content-card-fullscreen'));
expect(fullScreenCard).not.toBeNull();
});