Skip to content

Commit 69accbd

Browse files
committed
Adding test for featureList population.
Adding test for featureList population.
1 parent ab85701 commit 69accbd

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/unit/iggrid/grid.spec.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,23 @@ export function main() {
624624
}, 500);
625625
});
626626
});
627+
it('should populate featuerList when features are defined via grid options.', (done) => {
628+
var template = '<div><ig-grid [(widgetId)]="gridID" [(options)]="opts1" [(dataSource)]="data1"></ig-grid></div>';
629+
TestBed.overrideComponent(TestComponent, {
630+
set: {
631+
template: template
632+
}
633+
});
634+
TestBed.compileComponents().then(() => {
635+
let fixture = TestBed.createComponent(TestComponent);
636+
fixture.detectChanges();
637+
var list = fixture.componentInstance.viewChild.featuresList;
638+
expect(list.allFeatures.length).toBe(1);
639+
expect(list.updating !== undefined).toBeTruthy("Feature should be populated.");
640+
done();
641+
});
642+
643+
});
627644
});
628645
}
629646

0 commit comments

Comments
 (0)