Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import { MatDialogModule, MatDialogRef } from '@angular/material/dialog';
import { TestRunService } from '../../services/test-run.service';
import SpyObj = jasmine.SpyObj;
import { of } from 'rxjs';
import { ShutdownAppModalComponent } from '../shutdown-app-modal/shutdown-app-modal.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { WINDOW } from '../../providers/window.provider';
import { SimpleDialogComponent } from '../simple-dialog/simple-dialog.component';

describe('ShutdownAppComponent', () => {
let component: ShutdownAppComponent;
Expand Down Expand Up @@ -71,7 +71,7 @@ describe('ShutdownAppComponent', () => {
mockService.shutdownTestrun.and.returnValue(of(false));
spyOn(component.dialog, 'open').and.returnValue({
afterClosed: () => of(true),
} as MatDialogRef<typeof ShutdownAppModalComponent>);
} as MatDialogRef<typeof SimpleDialogComponent>);
tick();

component.openShutdownModal();
Expand All @@ -83,7 +83,7 @@ describe('ShutdownAppComponent', () => {
mockService.shutdownTestrun.and.returnValue(of(true));
spyOn(component.dialog, 'open').and.returnValue({
afterClosed: () => of(true),
} as MatDialogRef<typeof ShutdownAppModalComponent>);
} as MatDialogRef<typeof SimpleDialogComponent>);
tick();

component.openShutdownModal();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import { CommonModule } from '@angular/common';
import { MatButtonModule } from '@angular/material/button';
import { MatIcon } from '@angular/material/icon';
import { MatDialog } from '@angular/material/dialog';
import { ShutdownAppModalComponent } from '../shutdown-app-modal/shutdown-app-modal.component';
import { Subject, takeUntil } from 'rxjs';
import { TestRunService } from '../../services/test-run.service';
import { WINDOW } from '../../providers/window.provider';
import { MatTooltipModule } from '@angular/material/tooltip';
import { SimpleDialogComponent } from '../simple-dialog/simple-dialog.component';

@Component({
selector: 'app-shutdown-app',
Expand All @@ -47,16 +47,19 @@ export class ShutdownAppComponent implements OnDestroy {
private destroy$: Subject<boolean> = new Subject<boolean>();

openShutdownModal() {
const dialogRef = this.dialog.open(ShutdownAppModalComponent, {
const dialogRef = this.dialog.open(SimpleDialogComponent, {
ariaLabel: 'Shutdown Testrun',
data: {
title: 'Shutdown Testrun',
content: 'Do you want to stop Testrun?',
icon: 'power_settings_new',
title: 'Shutdown Testrun?',
content:
'Testrun will shutdown and all testing processes will be stopped.',
confirmName: 'Stop Server & Quit',
},
autoFocus: true,
hasBackdrop: true,
disableClose: true,
panelClass: 'shutdown-app-dialog',
panelClass: ['simple-dialog', 'shutdown-app-dialog'],
});

dialogRef
Expand Down
1 change: 1 addition & 0 deletions modules/ui/src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ body {
}
}

.shutdown-app-dialog app-simple-dialog,
.delete-dialog app-simple-dialog,
.discard-dialog app-simple-dialog {
--mat-dialog-container-max-width: 329px;
Expand Down
Loading