Skip to content

Commit

Permalink
Modified unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
sharmrj committed Jun 4, 2024
1 parent c2aadc2 commit c52ffa9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libs/features/webapp-prompt/webapp-prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const geoRoutingActive = () => !!document.querySelector('.locale-modal-v2')
|| !!document.querySelector('.locale-modal');

const waitForClosedGRMThen = (loadPEP) => {
document.addEventListener('milo:modal:closed', loadPEP);
window.addEventListener('milo:modal:closed', loadPEP);
};

class AppPrompt {
Expand Down
2 changes: 2 additions & 0 deletions test/features/webapp-prompt/webapp-prompt.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ describe('PEP', () => {

document.querySelector('.locale-modal-v2')?.remove();
document.querySelector('.locale-modal')?.remove();
const ev = new CustomEvent('milo:modal:closed');
window.dispatchEvent(ev);

await clock.runAllAsync();
expect(document.querySelector(allSelectors.pepWrapper)).to.exist;
Expand Down

0 comments on commit c52ffa9

Please sign in to comment.