Skip to content

Commit

Permalink
Update media.test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruchika4 authored Jan 5, 2024
1 parent 4d1c4f0 commit 132c6e9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/blocks/media/media.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,27 +72,27 @@ describe('media', () => {
await setViewport({ width: 1200, height: 100 });
const qrCodeImg = medias[5].querySelector('img.qr-code-img');
const qrCTA = medias[5].querySelectorAll('.qr-button-container');
expect(window.getComputedStyle(qrCodeImg).getPropertyValue('display')).not.to.be.equal('none');
expect(window.getComputedStyle(qrCodeImg).getPropertyValue('display')).not.to.equal('none');
qrCTA.forEach((cta) => {
expect(window.getComputedStyle(cta).getPropertyValue('display')).to.be.equal('none');
expect(window.getComputedStyle(cta).getPropertyValue('display')).to.equal('none');
});
});
it('mobile view has visibile google-play and app-store CTA and no qr code image', async () => {
await setViewport({ width: 600, height: 100 });
const qrCodeImg = medias[5].querySelector('img.qr-code-img');
const qrCTA = medias[5].querySelectorAll('.qr-button-container');
expect(window.getComputedStyle(qrCodeImg).getPropertyValue('display')).to.be.equal('none');
expect(window.getComputedStyle(qrCodeImg).getPropertyValue('display')).to.equal('none');
qrCTA.forEach((cta) => {
expect(window.getComputedStyle(cta).getPropertyValue('display')).not.to.be.equal('none');
expect(window.getComputedStyle(cta).getPropertyValue('display')).not.to.equal('none');
});
});
it('tablet view has visibile google-play and app-store CTA and no qr code image', async () => {
await setViewport({ width: 1199, height: 100 });
const qrCodeImg = medias[5].querySelector('img.qr-code-img');
const qrCTA = medias[5].querySelectorAll('.qr-button-container');
expect(window.getComputedStyle(qrCodeImg).getPropertyValue('display')).to.be.equal('none');
expect(window.getComputedStyle(qrCodeImg).getPropertyValue('display')).to.equal('none');
qrCTA.forEach((cta) => {
expect(window.getComputedStyle(cta).getPropertyValue('display')).not.to.be.equal('none');
expect(window.getComputedStyle(cta).getPropertyValue('display')).not.to.equal('none');
});
});
});
Expand Down

0 comments on commit 132c6e9

Please sign in to comment.