From 25912788eb3503508f5c77a4fdfc31c2ecadfa45 Mon Sep 17 00:00:00 2001 From: Mikhail Bashkirov Date: Fri, 26 Jul 2019 10:40:46 +0200 Subject: [PATCH] chore(popup): fix flaky test --- packages/popup/test/lion-popup.test.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/popup/test/lion-popup.test.js b/packages/popup/test/lion-popup.test.js index a8ead651d..9c6fd461a 100644 --- a/packages/popup/test/lion-popup.test.js +++ b/packages/popup/test/lion-popup.test.js @@ -22,12 +22,11 @@ describe('lion-popup', () => { `); const invoker = el.querySelector('[slot="invoker"]'); - const eventOnClick = new Event('click'); - invoker.dispatchEvent(eventOnClick); + invoker.click(); await el.updateComplete; expect(el.querySelector('[slot="content"]').style.display).to.be.equal('inline-block'); - invoker.dispatchEvent(eventOnClick); + invoker.click(); await el.updateComplete; expect(el.querySelector('[slot="content"]').style.display).to.be.equal('none'); });