From c28f90212b3c5d3d92c3db281f1b2c3bcad75972 Mon Sep 17 00:00:00 2001 From: Volha Mardvilka Date: Tue, 5 Mar 2024 13:23:39 +0000 Subject: [PATCH 1/2] 327544271: (feat) update texts in app --- modules/ui/src/app/app-routing.module.ts | 2 +- modules/ui/src/app/app.component.html | 28 +++++++++---------- modules/ui/src/app/app.component.spec.ts | 12 ++++---- modules/ui/src/app/app.component.ts | 2 +- modules/ui/src/app/model/routes.ts | 2 +- .../devices/device-repository.component.ts | 2 +- .../settings/general-settings.component.html | 19 +++++++------ .../general-settings.component.spec.ts | 2 +- .../settings/general-settings.component.ts | 2 +- 9 files changed, 36 insertions(+), 35 deletions(-) diff --git a/modules/ui/src/app/app-routing.module.ts b/modules/ui/src/app/app-routing.module.ts index bf928b113..d503116d6 100644 --- a/modules/ui/src/app/app-routing.module.ts +++ b/modules/ui/src/app/app-routing.module.ts @@ -18,7 +18,7 @@ import { RouterModule, Routes } from '@angular/router'; const routes: Routes = [ { - path: 'testrun', + path: 'testing', loadChildren: () => import('./pages/testrun/progress.module').then(m => m.ProgressModule), title: 'Testrun', diff --git a/modules/ui/src/app/app.component.html b/modules/ui/src/app/app.component.html index a8360661a..914d69518 100644 --- a/modules/ui/src/app/app.component.html +++ b/modules/ui/src/app/app.component.html @@ -26,9 +26,9 @@ *ngTemplateOutlet=" navButtonRoute; context: { - route: Routes.Testrun, + route: Routes.Testing, svgIcon: 'testrun_logo_small', - label: 'Testrun', + label: 'Testing', name: 'testrun' } "> @@ -73,7 +73,7 @@

Testrun

@@ -83,7 +83,7 @@

Testrun

#toggleSettingsBtn class="app-toolbar-button app-toolbar-button-general-settings" mat-icon-button - aria-label="Connection settings" + aria-label="System settings" (click)="openGeneralSettings(true)"> tune @@ -95,11 +95,11 @@

Testrun

(click)="openSetting()" (keydown.enter)="openSetting()" (keydown.space)="openSetting()" - aria-label="The Connection settings link opens the panel. No redirect to other pages." + aria-label="The System settings link opens the panel. No redirect to other pages." tabindex="0" role="link" class="message-link" - >Settings
System settings panel. @@ -111,12 +111,13 @@

Testrun

(click)="openSetting()" (keydown.enter)="openSetting()" (keydown.space)="openSetting()" - aria-label="The Connection settings link opens the panel. No redirect to other pages." + aria-label="The System settings link opens the panel. No redirect to other pages." tabindex="0" role="link" class="message-link" - >Connection settings. + >System settings + panel. Testrun isStatusLoaded === true && (isTestrunStarted$ | async) === false "> - Step 3: Once device is created navigate to + Step 3: Once device is created, you are able to Testrun - tab. + >start testing. diff --git a/modules/ui/src/app/app.component.spec.ts b/modules/ui/src/app/app.component.spec.ts index d592dbe4b..6cc2da48d 100644 --- a/modules/ui/src/app/app.component.spec.ts +++ b/modules/ui/src/app/app.component.spec.ts @@ -233,7 +233,7 @@ describe('AppComponent', () => { button?.click(); tick(); - expect(router.url).toBe(Routes.Testrun); + expect(router.url).toBe(Routes.Testing); })); it('should navigate to the reports when "reports" button is clicked', fakeAsync(() => { @@ -397,14 +397,14 @@ describe('AppComponent', () => { expect(calloutContent).toContain('Step 1'); }); - it('should have callout content with "Connection settings" link ', () => { + it('should have callout content with "System settings" link ', () => { const calloutLinkEl = compiled.querySelector( '.message-link' ) as HTMLAnchorElement; const calloutLinkContent = calloutLinkEl.innerHTML.trim(); expect(calloutLinkEl).toBeTruthy(); - expect(calloutLinkContent).toContain('Connection settings'); + expect(calloutLinkContent).toContain('System settings'); }); keyboardCases.forEach(testCase => { @@ -514,7 +514,7 @@ describe('AppComponent', () => { expect(calloutContent).toContain('Step 3'); }); - it('should have callout component with "Testrun" link', () => { + it('should have callout component with "testing" link', () => { const callout = compiled.querySelector('app-callout'); const calloutLinkEl = compiled.querySelector( '.message-link' @@ -522,7 +522,7 @@ describe('AppComponent', () => { const calloutLinkContent = calloutLinkEl.innerHTML.trim(); expect(callout).toBeTruthy(); - expect(calloutLinkContent).toContain('Testrun'); + expect(calloutLinkContent).toContain('testing'); }); keyboardCases.forEach(testCase => { @@ -534,7 +534,7 @@ describe('AppComponent', () => { calloutLinkEl.dispatchEvent(testCase.event); flush(); - expect(router.url).toBe(Routes.Testrun); + expect(router.url).toBe(Routes.Testing); })); }); }); diff --git a/modules/ui/src/app/app.component.ts b/modules/ui/src/app/app.component.ts index 01c9a421a..4b75aa5b4 100644 --- a/modules/ui/src/app/app.component.ts +++ b/modules/ui/src/app/app.component.ts @@ -135,7 +135,7 @@ export class AppComponent implements OnInit { } navigateToRuntime(): void { - this.route.navigate([Routes.Testrun]); + this.route.navigate([Routes.Testing]); this.testRunService.setIsOpenStartTestrun(true); } diff --git a/modules/ui/src/app/model/routes.ts b/modules/ui/src/app/model/routes.ts index 97c7beb85..f523f1b15 100644 --- a/modules/ui/src/app/model/routes.ts +++ b/modules/ui/src/app/model/routes.ts @@ -16,6 +16,6 @@ export enum Routes { Devices = '/devices', - Testrun = '/testrun', + Testing = '/testing', Reports = '/reports', } diff --git a/modules/ui/src/app/pages/devices/device-repository.component.ts b/modules/ui/src/app/pages/devices/device-repository.component.ts index 7663ba88d..8edb18f34 100644 --- a/modules/ui/src/app/pages/devices/device-repository.component.ts +++ b/modules/ui/src/app/pages/devices/device-repository.component.ts @@ -93,7 +93,7 @@ export class DeviceRepositoryComponent implements OnInit, OnDestroy { .pipe(takeUntil(this.destroy$)) .subscribe(data => { if (data === 'testrunStarted') { - this.route.navigate([Routes.Testrun]); + this.route.navigate([Routes.Testing]); } }); } diff --git a/modules/ui/src/app/pages/settings/general-settings.component.html b/modules/ui/src/app/pages/settings/general-settings.component.html index 3baf94cf8..cf5b09467 100644 --- a/modules/ui/src/app/pages/settings/general-settings.component.html +++ b/modules/ui/src/app/pages/settings/general-settings.component.html @@ -14,7 +14,7 @@ limitations under the License. -->
-

Connection settings

+

System settings