Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
scottqueen-bixal authored Oct 21, 2024
2 parents 9035c9e + 45ee688 commit 6927d97
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 10 additions & 6 deletions benefit-finder/cypress/e2e/storybook/dataLayer.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ describe('Calls to Google Analytics Object', function () {
.button()
.contains(EN_LOCALE_DATA.intro.button)
.then(() => {

// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(wait).then(() => {
assert.isDefined(
Expand All @@ -228,13 +229,16 @@ describe('Calls to Google Analytics Object', function () {
'bf_page_change is loaded'
)

const bfEventIndex = window.dataLayer.findIndex(
x => x.event === 'bf_page_change'
)
const ev = { ...window.dataLayer[bfEventIndex] }
removeID(ev)
cy.wait(500).then(() => {
// get the last pushed event
const bfEventIndex = window.dataLayer.findIndex(
x => x.event === 'bf_page_change'
)
const ev = { ...window.dataLayer[bfEventIndex] }
removeID(ev)

expect(ev).to.deep.equal(dataLayerValueIntro)
expect(ev).to.deep.equal(dataLayerValueIntro)
})
})
})
})
Expand Down
2 changes: 1 addition & 1 deletion usagov-2021
Submodule usagov-2021 updated 895 files

0 comments on commit 6927d97

Please sign in to comment.