Skip to content

Commit

Permalink
MOL-438/MOL-459: update test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
tdang1-shopmacher committed Oct 3, 2024
1 parent 7eca292 commit 63cdf52
Show file tree
Hide file tree
Showing 5 changed files with 3,047 additions and 36 deletions.
2 changes: 1 addition & 1 deletion application/custom-application-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const config = {
},
headers: {
csp: {
'connect-src': ['*.europe-west1.gcp.commercetools.app'],
'connect-src': ['*.euope-west1.gcp.commercetoolsr.app'],
},
},
};
Expand Down
38 changes: 38 additions & 0 deletions application/cypress/e2e/welcome.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,45 @@ describe('Test welcome.cy.', () => {
});
});
it('should render page', () => {
cy.fixture('forward-to').then((response) => {
cy.intercept('GET', '/proxy/forward-to', {
statusCode: 200,
body: response,
});
});

const paymentMethods = [
'PayPal',
'iDEAL Pay in 3 instalments, 0% interest',
'iDEAL',
'Bancontact',
'Blik',
];

const headers = ['Payment method', 'Active', 'Icon', 'Display order'];

cy.findByText('Mollie payment methods').should('exist');
cy.findByText('Content will follow...').should('not.exist');

headers.forEach((header) => {
cy.findByText(header).should('exist');
});

paymentMethods.forEach((paymentMethod) => {
cy.findByText(paymentMethod).should('exist');
});
});

it('should not render page', () => {
cy.fixture('forward-to').then((response) => {
cy.intercept('GET', '/proxy/forward-to', {
statusCode: 200,
body: {},
});
});

cy.findByText('Mollie payment methods').should('exist');
cy.findByText('Content will follow...').should('not.exist');
cy.get('[data-testid="no-data-notification"]').should('exist');
});
});
Loading

0 comments on commit 63cdf52

Please sign in to comment.