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 @@ -34,7 +34,7 @@ const routes: Routes = [
{
path: 'reports',
loadChildren: () =>
import('./pages/reports/history.module').then(m => m.HistoryModule),
import('./pages/reports/reports.module').then(m => m.ReportsModule),
title: 'Testrun - Reports',
},
{
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 { HistoryComponent } from './history.component';
import { ReportsComponent } from './reportscomponent';

const routes: Routes = [{ path: '', component: HistoryComponent }];
const routes: Routes = [{ path: '', component: ReportsComponent }];

@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class HistoryRoutingModule {}
export class ReportsRoutingModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
*/
import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing';

import { HistoryComponent } from './history.component';
import { ReportsComponent } from './reportscomponent';
import { TestRunService } from '../../services/test-run.service';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { HistoryModule } from './history.module';
import { ReportsModule } from './reports.module';
import { of } from 'rxjs';
import { LiveAnnouncer } from '@angular/cdk/a11y';
import { MatDialogRef } from '@angular/material/dialog';
Expand All @@ -36,9 +36,9 @@ import {
import { MatTableDataSource } from '@angular/material/table';
import { HistoryTestrun } from '../../model/testrun-status';

describe('HistoryComponent', () => {
let component: HistoryComponent;
let fixture: ComponentFixture<HistoryComponent>;
describe('ReportsComponent', () => {
let component: ReportsComponent;
let fixture: ComponentFixture<ReportsComponent>;
let compiled: HTMLElement;
let mockService: SpyObj<TestRunService>;
let mockLiveAnnouncer: SpyObj<LiveAnnouncer>;
Expand Down Expand Up @@ -90,16 +90,16 @@ describe('HistoryComponent', () => {
mockLiveAnnouncer = jasmine.createSpyObj(['announce']);

TestBed.configureTestingModule({
imports: [HistoryModule, BrowserAnimationsModule],
imports: [ReportsModule, BrowserAnimationsModule],
providers: [
{ provide: TestRunService, useValue: mockService },
{ provide: ReportsStore, useValue: mockReportsStore },
{ provide: LiveAnnouncer, useValue: mockLiveAnnouncer },
],
declarations: [HistoryComponent],
declarations: [ReportsComponent],
});
TestBed.overrideProvider(ReportsStore, { useValue: mockReportsStore });
fixture = TestBed.createComponent(HistoryComponent);
fixture = TestBed.createComponent(ReportsComponent);
component = fixture.componentInstance;
component.viewModel$ = getViewModel(DATA_SOURCE_INITIAL_VALUE, false);
compiled = fixture.nativeElement as HTMLElement;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
import { NgModule } from '@angular/core';
import { CommonModule, DatePipe } from '@angular/common';
import { HistoryComponent } from './history.component';
import { HistoryRoutingModule } from './history-routing.module';
import { ReportsComponent } from './reportscomponent';
import { ReportsRoutingModule } from './reports-routing.module';
import { MatTableModule } from '@angular/material/table';
import { MatIconModule } from '@angular/material/icon';
import { MatToolbarModule } from '@angular/material/toolbar';
Expand All @@ -29,10 +29,10 @@ import { DownloadReportZipComponent } from '../../components/download-report-zip
import { DownloadReportPdfComponent } from '../../components/download-report-pdf/download-report-pdf.component';

@NgModule({
declarations: [HistoryComponent],
declarations: [ReportsComponent],
imports: [
CommonModule,
HistoryRoutingModule,
ReportsRoutingModule,
MatTableModule,
MatIconModule,
MatToolbarModule,
Expand All @@ -46,4 +46,4 @@ import { DownloadReportPdfComponent } from '../../components/download-report-pdf
],
providers: [DatePipe],
})
export class HistoryModule {}
export class ReportsModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ import { ReportsStore } from './reports.store';

@Component({
selector: 'app-history',
templateUrl: './history.component.html',
styleUrls: ['./history.component.scss'],
templateUrl: './reports.component.html',
styleUrls: ['./reports.component.scss'],
providers: [ReportsStore],
})
export class HistoryComponent implements OnInit, OnDestroy {
export class ReportsComponent implements OnInit, OnDestroy {
public readonly FilterName = FilterName;
private destroy$: Subject<boolean> = new Subject<boolean>();
@ViewChild(MatSort, { static: false }) sort!: MatSort;
Expand Down