rename hasIcon to shoIcon to be equal to process-filter (#3855)

This commit is contained in:
Eugenio Romano
2018-10-03 15:20:37 +01:00
committed by GitHub
parent 732259ae6d
commit 718b3e8817
5 changed files with 8 additions and 8 deletions

View File

@@ -2,7 +2,7 @@
<mat-list class="adf-menu-list">
<mat-list-item (click)="selectFilterAndEmit(filter)" *ngFor="let filter of filters"
class="adf-filters__entry" [class.active]="currentFilter === filter">
<mat-icon *ngIf="hasIcon" matListIcon class="adf-filters__entry-icon">{{getFilterIcon(filter.icon)}}</mat-icon>
<mat-icon *ngIf="showIcon" matListIcon class="adf-filters__entry-icon">{{getFilterIcon(filter.icon)}}</mat-icon>
<span matLine [attr.data-automation-id]="filter.name + '_filter'">{{filter.name}}</span>
</mat-list-item>
</mat-list>

View File

@@ -355,9 +355,9 @@ describe('TaskFiltersComponent', () => {
expect(component.currentFilter).toBe(filter);
}));
it('should attach specific icon for each filter if hasIcon is true', (done) => {
it('should attach specific icon for each filter if showIcon is true', (done) => {
spyOn(taskFilterService, 'getTaskListFilters').and.returnValue(from(fakeGlobalFilterPromise));
component.hasIcon = true;
component.showIcon = true;
let change = new SimpleChange(undefined, 1, true);
component.ngOnChanges({ 'appId': change });
fixture.detectChanges();
@@ -373,9 +373,9 @@ describe('TaskFiltersComponent', () => {
});
});
it('should not attach icons for each filter if hasIcon is false', (done) => {
it('should not attach icons for each filter if showIcon is false', (done) => {
spyOn(taskFilterService, 'getTaskListFilters').and.returnValue(from(fakeGlobalFilterPromise));
component.hasIcon = false;
component.showIcon = false;
let change = new SimpleChange(undefined, 1, true);
component.ngOnChanges({ 'appId': change });
fixture.detectChanges();

View File

@@ -61,7 +61,7 @@ export class TaskFiltersComponent implements OnInit, OnChanges {
/** Toggles display of the filter's icon. */
@Input()
hasIcon: boolean;
showIcon: boolean;
filter$: Observable<FilterRepresentationModel>;