Skip to content

Commit

Permalink
717 error message not shown in debug tab (#819)
Browse files Browse the repository at this point in the history
* refactor: made sure errors and warnings are retrieved after setting the current view to avoid race condition

* fix: wait for current view to be set so errors and warnings can be retrieved

* fix: running reports cypress test to check for partial error message instead of exact value

---------

Co-authored-by: mattergijz <[email protected]>
  • Loading branch information
MatthijsSmets and mattergijz authored Dec 12, 2024
1 parent 500219d commit bfcfc92
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/no-profile/debug/runningReports.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe('Test Reports in progress warning', () => {

it('If threshold time has been met then show warning', () => {
cy.get('[data-cy-debug="refresh"]').click();
cy.contains(`[One or more reports are in progress for more than 1 minutes]`);
cy.contains(`[One or more reports are in progress for more than`);
});
});

3 changes: 1 addition & 2 deletions src/app/debug/debug.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export class DebugComponent implements OnInit {

ngOnInit(): void {
this.retrieveViews();
this.retrieveErrorsAndWarnings();
}

protected addReportToTree(report: Report): void {
Expand All @@ -49,7 +48,7 @@ export class DebugComponent implements OnInit {
next: (views: View[]) => {
this.views = views;
if (!this.currentView) {
this.currentView = this.views.find((v: View) => v.defaultView)!;
this.onViewChange(this.views.find((v: View) => v.defaultView)!);
}
},
});
Expand Down
2 changes: 1 addition & 1 deletion src/app/debug/table/table.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
</div>
@if (hasTimedOut) {
<h4 class="progress-report-timeout">[One or more reports are in progress for more
than {{ this.reportsInProgressThreshold ?? 1 / 1000 / 60 }} minutes]</h4>
than {{ (this.reportsInProgressThreshold ?? 1) / 1000 / 60 }} minutes]</h4>
}
<div data-cy-debug="table" class="table-responsive table-container">
<table mat-table class="table mb-0" matSort [dataSource]="tableDataSource">
Expand Down

0 comments on commit bfcfc92

Please sign in to comment.