From a7d25001c62427dea0f7893b840387aebde7c279 Mon Sep 17 00:00:00 2001 From: dweinholz Date: Tue, 26 Nov 2024 14:34:06 +0100 Subject: [PATCH] fixed tests --- .../shared_modules/public-key/public-key.component.html | 4 ++-- .../shared/shared_modules/public-key/public-key.component.ts | 4 ++++ tests/page_objects/profile.po.ts | 1 - 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app/shared/shared_modules/public-key/public-key.component.html b/src/app/shared/shared_modules/public-key/public-key.component.html index e1b468ed55..26783b83b5 100644 --- a/src/app/shared/shared_modules/public-key/public-key.component.html +++ b/src/app/shared/shared_modules/public-key/public-key.component.html @@ -17,7 +17,7 @@ class="btn btn-primary" style="float: left; margin: 2px" type="button" - (click)="generateKeyModal.show()" + (click)="unsetAcknowledgment();generateKeyModal.show()" id="generateSShKey" data-test-id="generateSShKey" > @@ -27,7 +27,7 @@ class="btn btn-primary" style="float: left; margin: 2px" type="button" - (click)="public_key = ''; pubKeyModal.show()" + (click)="public_key = '';unsetAcknowledgment(); pubKeyModal.show()" id="setPublicKeyButton" data-test-id="setPublicKeyButton" > diff --git a/src/app/shared/shared_modules/public-key/public-key.component.ts b/src/app/shared/shared_modules/public-key/public-key.component.ts index 0744dbfb41..13a6d859da 100644 --- a/src/app/shared/shared_modules/public-key/public-key.component.ts +++ b/src/app/shared/shared_modules/public-key/public-key.component.ts @@ -45,6 +45,10 @@ export class PublicKeyComponent extends AbstractBaseClass implements OnInit { } } + unsetAcknowledgment():void{ + this.acknowledgement_given=false; + } + downloadPem(data: string): void { const blob: Blob = new Blob([data], { type: 'pem' }) const url: string = window.URL.createObjectURL(blob) diff --git a/tests/page_objects/profile.po.ts b/tests/page_objects/profile.po.ts index 9042a35d54..084420a7e9 100644 --- a/tests/page_objects/profile.po.ts +++ b/tests/page_objects/profile.po.ts @@ -66,7 +66,6 @@ export class ProfilePage { await this.page.fill(Util.by_data_test_id_str(this.ENTER_PUBLIC_KEY_AREA), this.TEST_PUBLIC_KEY); console.log('Confirming effects of generating a new Key'); - await this.page.locator(Util.by_data_test_id_str("public_key_acknowledgement_checkbox_replace")).click(); await this.page.locator(Util.by_data_test_id_str("public_key_acknowledgement_checkbox_replace")).click(); // await this.page.locator(Util.by_data_test_id_str(this.GENERATE_KEY_CHECKBOX)).click();