diff --git a/tests/e2e/specs/productDetailPage_spec.js b/tests/e2e/specs/productDetailPage_spec.js index ac2405b2..c0296098 100644 --- a/tests/e2e/specs/productDetailPage_spec.js +++ b/tests/e2e/specs/productDetailPage_spec.js @@ -16,11 +16,11 @@ describe('Product detail page', () => { cy.wrap($product) .find('[data-test=product-old-price]') - .contains(/\s*248,75\s€/); + .contains(/^\s*248,75\s€\s*$/); cy.wrap($product) .find('[data-test=product-new-price]') - .contains(/\s*174,12\s€/); + .contains(/^\s*174,12\s€\s*$/); cy.wrap($product) .find('[data-test=product-attributes-accordion]') @@ -30,7 +30,7 @@ describe('Product detail page', () => { .find('[data-test=product-attributes-list]') .should('have.length', 7) .eq(2) - .contains(/\s*size:\s+34\s*/); + .contains(/^\s*size:\s+34\s*$/); }); cy.get('[data-test=product-gallery]') diff --git a/tests/e2e/specs/productThumbnail_spec.js b/tests/e2e/specs/productThumbnail_spec.js index 048f6416..b2205fd2 100644 --- a/tests/e2e/specs/productThumbnail_spec.js +++ b/tests/e2e/specs/productThumbnail_spec.js @@ -20,11 +20,11 @@ describe('Product thumbnail', () => { cy.wrap($thumbnail) .find('[data-test=product-old-price]') - .contains(/\s*248,75\s€/); + .contains(/^\s*248,75\s€\s*$/); cy.wrap($thumbnail) .find('[data-test=product-new-price]') - .contains(/\s*174,12\s€/); + .contains(/^\s*174,12\s€\s*$/); }); cy.get('[data-test=product-thumbnail-name]') @@ -38,7 +38,7 @@ describe('Product thumbnail', () => { cy.wrap($thumbnail) .find('[data-test=product-original-price]') - .contains(/\s*231,25\s€/); + .contains(/\s*231,25\s€\s*$/); cy.wrap($thumbnail) .find('[data-test=product-new-price]')