From 0b8a3242474ab7cdfdab8896b14f0baf6febe60c Mon Sep 17 00:00:00 2001 From: Mayura Deshmukh Date: Fri, 8 Dec 2023 18:24:40 +0530 Subject: [PATCH] MOSIP-30406 added sorting Signed-off-by: Mayura Deshmukh --- .../test-run/test-run/test-run.component.css | 35 +++++++++++++++++++ .../test-run/test-run/test-run.component.html | 10 +++--- .../test-run/test-run/test-run.component.ts | 4 ++- 3 files changed, 43 insertions(+), 6 deletions(-) diff --git a/src/app/features/test-run/test-run/test-run.component.css b/src/app/features/test-run/test-run/test-run.component.css index e6caff3e..e4a28f96 100644 --- a/src/app/features/test-run/test-run/test-run.component.css +++ b/src/app/features/test-run/test-run/test-run.component.css @@ -345,4 +345,39 @@ mat-panel-title { .expanded-details{ width: 250px; } +} +.mat-column-testId { + word-wrap: break-word !important; + white-space: unset !important; + flex: 0 0 20% !important; + width: 20% !important; + overflow-wrap: break-word; +} +.mat-column-testName { + word-wrap: break-word !important; + white-space: unset !important; + flex: 0 0 50% !important; + width: 50% !important; + overflow-wrap: break-word; +} +.mat-column-resultStatus { + word-wrap: break-word !important; + white-space: unset !important; + flex: 0 0 10% !important; + width: 10% !important; + overflow-wrap: break-word; +} +.mat-column-executionStatus { + word-wrap: break-word !important; + white-space: unset !important; + flex: 0 0 10% !important; + width: 10% !important; + overflow-wrap: break-word; +} +.mat-column-expand { + word-wrap: break-word !important; + white-space: unset !important; + flex: 0 0 10% !important; + width: 1cap !important; + overflow-wrap: break-word; } \ No newline at end of file diff --git a/src/app/features/test-run/test-run/test-run.component.html b/src/app/features/test-run/test-run/test-run.component.html index cd75a590..426feb7c 100644 --- a/src/app/features/test-run/test-run/test-run.component.html +++ b/src/app/features/test-run/test-run/test-run.component.html @@ -6,20 +6,20 @@
-
{{"viewTestRun.testRunDetailsAreNotAvailable"|translate}}
- +
- + - -
{{ "viewTestRun.tableDescription" | translate }}
{{"viewTestRun.id"|translate}} {{"viewTestRun.id"|translate}} {{element.testId}} - ( {{element.methodId}} ) @@ -32,7 +32,7 @@ {{"viewTestRun.status"|translate}} + {{"viewTestRun.status"|translate}} @@ -46,7 +46,7 @@ + {{"viewTestRun.executionStatus"|translate}} diff --git a/src/app/features/test-run/test-run/test-run.component.ts b/src/app/features/test-run/test-run/test-run.component.ts index 23ba492f..27b75431 100644 --- a/src/app/features/test-run/test-run/test-run.component.ts +++ b/src/app/features/test-run/test-run/test-run.component.ts @@ -28,6 +28,7 @@ import { environment } from 'src/environments/environment'; import { Directory, Filesystem } from '@capacitor/filesystem'; import { Toast } from '@capacitor/toast'; import { MatPaginator } from '@angular/material/paginator'; +import { MatSort } from '@angular/material/sort'; @Component({ selector: 'app-test-run', @@ -74,7 +75,7 @@ export class TestRunComponent implements OnInit { resourceBundleJson: any = {}; langCode = this.userProfileService.getUserPreferredLanguage(); @ViewChild(MatPaginator) paginator: MatPaginator; - + @ViewChild(MatSort) sort: MatSort; constructor( public authService: AuthService, private activatedRoute: ActivatedRoute, @@ -267,6 +268,7 @@ export class TestRunComponent implements OnInit { } this.dataSource = new MatTableDataSource(tableData); this.dataSource.paginator = this.paginator; + this.dataSource.sort = this.sort; resolve(true); }, (errors) => {