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
2 changes: 1 addition & 1 deletion modules/ui/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const routes: Routes = [
{
path: 'testing',
loadChildren: () =>
import('./pages/testrun/progress.module').then(m => m.ProgressModule),
import('./pages/testrun/testrun.module').then(m => m.TestrunModule),
title: 'Testrun',
},
{
Expand Down
2 changes: 1 addition & 1 deletion modules/ui/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import { CalloutComponent } from './components/callout/callout.component';
import {
MOCK_PROGRESS_DATA_IDLE,
MOCK_PROGRESS_DATA_IN_PROGRESS,
} from './mocks/progress.mock';
} from './mocks/testrun.mock';
import { Routes } from './model/routes';
import { MockStore, provideMockStore } from '@ngrx/store/testing';
import { State } from '@ngrx/store';
Expand Down
2 changes: 1 addition & 1 deletion modules/ui/src/app/app.store.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { TestRunService } from './services/test-run.service';
import SpyObj = jasmine.SpyObj;
import { device } from './mocks/device.mock';
import { fetchSystemStatus, setDevices } from './store/actions';
import { MOCK_PROGRESS_DATA_IN_PROGRESS } from './mocks/progress.mock';
import { MOCK_PROGRESS_DATA_IN_PROGRESS } from './mocks/testrun.mock';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NotificationService } from './services/notification.service';
import { WINDOW } from './providers/window.provider';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { DownloadReportPdfComponent } from './download-report-pdf.component';
import { MOCK_PROGRESS_DATA_COMPLIANT } from '../../mocks/progress.mock';
import { MOCK_PROGRESS_DATA_COMPLIANT } from '../../mocks/testrun.mock';

describe('DownloadReportComponent', () => {
let component: DownloadReportPdfComponent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { DownloadReportZipComponent } from './download-report-zip.component';
import { MOCK_PROGRESS_DATA_COMPLIANT } from '../../mocks/progress.mock';
import { MOCK_PROGRESS_DATA_COMPLIANT } from '../../mocks/testrun.mock';

describe('DownloadReportComponent', () => {
let component: DownloadReportZipComponent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
MOCK_PROGRESS_DATA_CANCELLED,
MOCK_PROGRESS_DATA_COMPLIANT,
MOCK_PROGRESS_DATA_NON_COMPLIANT,
} from '../../mocks/progress.mock';
} from '../../mocks/testrun.mock';

describe('DownloadReportComponent', () => {
let component: DownloadReportComponent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { ReportActionComponent } from './report-action.component';
import { MOCK_PROGRESS_DATA_COMPLIANT } from '../../mocks/progress.mock';
import { MOCK_PROGRESS_DATA_COMPLIANT } from '../../mocks/testrun.mock';

describe('ReportActionComponent', () => {
let component: ReportActionComponent;
Expand Down
6 changes: 3 additions & 3 deletions modules/ui/src/app/pages/devices/devices.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import SpyObj = jasmine.SpyObj;
import { FocusManagerService } from '../../services/focus-manager.service';
import { DevicesStore } from './devices.store';
import { MatIconTestingModule } from '@angular/material/icon/testing';
import { ProgressInitiateFormComponent } from '../testrun/components/progress-initiate-form/progress-initiate-form.component';
import { TestrunInitiateFormComponent } from '../testrun/components/testrun-initiate-form/testrun-initiate-form.component';
import { Routes } from '../../model/routes';
import { Router } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';
Expand Down Expand Up @@ -300,12 +300,12 @@ describe('DevicesComponent', () => {
it('should open initiate test run modal', fakeAsync(() => {
const openSpy = spyOn(component.dialog, 'open').and.returnValue({
afterClosed: () => of(true),
} as MatDialogRef<typeof ProgressInitiateFormComponent>);
} as MatDialogRef<typeof TestrunInitiateFormComponent>);

fixture.ngZone?.run(() => {
component.openStartTestrun(device, [device]);

expect(openSpy).toHaveBeenCalledWith(ProgressInitiateFormComponent, {
expect(openSpy).toHaveBeenCalledWith(TestrunInitiateFormComponent, {
ariaLabel: 'Initiate testrun',
data: {
devices: [device],
Expand Down
4 changes: 2 additions & 2 deletions modules/ui/src/app/pages/devices/devices.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import { FocusManagerService } from '../../services/focus-manager.service';
import { Routes } from '../../model/routes';
import { Router } from '@angular/router';
import { timer } from 'rxjs/internal/observable/timer';
import { ProgressInitiateFormComponent } from '../testrun/components/progress-initiate-form/progress-initiate-form.component';
import { TestrunInitiateFormComponent } from '../testrun/components/testrun-initiate-form/testrun-initiate-form.component';
import { DevicesStore } from './devices.store';

@Component({
Expand Down Expand Up @@ -76,7 +76,7 @@ export class DevicesComponent implements OnInit, OnDestroy {
}

openStartTestrun(selectedDevice: Device, devices: Device[]): void {
const dialogRef = this.dialog.open(ProgressInitiateFormComponent, {
const dialogRef = this.dialog.open(TestrunInitiateFormComponent, {
ariaLabel: 'Initiate testrun',
data: {
devices,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { DeleteReportComponent } from './delete-report.component';
import { of } from 'rxjs';
import { MatDialogModule, MatDialogRef } from '@angular/material/dialog';
import { DeleteFormComponent } from '../../../../components/delete-form/delete-form.component';
import { MOCK_PROGRESS_DATA_COMPLIANT } from '../../../../mocks/progress.mock';
import { MOCK_PROGRESS_DATA_COMPLIANT } from '../../../../mocks/testrun.mock';

describe('DeleteReportComponent', () => {
let compiled: HTMLElement;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
MOCK_PROGRESS_DATA_CANCELLED,
MOCK_PROGRESS_DATA_COMPLIANT,
MOCK_PROGRESS_DATA_NON_COMPLIANT,
} from '../../../../mocks/progress.mock';
} from '../../../../mocks/testrun.mock';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { MatOptionSelectionChange } from '@angular/material/core';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { ProgressInitiateFormComponent } from './progress-initiate-form.component';
import { TestrunInitiateFormComponent } from './testrun-initiate-form.component';
import {
MAT_DIALOG_DATA,
MatDialogModule,
Expand All @@ -31,14 +31,14 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { DeviceTestsComponent } from '../../../../components/device-tests/device-tests.component';
import { device } from '../../../../mocks/device.mock';
import { of } from 'rxjs';
import { MOCK_PROGRESS_DATA_WAITING_FOR_DEVICE } from '../../../../mocks/progress.mock';
import { MOCK_PROGRESS_DATA_WAITING_FOR_DEVICE } from '../../../../mocks/testrun.mock';
import { SpinnerComponent } from '../../../../components/spinner/spinner.component';
import { provideMockStore } from '@ngrx/store/testing';
import { selectDevices } from '../../../../store/selectors';

describe('ProgressInitiateFormComponent', () => {
let component: ProgressInitiateFormComponent;
let fixture: ComponentFixture<ProgressInitiateFormComponent>;
let component: TestrunInitiateFormComponent;
let fixture: ComponentFixture<TestrunInitiateFormComponent>;
let compiled: HTMLElement;

const testRunServiceMock = jasmine.createSpyObj([
Expand Down Expand Up @@ -71,7 +71,7 @@ describe('ProgressInitiateFormComponent', () => {

beforeEach(() => {
TestBed.configureTestingModule({
declarations: [ProgressInitiateFormComponent],
declarations: [TestrunInitiateFormComponent],
providers: [
{ provide: TestRunService, useValue: testRunServiceMock },
{
Expand All @@ -96,7 +96,7 @@ describe('ProgressInitiateFormComponent', () => {
SpinnerComponent,
],
});
fixture = TestBed.createComponent(ProgressInitiateFormComponent);
fixture = TestBed.createComponent(TestrunInitiateFormComponent);
component = fixture.componentInstance;
compiled = fixture.nativeElement as HTMLElement;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ interface DialogData {
}

@Component({
selector: 'app-progress-initiate-form',
templateUrl: './progress-initiate-form.component.html',
styleUrls: ['./progress-initiate-form.component.scss'],
selector: 'app-testrun-initiate-form',
templateUrl: './testrun-initiate-form.component.html',
styleUrls: ['./testrun-initiate-form.component.scss'],
})
export class ProgressInitiateFormComponent
export class TestrunInitiateFormComponent
extends EscapableDialogComponent
implements OnInit, AfterViewChecked
{
Expand All @@ -65,7 +65,7 @@ export class ProgressInitiateFormComponent
);

constructor(
public override dialogRef: MatDialogRef<ProgressInitiateFormComponent>,
public override dialogRef: MatDialogRef<TestrunInitiateFormComponent>,
@Inject(MAT_DIALOG_DATA) public data: DialogData,
private readonly testRunService: TestRunService,
private fb: FormBuilder,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { ProgressStatusCardComponent } from './progress-status-card.component';
import { TestrunStatusCardComponent } from './testrun-status-card.component';
import {
StatusOfTestrun,
TestrunStatus,
Expand All @@ -26,19 +26,19 @@ import {
MOCK_PROGRESS_DATA_IN_PROGRESS,
MOCK_PROGRESS_DATA_MONITORING,
MOCK_PROGRESS_DATA_WAITING_FOR_DEVICE,
} from '../../../../mocks/progress.mock';
import { ProgressModule } from '../../progress.module';
} from '../../../../mocks/testrun.mock';
import { TestrunModule } from '../../testrun.module';

describe('ProgressStatusCardComponent', () => {
let component: ProgressStatusCardComponent;
let fixture: ComponentFixture<ProgressStatusCardComponent>;
let component: TestrunStatusCardComponent;
let fixture: ComponentFixture<TestrunStatusCardComponent>;

describe('Class tests', () => {
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [ProgressStatusCardComponent],
declarations: [TestrunStatusCardComponent],
});
fixture = TestBed.createComponent(ProgressStatusCardComponent);
fixture = TestBed.createComponent(TestrunStatusCardComponent);
component = fixture.componentInstance;
});

Expand Down Expand Up @@ -216,11 +216,11 @@ describe('ProgressStatusCardComponent', () => {

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ProgressStatusCardComponent],
imports: [ProgressModule],
declarations: [TestrunStatusCardComponent],
imports: [TestrunModule],
}).compileComponents();

fixture = TestBed.createComponent(ProgressStatusCardComponent);
fixture = TestBed.createComponent(TestrunStatusCardComponent);
compiled = fixture.nativeElement as HTMLElement;
component = fixture.componentInstance;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ import {
} from '../../../../model/testrun-status';

@Component({
selector: 'app-progress-status-card',
templateUrl: './progress-status-card.component.html',
styleUrls: ['./progress-status-card.component.scss'],
selector: 'app-testrun-status-card',
templateUrl: './testrun-status-card.component.html',
styleUrls: ['./testrun-status-card.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ProgressStatusCardComponent {
export class TestrunStatusCardComponent {
@Input() systemStatus!: TestrunStatus;

public readonly StatusOfTestrun = StatusOfTestrun;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,33 @@
*/
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { ProgressTableComponent } from './progress-table.component';
import { TestrunTableComponent } from './testrun-table.component';

import { IResult, StatusOfTestResult } from '../../../../model/testrun-status';
import {
TEST_DATA,
TEST_DATA_RESULT,
TEST_DATA_RESULT_WITH_RECOMMENDATIONS,
} from '../../../../mocks/progress.mock';
} from '../../../../mocks/testrun.mock';
import { TestRunService } from '../../../../services/test-run.service';
import { MatExpansionModule } from '@angular/material/expansion';
import { Component, Input } from '@angular/core';
import { MatIconModule } from '@angular/material/icon';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

describe('ProgressTableComponent', () => {
let component: ProgressTableComponent;
let fixture: ComponentFixture<ProgressTableComponent>;
let component: TestrunTableComponent;
let fixture: ComponentFixture<TestrunTableComponent>;

const testRunServiceMock = jasmine.createSpyObj(['getResultClass']);

describe('Class tests', () => {
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [ProgressTableComponent],
declarations: [TestrunTableComponent],
providers: [{ provide: TestRunService, useValue: testRunServiceMock }],
});
fixture = TestBed.createComponent(ProgressTableComponent);
fixture = TestBed.createComponent(TestrunTableComponent);
component = fixture.componentInstance;
component.dataSource = TEST_DATA.results;
});
Expand Down Expand Up @@ -80,12 +80,12 @@ describe('ProgressTableComponent', () => {

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ProgressTableComponent, FakeCalloutComponent],
declarations: [TestrunTableComponent, FakeCalloutComponent],
providers: [{ provide: TestRunService, useValue: testRunServiceMock }],
imports: [BrowserAnimationsModule, MatExpansionModule, MatIconModule],
}).compileComponents();

fixture = TestBed.createComponent(ProgressTableComponent);
fixture = TestBed.createComponent(TestrunTableComponent);
component = fixture.componentInstance;
compiled = fixture.nativeElement as HTMLElement;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ import { CalloutType } from '../../../../model/callout-type';
import { TestRunService } from '../../../../services/test-run.service';

@Component({
selector: 'app-progress-table',
templateUrl: './progress-table.component.html',
styleUrls: ['./progress-table.component.scss'],
selector: 'app-testrun-table',
templateUrl: './testrun-table.component.html',
styleUrls: ['./testrun-table.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ProgressTableComponent {
export class TestrunTableComponent {
@ViewChild(MatAccordion) accordion!: MatAccordion;
@ViewChildren(MatExpansionPanel) panels!: QueryList<MatExpansionPanel>;
public readonly CalloutType = CalloutType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
*/
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { ProgressComponent } from './progress.component';
import { TestrunComponent } from './testrun.component';

const routes: Routes = [{ path: '', component: ProgressComponent }];
const routes: Routes = [{ path: '', component: TestrunComponent }];

@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class ProgressRoutingModule {}
export class TestrunRoutingModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,17 @@ <h2 class="title progress-title">
[data]="data"></app-download-options>
</div>
</div>
<app-progress-status-card [systemStatus]="vm.systemStatus">
</app-progress-status-card>
<app-testrun-status-card [systemStatus]="vm.systemStatus">
</app-testrun-status-card>
</mat-toolbar>
<section
class="progress-table"
[class.progress-table-progress-empty]="
isTestrunInProgress(data.status) && resultIsEmpty(data.tests)
">
<app-progress-table
<app-testrun-table
[dataSource]="vm.dataSource"
[stepsToResolveCount]="vm.stepsToResolveCount"></app-progress-table>
[stepsToResolveCount]="vm.stepsToResolveCount"></app-testrun-table>
<app-spinner></app-spinner>
</section>
</ng-container>
Expand Down
Loading