Skip to content

Commit

Permalink
chore: added dynamic list hidden collapse test
Browse files Browse the repository at this point in the history
Related to #1230
  • Loading branch information
Skaiir committed Aug 26, 2024
1 parent aa3ad91 commit 8826763
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,21 @@ describe('Dynamic List', () => {
expect(collapseButton).to.exist;
});

it('should render collapsed items under `fjs-repeat-row-collapsed`', function () {
// given
const field = {
...defaultField,
nonCollapsedItems: 1,
};

// when
const { container } = createDynamicList({ field });

// then
const collapsedItems = container.querySelectorAll('.fjs-repeat-row-collapsed .fjs-form-field-textfield');
expect(collapsedItems).to.have.length(2);
});

it('should not show collapse button when less items are visible than default collapse', function () {
// given
const field = {
Expand Down

0 comments on commit 8826763

Please sign in to comment.