зеркало из https://github.com/mozilla/bedrock.git
Родитель
88f6723a93
Коммит
db24baab99
|
@ -75,7 +75,7 @@ describe('datalayer-begincheckout.es6.js', function () {
|
|||
});
|
||||
|
||||
afterEach(function () {
|
||||
window.dataLayer = [];
|
||||
delete window.dataLayer;
|
||||
});
|
||||
|
||||
it('will append the begin_checkout event to the dataLayer', function () {
|
||||
|
|
|
@ -300,7 +300,9 @@ describe('TrackProductDownload.handleLink', function () {
|
|||
const download_button = `<a href="https://download.mozilla.org/?product=firefox-latest-ssl&os=win64&lang=en-CA" id="download-button-primary" class="mzp-c-button mzp-t-product c-download-button">Download Now</a>`;
|
||||
|
||||
beforeEach(function () {
|
||||
window.dataLayer = [];
|
||||
// stub out google tag manager
|
||||
window.dataLayer = sinon.stub();
|
||||
window.dataLayer.push = sinon.stub();
|
||||
|
||||
document.body.insertAdjacentHTML('beforeend', download_button);
|
||||
const downloadButton = document.getElementById(
|
||||
|
@ -318,7 +320,6 @@ describe('TrackProductDownload.handleLink', function () {
|
|||
|
||||
afterEach(function () {
|
||||
document.getElementById('download-button-primary').remove();
|
||||
window.dataLayer = [];
|
||||
});
|
||||
|
||||
it('should call the full chain of functions', function () {
|
||||
|
|
|
@ -83,6 +83,10 @@ describe('WaitListForm', function () {
|
|||
</div>`;
|
||||
|
||||
document.body.insertAdjacentHTML('beforeend', form);
|
||||
|
||||
// stub out google tag manager
|
||||
window.dataLayer = sinon.stub();
|
||||
window.dataLayer.push = sinon.stub();
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
|
|
Загрузка…
Ссылка в новой задаче