chore(popup): fix flaky test

This commit is contained in:
Mikhail Bashkirov 2019-07-26 10:40:46 +02:00
parent af3a7c074e
commit 25912788eb

View file

@ -22,12 +22,11 @@ describe('lion-popup', () => {
</lion-popup> </lion-popup>
`); `);
const invoker = el.querySelector('[slot="invoker"]'); const invoker = el.querySelector('[slot="invoker"]');
const eventOnClick = new Event('click'); invoker.click();
invoker.dispatchEvent(eventOnClick);
await el.updateComplete; await el.updateComplete;
expect(el.querySelector('[slot="content"]').style.display).to.be.equal('inline-block'); expect(el.querySelector('[slot="content"]').style.display).to.be.equal('inline-block');
invoker.dispatchEvent(eventOnClick); invoker.click();
await el.updateComplete; await el.updateComplete;
expect(el.querySelector('[slot="content"]').style.display).to.be.equal('none'); expect(el.querySelector('[slot="content"]').style.display).to.be.equal('none');
}); });