[ACS-10293] Bulk actions dropdown SR fixes (#5019)

* [ACS-10293] Bulk actions dropdown SR fixes

* [ACS-10293] Remove extra title

* [ACS-10293] Unit tests cleanup
This commit is contained in:
Michal Kinas
2026-01-30 16:41:09 +01:00
committed by GitHub
parent 6d8729d96f
commit 2019f151ed
3 changed files with 5 additions and 13 deletions
+2 -1
View File
@@ -582,7 +582,8 @@
},
"SEARCH": {
"BULK_ACTIONS_DROPDOWN": {
"TITLE": "Bulk Actions ({{ count }} Items)",
"LABEL": "Bulk Actions",
"TITLE": "Select an action for all {{ count }} results",
"BULK_NOT_AVAILABLE": "Bulk Actions (Not Available)",
"BULK_NOT_AVAILABLE_TOOLTIP": "Bulk Actions cannot be used without search results"
},
@@ -1,9 +1,9 @@
<mat-form-field
*ngIf="items?.length"
[title]="tooltip"
class="aca-bulk-actions-form-field"
data-automation-id="aca-bulk-actions-form-field"
>
<mat-label>{{ 'SEARCH.BULK_ACTIONS_DROPDOWN.LABEL' | translate }}</mat-label>
<mat-select
[formControl]="bulkSelectControl"
[placeholder]="placeholder"
@@ -19,6 +19,7 @@
[title]="bulkSelectControl.value?.title | translate"
[value]="bulkSelectControl.value?.icon"
class="aca-bulk-actions-icon"
aria-hidden="true"
[attr.data-automation-id]="'aca-bulk-action-icon-' + bulkSelectControl.value?.id"
/>
{{ bulkSelectControl.value?.title | translate }}
@@ -39,6 +40,7 @@
[title]="option.title | translate"
[value]="option.icon"
class="aca-bulk-actions-icon"
aria-hidden="true"
[attr.data-automation-id]="'aca-bulk-action-icon-' + option.id"
/>
{{ option.title | translate }}
@@ -43,7 +43,6 @@ describe('BulkActionsDropdownComponent', () => {
let fixture: ComponentFixture<BulkActionsDropdownComponent>;
let store: Store<AppStore>;
let translationService: TranslationService;
let bulkFormField: HTMLElement;
let dropdown: HTMLElement;
let extensionService: AppExtensionService;
let loader: HarnessLoader;
@@ -103,7 +102,6 @@ describe('BulkActionsDropdownComponent', () => {
totalItemsMock$.next(0);
fixture.detectChanges();
dropdown = getElement('aca-bulk-actions-dropdown');
bulkFormField = getElement('aca-bulk-actions-form-field');
fixture.detectChanges();
});
@@ -111,10 +109,6 @@ describe('BulkActionsDropdownComponent', () => {
expect(dropdown.getAttribute('aria-disabled')).toBe('true');
});
it('should have correct tooltip', () => {
expect(bulkFormField.getAttribute('title')).toBe('SEARCH.BULK_ACTIONS_DROPDOWN.BULK_NOT_AVAILABLE_TOOLTIP');
});
it('should have correct placeholder', () => {
expect(getLabelText('aca-bulk-actions-dropdown')).toEqual('SEARCH.BULK_ACTIONS_DROPDOWN.BULK_NOT_AVAILABLE');
});
@@ -130,7 +124,6 @@ describe('BulkActionsDropdownComponent', () => {
totalItemsMock$.next(10);
fixture.detectChanges();
dropdown = getElement('aca-bulk-actions-dropdown');
bulkFormField = getElement('aca-bulk-actions-form-field');
dropdown.click();
fixture.detectChanges();
});
@@ -139,10 +132,6 @@ describe('BulkActionsDropdownComponent', () => {
expect(dropdown.getAttribute('aria-disabled')).toBe('false');
});
it('should have correct tooltip', () => {
expect(bulkFormField.getAttribute('title')).toBe('SEARCH.BULK_ACTIONS_DROPDOWN.TITLE');
});
it('should have correct placeholder', () => {
expect(getLabelText('aca-bulk-actions-dropdown')).toEqual('SEARCH.BULK_ACTIONS_DROPDOWN.TITLE');
});