Skip to content

Commit

Permalink
chore(isct-13): changes in include-exclude component test attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyKIron committed Oct 5, 2023
1 parent 68731d2 commit f79a6f6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
<ng-template #leftSide let-item="item">
<label
[for]="item.id"
class="is-option-label left-side" [attr.data-testid]="testIdsService.getTestAttribute(testId, testIdIncludeExcludeModifiers.OPTION)">
class="is-option-label left-side">
<fusion-checkbox
class="item-check"
[attr.data-testid]="testIdsService.getTestAttribute(testId, testIdIncludeExcludeModifiers.CHECKBOX)"
[id]="item.id"
[isDisabled]="isDisabled"
[checked]="isSelectedItem"
Expand All @@ -20,9 +19,9 @@


<ng-template #rightSide let-item="item" >
<label class="is-option-label right-side" [attr.data-testid]="testIdsService.getTestAttribute(testId, testIdIncludeExcludeModifiers.SELECTED_OPTION)">
<label class="is-option-label right-side">
<ng-container [ngTemplateOutlet]="item?.content ? dynamicItem : optionTemplate" [ngTemplateOutletContext]="{item: item}"></ng-container>
<fusion-icon *ngIf="!isDisabled" (click)="clearSelectItem(item)" class="icon-clear" [name]="{iconName: 'close-bold', iconVersion: 'v3'}" [attr.data-testid]="testIdsService.getTestAttribute(testId, testIdIncludeExcludeModifiers.REMOVE_SELECTED_OPTION)"></fusion-icon>
<fusion-icon *ngIf="!isDisabled" (click)="clearSelectItem(item)" class="icon-clear" [name]="{iconName: 'close-bold', iconVersion: 'v3'}"></fusion-icon>
</label>
</ng-template>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@
</div>
<div class="body-control">
<div class="options-wrapper content-col">
<div class="items-holder" #wrapperLeft>
<div class="items-holder" #wrapperLeft [attr.data-testid]="testIdsService.getTestAttribute(testId, testIdIncludeExcludeModifiers.OPTIONS_LIST)">
<ul class="options-data-list" #containerLeft>
<ng-container *ngIf="!isPendingItems">
<li *ngFor="let item of displayOptions$ | async;trackBy: trackById">
<fusion-dropdown-dual-multi-select-body-item
[testId]="testId"
[attr.data-testid]="testIdsService.getTestAttribute(testId, testIdIncludeExcludeModifiers.OPTION)"
[isSelectedItem]="selectedItemsMapping[item.id]"
[isDisabled]="item.isDisabled"
(changeSelected)="changeSelected($event)"
Expand All @@ -49,15 +50,17 @@
</div>
</div>
<div class="selected-list content-col">
<div class="items-holder" #wrapperRight>
<div class="items-holder" #wrapperRight [attr.data-testid]="testIdsService.getTestAttribute(testId, testIdIncludeExcludeModifiers.SELECTED_OPTIONS_LIST)">
<ul class="options-data-list" #containerRight>
<ng-container *ngIf="!isPendingItems">
<li *ngFor="let selectedItem of selectedOptions$ | async;trackBy: trackById">
<fusion-dropdown-dual-multi-select-body-item
(clearSelect)="clearSelect($event)"
[testId]="testId"
[attr.data-testid]="testIdsService.getTestAttribute(testId, testIdIncludeExcludeModifiers.SELECTED_OPTION)"
[isDisabled]="selectedItem.isDisabled"
[item]="selectedItem"
[bodySide]="'right'">
(clearSelect)="clearSelect($event)"
</fusion-dropdown-dual-multi-select-body-item>
</li>
</ng-container>
Expand Down
4 changes: 2 additions & 2 deletions projects/fusion-ui/entities/test-ids-modifiers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ export enum IncludeExcludeTestIdModifiers {
SEARCH_INPUT = 'ie-search-input',
SELECT_ALL = 'ie-select-all',
SELECTED_AMOUNT = 'ie-selected-amount',
OPTIONS_LIST = 'ie-options-list',
OPTION = 'ie-option',
CHECKBOX = 'ie-checkbox',
SELECTED_OPTIONS_LIST = 'ie-selected-options-list',
SELECTED_OPTION = 'ie-selected-option',
REMOVE_SELECTED_OPTION = 'ie-remove-selected-option',
CANCEL_BUTTON = 'ie-cancel-button',
APPLY_BUTTON = 'ie-apply-button'
}

0 comments on commit f79a6f6

Please sign in to comment.