Skip to content

Commit

Permalink
feat(dropdown): check open in fixture in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Cecilia Vu authored and Westbrook committed Oct 16, 2019
1 parent ee991af commit 02c0b9d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/dropdown/test/dropdown.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,14 @@ describe('Dropdown', () => {
button.click();
await elementUpdated(el);

expect(el.open).to.be.true;
expect(el.selectedItemText).to.equal('');
expect(el.value).to.equal('');

secondItem.click();
await elementUpdated(el);

expect(el.open).to.be.false;
expect(el.selectedItemText).to.equal('Select Inverse');
expect(el.value).to.equal('option-2');
});
Expand All @@ -132,12 +134,14 @@ describe('Dropdown', () => {
button.click();
await elementUpdated(el);

expect(el.open).to.be.true;
expect(el.selectedItemText).to.equal('');
expect(el.value).to.equal('');

secondItem.click();
await elementUpdated(el);

expect(el.open).to.be.false;
expect(el.selectedItemText).to.equal('Select Inverse');
expect(el.value).to.equal('option-2');

Expand All @@ -151,6 +155,7 @@ describe('Dropdown', () => {
firstItem.click();
await elementUpdated(el);

expect(el.open).to.be.false;
expect(el.selectedItemText).to.equal('Deselect');
expect(el.value).to.equal('Deselect');
});
Expand All @@ -167,6 +172,7 @@ describe('Dropdown', () => {
button.click();
await elementUpdated(el);

expect(el.open).to.be.true;
expect(el.selectedItemText).to.equal('');
expect(el.value).to.equal('');
expect(secondItem.selected).to.be.false;
Expand Down

0 comments on commit 02c0b9d

Please sign in to comment.