Skip to content

Commit

Permalink
Merge pull request #1155 from searchspring/tracking-cypress-delay
Browse files Browse the repository at this point in the history
test: increase waits in beacon tracking e2e tests
  • Loading branch information
dkonieczek authored Sep 5, 2024
2 parents 28ae211 + 10747b3 commit 79b7017
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions packages/snap-preact-demo/tests/cypress/e2e/tracking/track.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('Tracking', () => {
cy.wait(`@${BeaconType.LOGIN}`).then(() => {
// initial init will send a login event for the shopper due to integration script variables

cy.wait(100);
cy.wait(1000);
const shopperId = 'snaptest';
cy.get('#login').click();
cy.get('#login-modal').find('input').type(shopperId);
Expand All @@ -49,7 +49,7 @@ describe('Tracking', () => {
expect(store).to.haveOwnProperty('pagination');
expect(store.pagination.totalResults).to.be.greaterThan(0);

cy.wait(100);
cy.wait(1000);
cy.get(`.ss__result:first`).should('exist').trigger('click');

cy.wait(`@${BeaconType.CLICK}`).should((interception) => {
Expand Down Expand Up @@ -84,7 +84,7 @@ describe('Tracking', () => {
});

it('tracked product view', () => {
cy.wait(100);
cy.wait(1000);
cy.visit('https://localhost:2222/product.html');

cy.snapController().then(({ store }) => {
Expand Down Expand Up @@ -118,7 +118,7 @@ describe('Tracking', () => {
});

it('tracked cart view', () => {
cy.wait(100);
cy.wait(1000);
cy.visit('https://localhost:2222/cart.html');
cy.snapController().then(({ store }) => {
cy.wait(`@${BeaconType.CART}`).should((interception) => {
Expand Down Expand Up @@ -169,7 +169,7 @@ describe('Tracking', () => {
});

it('tracked order transaction', () => {
cy.wait(100);
cy.wait(1000);
cy.visit('https://localhost:2222/order.html');
cy.snapController().then(({ store }) => {
cy.wait(`@${BeaconType.ORDER}`).should((interception) => {
Expand Down Expand Up @@ -220,7 +220,7 @@ describe('Tracking', () => {
});

it('tracked all recommendation interaction events', () => {
cy.wait(100);
cy.wait(1000);
cy.visit('https://localhost:2222/product.html');

cy.snapController('recommend_similar_0').then(({ store }) => {
Expand Down Expand Up @@ -260,7 +260,7 @@ describe('Tracking', () => {
});
});

cy.wait(100);
cy.wait(1000);
// scroll down
cy.get('.ss__recommendation:first').scrollIntoView();

Expand Down Expand Up @@ -307,7 +307,7 @@ describe('Tracking', () => {
});
});

cy.wait(100);
cy.wait(1000);
// click next button and assert new profile product impressions
cy.get('.ss__recommendation:first .ss__carousel__next').should('exist').trigger('click');

Expand Down Expand Up @@ -344,7 +344,7 @@ describe('Tracking', () => {
});
});

cy.wait(100);
cy.wait(1000);
// click on result
cy.get('.ss__recommendation:first .ss__result')
.filter(':visible:first')
Expand Down

0 comments on commit 79b7017

Please sign in to comment.