Skip to content

Commit

Permalink
Try retries for Chartbeat timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
amoore108 committed Feb 6, 2025
1 parent b89620a commit eb78848
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 30 deletions.
26 changes: 16 additions & 10 deletions cypress/e2e/pages/liveRadio/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,22 @@ export default ({ service, pageType }) =>
},
);

describe('Chartbeat', () => {
if (envConfig.chartbeatEnabled) {
it('should have a script with src value set to chartbeat source', () => {
cy.hasScriptWithChartbeatSrc();
});
it('should have chartbeat config set to window object', () => {
cy.hasGlobalChartbeatConfig();
});
}
});
describe(
'Chartbeat',
{
retries: 3,
},
() => {
if (envConfig.chartbeatEnabled) {
it('should have a script with src value set to chartbeat source', () => {
cy.hasScriptWithChartbeatSrc();
});
it('should have chartbeat config set to window object', () => {
cy.hasGlobalChartbeatConfig();
});
}
},
);
describe('Radio Schedule', () => {
it('should be displayed if there is enough schedule data', function test() {
cy.fixture(`toggles/${config[service].name}.json`).then(toggles => {
Expand Down
26 changes: 16 additions & 10 deletions cypress/e2e/pages/onDemandAudio/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,21 @@ export default ({ service, pageType, variant }) => {
});
});
});
describe('Chartbeat', () => {
if (envConfig.chartbeatEnabled) {
it('should have a script with src value set to chartbeat source', () => {
cy.hasScriptWithChartbeatSrc();
});
it('should have chartbeat config set to window object', () => {
cy.hasGlobalChartbeatConfig();
});
}
});
describe(
'Chartbeat',
{
retries: 3,
},
() => {
if (envConfig.chartbeatEnabled) {
it('should have a script with src value set to chartbeat source', () => {
cy.hasScriptWithChartbeatSrc();
});
it('should have chartbeat config set to window object', () => {
cy.hasGlobalChartbeatConfig();
});
}
},
);
});
};
26 changes: 16 additions & 10 deletions cypress/e2e/pages/onDemandTV/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,22 @@ export default ({ service, pageType, variant }) => {
});
});
},
describe('Chartbeat', () => {
if (envConfig.chartbeatEnabled) {
it('should have a script with src value set to chartbeat source', () => {
cy.hasScriptWithChartbeatSrc();
});
it('should have chartbeat config set to window object', () => {
cy.hasGlobalChartbeatConfig();
});
}
}),
describe(
'Chartbeat',
{
retries: 3,
},
() => {
if (envConfig.chartbeatEnabled) {
it('should have a script with src value set to chartbeat source', () => {
cy.hasScriptWithChartbeatSrc();
});
it('should have chartbeat config set to window object', () => {
cy.hasGlobalChartbeatConfig();
});
}
},
),
);
describe(`Tests for ${service} ${pageType} ${variant} with toggle use`, () => {
before(() => {
Expand Down

0 comments on commit eb78848

Please sign in to comment.