**Regression in nautilus**
Datatable items are not showing the details even if an item in the list is selected. This is happening because of this backport (https://github.com/ceph/ceph/pull/37756/files) which backports the line this.selection.selected = $event['selected']; but this feature was not implemented in the nautilus branch originally.
Fixes: https://tracker.ceph.com/issues/48796
Signed-off-by: Nizamudeen A <nia@redhat.com>
});
});
+ describe('select row', () => {
+ beforeEach(() => {
+ component.ngOnInit();
+ component.data = [];
+ });
+
+ it('should select the row item', () => {
+ spyOn(component, 'onSelect').and.callThrough();
+ component.data = createFakeData(3);
+ component.selection.selected = [_.clone(component.data[1])];
+ component.onSelect(new Event('click'));
+ expect(component.selection.hasSelection).toBeTruthy();
+ });
+ });
+
describe('reload data', () => {
beforeEach(() => {
component.ngOnInit();
if (_.has($event, 'selected')) {
this.selection.selected = $event['selected'];
}
+ this.selection.update();
this.updateSelection.emit(_.clone(this.selection));
}