From 3163c619a700f15027b7ed17574d2239a69c3042 Mon Sep 17 00:00:00 2001 From: Jacek Pluta Date: Mon, 4 Nov 2024 10:25:44 +0100 Subject: [PATCH] [ACS-8924] Failing Sonar job --- .../bulk-actions-dropdown.component.html | 1 + .../search/search-input/search-input.component.html | 1 + projects/aca-playwright-shared/src/api/favorites-api.ts | 4 ++-- projects/aca-playwright-shared/src/api/file-actions.ts | 2 +- projects/aca-playwright-shared/src/api/nodes-api.ts | 8 ++++---- projects/aca-playwright-shared/src/api/queries-api.ts | 2 +- projects/aca-playwright-shared/src/api/search-api.ts | 2 +- .../aca-playwright-shared/src/api/shared-links-api.ts | 4 ++-- 8 files changed, 13 insertions(+), 11 deletions(-) diff --git a/projects/aca-content/src/lib/components/bulk-actions-dropdown/bulk-actions-dropdown.component.html b/projects/aca-content/src/lib/components/bulk-actions-dropdown/bulk-actions-dropdown.component.html index 40421785c3..6f94216d01 100644 --- a/projects/aca-content/src/lib/components/bulk-actions-dropdown/bulk-actions-dropdown.component.html +++ b/projects/aca-content/src/lib/components/bulk-actions-dropdown/bulk-actions-dropdown.component.html @@ -32,6 +32,7 @@ [value]="option" [title]="option.tooltip | translate" [attr.data-automation-id]="option.id" + (keyup.enter)="runAction(option)" (click)="runAction(option)" >
diff --git a/projects/aca-content/src/lib/components/search/search-input/search-input.component.html b/projects/aca-content/src/lib/components/search/search-input/search-input.component.html index 06067988a5..49fac62cf1 100644 --- a/projects/aca-content/src/lib/components/search/search-input/search-input.component.html +++ b/projects/aca-content/src/lib/components/search/search-input/search-input.component.html @@ -45,6 +45,7 @@ [(ngModel)]="option.value" [disabled]="option.shouldDisable()" (change)="searchByOption()" + (keyup.enter)="$event.stopPropagation()" (click)="$event.stopPropagation()" > {{ option.key | translate }} diff --git a/projects/aca-playwright-shared/src/api/favorites-api.ts b/projects/aca-playwright-shared/src/api/favorites-api.ts index 3cc02dd98a..e1ce20c28d 100755 --- a/projects/aca-playwright-shared/src/api/favorites-api.ts +++ b/projects/aca-playwright-shared/src/api/favorites-api.ts @@ -89,7 +89,7 @@ export class FavoritesPageApi { return Promise.resolve(isFavorite); } }; - return Utils.retryCall(favorite); + return await Utils.retryCall(favorite); } catch (error) {} return isFavorite; } @@ -112,7 +112,7 @@ export class FavoritesPageApi { return Promise.resolve(totalItems); } }; - return Utils.retryCall(favoriteFiles); + return await Utils.retryCall(favoriteFiles); } catch {} } diff --git a/projects/aca-playwright-shared/src/api/file-actions.ts b/projects/aca-playwright-shared/src/api/file-actions.ts index ace3bd9629..778a7b38ce 100644 --- a/projects/aca-playwright-shared/src/api/file-actions.ts +++ b/projects/aca-playwright-shared/src/api/file-actions.ts @@ -125,7 +125,7 @@ export class FileActionsApi { return Promise.resolve(isLocked); } }; - return Utils.retryCall(locked, data.retry); + return await Utils.retryCall(locked, data.retry); } catch {} return isLocked; } diff --git a/projects/aca-playwright-shared/src/api/nodes-api.ts b/projects/aca-playwright-shared/src/api/nodes-api.ts index 0b932a972e..6de0955dce 100755 --- a/projects/aca-playwright-shared/src/api/nodes-api.ts +++ b/projects/aca-playwright-shared/src/api/nodes-api.ts @@ -48,7 +48,7 @@ export class NodesApi { aspectNames: string[] = null ): Promise { try { - return this.createNode('cm:folder', name, parentId, title, description, null, author, null, aspectNames); + return await this.createNode('cm:folder', name, parentId, title, description, null, author, null, aspectNames); } catch (error) { console.error(`${this.constructor.name} ${this.createFolder.name}`, error); return null; @@ -65,7 +65,7 @@ export class NodesApi { aspectNames: string[] = null ): Promise { try { - return this.createNode('cm:content', name, parentId, title, description, null, author, majorVersion, aspectNames); + return await this.createNode('cm:content', name, parentId, title, description, null, author, majorVersion, aspectNames); } catch (error) { console.error(`${this.constructor.name} ${this.createFile.name}`, error); return null; @@ -74,7 +74,7 @@ export class NodesApi { async createFiles(names: string[], relativePath = '/'): Promise { try { - return this.createContent({ files: names }, relativePath); + return await this.createContent({ files: names }, relativePath); } catch (error) { console.error(`${this.constructor.name} ${this.createFiles.name}: ${error}`); return null; @@ -83,7 +83,7 @@ export class NodesApi { async createFolders(names: string[], relativePath = '/'): Promise { try { - return this.createContent({ folders: names }, relativePath); + return await this.createContent({ folders: names }, relativePath); } catch (error) { console.error(`${this.constructor.name} ${this.createFolders.name}: ${error}`); return null; diff --git a/projects/aca-playwright-shared/src/api/queries-api.ts b/projects/aca-playwright-shared/src/api/queries-api.ts index d9b6c615ce..0282aca998 100755 --- a/projects/aca-playwright-shared/src/api/queries-api.ts +++ b/projects/aca-playwright-shared/src/api/queries-api.ts @@ -50,7 +50,7 @@ export class QueriesApi { } }; - return Utils.retryCall(sites); + return await Utils.retryCall(sites); } catch (error) { console.error(`QueriesApi waitForSites : catch : `); console.error(`\tExpected: ${data.expect} items, but found ${error}`); diff --git a/projects/aca-playwright-shared/src/api/search-api.ts b/projects/aca-playwright-shared/src/api/search-api.ts index 4a792a4e9b..74e52ce8e8 100755 --- a/projects/aca-playwright-shared/src/api/search-api.ts +++ b/projects/aca-playwright-shared/src/api/search-api.ts @@ -73,7 +73,7 @@ export class SearchPageApi { } }; - return Utils.retryCall(searchFiles); + return await Utils.retryCall(searchFiles); } catch {} } } diff --git a/projects/aca-playwright-shared/src/api/shared-links-api.ts b/projects/aca-playwright-shared/src/api/shared-links-api.ts index 48aee37826..9f9b967fd8 100755 --- a/projects/aca-playwright-shared/src/api/shared-links-api.ts +++ b/projects/aca-playwright-shared/src/api/shared-links-api.ts @@ -89,7 +89,7 @@ export class SharedLinksApi { } }; - return Utils.retryCall(sharedFile); + return await Utils.retryCall(sharedFile); } catch (error) { console.error(`SharedLinksApi waitForFilesToBeShared : catch : ${error}`); console.error(`\tWait timeout reached waiting for files to be shared`); @@ -132,7 +132,7 @@ export class SharedLinksApi { } }; - return Utils.retryCall(sharedFile); + return await Utils.retryCall(sharedFile); } catch (error) { console.error(`SharedLinksApi waitForFilesToNotBeShared : catch : ${error}`); console.error(`\tWait timeout reached waiting for files to no longer be shared`);