Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: increase waits in beacon tracking e2e tests #1155

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading