Skip to content

Commit

Permalink
test(selection-panel): enhance test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
TomMenga committed Jan 17, 2024
1 parent 0034b7c commit 1089144
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/selection-panel/selection-panel.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,13 +461,20 @@ describe('sbb-selection-panel', () => {
});

it('selects input on click and shows related content', async () => {
await waitForLitRender(wrapper);

assert.instanceOf(firstPanel, SbbSelectionPanelElement);
assert.instanceOf(firstInput, SbbCheckboxElement);

// TODO fix: should be 'opened', actual is 'close'.
// we have to rethink the open/close flow to make it work
//expect(firstPanel).to.have.attribute('data-state', 'opened');
expect(firstInput).to.have.attribute('checked');
expect(firstContent).to.have.attribute('data-expanded', '');

assert.instanceOf(secondPanel, SbbSelectionPanelElement);
assert.instanceOf(secondInput, SbbCheckboxElement);
expect(firstPanel).to.have.attribute('data-state', 'closed');
expect(secondInput).not.to.have.attribute('checked');
expect(secondContent).not.to.have.attribute('data-expanded');

Expand Down

0 comments on commit 1089144

Please sign in to comment.