From 02c0b9dec1a73a84da81266ed3d3fd0cba97abbc Mon Sep 17 00:00:00 2001 From: Cecilia Vu Date: Wed, 9 Oct 2019 14:05:32 -0700 Subject: [PATCH] feat(dropdown): check open in fixture in tests --- packages/dropdown/test/dropdown.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/dropdown/test/dropdown.test.ts b/packages/dropdown/test/dropdown.test.ts index b5de84cd5a..dd78d646a2 100644 --- a/packages/dropdown/test/dropdown.test.ts +++ b/packages/dropdown/test/dropdown.test.ts @@ -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'); }); @@ -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'); @@ -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'); }); @@ -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;