Skip to content

Commit 6d506db

Browse files
committed
Add additional unit test to make sure individual row expansion can be disabled on a per-item basis.
1 parent b4d1573 commit 6d506db

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/views/listview/list-view.spec.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,4 +528,18 @@ describe('Directive: pfDataList', function () {
528528
var openItem = element.find('.list-group-item-container');
529529
expect(openItem.length).toBe(1);
530530
});
531+
532+
it('should allow expanding rows to disable individual expansion', function () {
533+
$scope.systemModel[0].disableRowExpansion = true;
534+
$scope.listConfig.useExpandingRows = true;
535+
var htmlTmp = '<div pf-list-view items="systemModel" ' +
536+
' config="listConfig">' +
537+
'</div>';
538+
539+
compileHTML(htmlTmp, $scope);
540+
541+
// Make sure one item is hiding the expansion action (based on the item settings above)
542+
items = element.find('.list-view-pf-expand .fa-angle-right.ng-hide');
543+
expect(items.length).toBe(1);
544+
});
531545
});

0 commit comments

Comments
 (0)