diff --git a/modules/ui/src/app/pages/testrun/testrun.component.html b/modules/ui/src/app/pages/testrun/testrun.component.html index 890378f12..028f109db 100644 --- a/modules/ui/src/app/pages/testrun/testrun.component.html +++ b/modules/ui/src/app/pages/testrun/testrun.component.html @@ -96,7 +96,9 @@

aria-label="Start new testrun" color="primary" [disabled]=" - hasDevices === false || isTestrunInProgress(systemStatus?.status) + hasDevices === false || + isTestrunInProgress(systemStatus?.status) || + systemStatus?.status === StatusOfTestrun.Cancelling " (click)="openTestRunModal()" mat-flat-button> diff --git a/modules/ui/src/app/pages/testrun/testrun.component.spec.ts b/modules/ui/src/app/pages/testrun/testrun.component.spec.ts index 0605254ce..873212f72 100644 --- a/modules/ui/src/app/pages/testrun/testrun.component.spec.ts +++ b/modules/ui/src/app/pages/testrun/testrun.component.spec.ts @@ -480,6 +480,25 @@ describe('TestrunComponent', () => { }); }); + describe('with available systemStatus$ data, as Cancelling', () => { + beforeEach(() => { + store.overrideSelector( + selectSystemStatus, + MOCK_PROGRESS_DATA_CANCELLING + ); + store.overrideSelector(selectHasDevices, true); + fixture.detectChanges(); + }); + + it('should have disabled "Start" button', () => { + const startBtn = compiled.querySelector( + '.start-button' + ) as HTMLButtonElement; + + expect(startBtn.disabled).toBeTrue(); + }); + }); + describe('with available systemStatus$ data, as Monitoring', () => { beforeEach(() => { store.overrideSelector(