TSK-1720: Sort Workbasket Distribution Targets by type and name
This commit is contained in:
parent
0f65abb001
commit
d8a8f47cb8
|
@ -33,7 +33,7 @@
|
|||
[scrollWindow]="false" *ngIf="distributionTargets?.length > 0">
|
||||
<mat-selection-list #workbasket [multiple]="true">
|
||||
<mat-list-option class="workbasket-distribution-targets__workbaskets-item"
|
||||
*ngFor="let workbasket of distributionTargets | orderBy: ['type', 'description']"
|
||||
*ngFor="let workbasket of distributionTargets | orderBy: ['type', 'name']"
|
||||
[selected]="workbasket.selected"
|
||||
(click)="workbasket.selected = !workbasket.selected"
|
||||
[value]="workbasket.workbasketId">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { Component, DebugElement, Input, Pipe, PipeTransform } from '@angular/core';
|
||||
import { WorkbasketDistributionTargetsListComponent } from './workbasket-distribution-targets-list.component';
|
||||
import { InfiniteScrollModule } from 'ngx-infinite-scroll';
|
||||
|
@ -39,7 +39,8 @@ describe('WorkbasketDistributionTargetsListComponent', () => {
|
|||
let debugElement: DebugElement;
|
||||
let component: WorkbasketDistributionTargetsListComponent;
|
||||
|
||||
beforeEach(async(() => {
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
MatIconModule,
|
||||
|
@ -58,7 +59,8 @@ describe('WorkbasketDistributionTargetsListComponent', () => {
|
|||
component = fixture.componentInstance;
|
||||
component.distributionTargets = workbasketReadStateMock.paginatedWorkbasketsSummary.workbaskets;
|
||||
component.side = Side.AVAILABLE;
|
||||
}));
|
||||
})
|
||||
);
|
||||
|
||||
it('should create component', () => {
|
||||
expect(component).toBeTruthy();
|
||||
|
@ -92,6 +94,6 @@ describe('WorkbasketDistributionTargetsListComponent', () => {
|
|||
it('should call orderBy pipe', () => {
|
||||
const orderBySpy = jest.spyOn(OrderByMock.prototype, 'transform');
|
||||
fixture.detectChanges();
|
||||
expect(orderBySpy).toHaveBeenCalledWith(component.distributionTargets, ['type', 'description']);
|
||||
expect(orderBySpy).toHaveBeenCalledWith(component.distributionTargets, ['type', 'name']);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue