diff --git a/modules/ui/src/app/components/simple-dialog/simple-dialog.component.html b/modules/ui/src/app/components/simple-dialog/simple-dialog.component.html index 93e1cb845..c2201f377 100644 --- a/modules/ui/src/app/components/simple-dialog/simple-dialog.component.html +++ b/modules/ui/src/app/components/simple-dialog/simple-dialog.component.html @@ -13,6 +13,11 @@ See the License for the specific language governing permissions and limitations under the License. --> +{{ + data.icon + }} {{ data.title }}

{{ data.content }} diff --git a/modules/ui/src/app/components/simple-dialog/simple-dialog.component.scss b/modules/ui/src/app/components/simple-dialog/simple-dialog.component.scss index 9491aa3ab..924e516f2 100644 --- a/modules/ui/src/app/components/simple-dialog/simple-dialog.component.scss +++ b/modules/ui/src/app/components/simple-dialog/simple-dialog.component.scss @@ -27,6 +27,10 @@ gap: 10px; } +.simple-dialog-icon { + text-align: center; +} + .simple-dialog-title { @include mixins.headline-small(); padding: 0; diff --git a/modules/ui/src/app/components/simple-dialog/simple-dialog.component.spec.ts b/modules/ui/src/app/components/simple-dialog/simple-dialog.component.spec.ts index 7ac624c6c..e001f776d 100644 --- a/modules/ui/src/app/components/simple-dialog/simple-dialog.component.spec.ts +++ b/modules/ui/src/app/components/simple-dialog/simple-dialog.component.spec.ts @@ -48,6 +48,7 @@ describe('DeleteFormComponent', () => { fixture = TestBed.createComponent(SimpleDialogComponent); component = fixture.componentInstance; component.data = { + icon: 'favorite', title: 'title?', content: 'content', }; @@ -59,6 +60,12 @@ describe('DeleteFormComponent', () => { expect(component).toBeTruthy(); }); + it('should has icon', () => { + const title = compiled.querySelector('mat-icon') as HTMLElement; + + expect(title.innerHTML).toEqual('favorite'); + }); + it('should has title', () => { const title = compiled.querySelector('.simple-dialog-title') as HTMLElement; diff --git a/modules/ui/src/app/components/simple-dialog/simple-dialog.component.ts b/modules/ui/src/app/components/simple-dialog/simple-dialog.component.ts index 55adba66a..de11568c7 100644 --- a/modules/ui/src/app/components/simple-dialog/simple-dialog.component.ts +++ b/modules/ui/src/app/components/simple-dialog/simple-dialog.component.ts @@ -24,8 +24,11 @@ import { EscapableDialogComponent } from '../escapable-dialog/escapable-dialog.c import { ComponentWithAnnouncement } from '../component-with-announcement'; import { LiveAnnouncer } from '@angular/cdk/a11y'; import { FocusManagerService } from '../../services/focus-manager.service'; +import { MatIconModule } from '@angular/material/icon'; +import { CommonModule } from '@angular/common'; interface DialogData { + icon?: string; title?: string; content?: string; confirmName?: string; @@ -36,7 +39,7 @@ interface DialogData { templateUrl: './simple-dialog.component.html', styleUrls: ['./simple-dialog.component.scss'], - imports: [MatDialogModule, MatButtonModule], + imports: [MatDialogModule, MatButtonModule, MatIconModule, CommonModule], }) export class SimpleDialogComponent extends ComponentWithAnnouncement( EscapableDialogComponent diff --git a/modules/ui/src/app/pages/testrun/testrun.component.html b/modules/ui/src/app/pages/testrun/testrun.component.html index e05323827..196d308ff 100644 --- a/modules/ui/src/app/pages/testrun/testrun.component.html +++ b/modules/ui/src/app/pages/testrun/testrun.component.html @@ -67,7 +67,7 @@