From b5945b81e3d239913d3294d8c3a9906267e2bd4e Mon Sep 17 00:00:00 2001 From: Bernardo Waldhelm Date: Wed, 8 Feb 2023 14:32:09 -0300 Subject: [PATCH] feat(product): adicionando testId pix-component de maneira correta --- react/components/Html/style.css | 5 ++++ react/components/PixDiscount/index.tsx | 4 ++-- store/blocks/pdp/product.jsonc | 23 +++++++++++-------- styles/css/vtex.product-price.css | 2 +- .../vtexProduct/vtex.product-price.scss | 2 +- 5 files changed, 22 insertions(+), 14 deletions(-) diff --git a/react/components/Html/style.css b/react/components/Html/style.css index 6a029ae..ac5093d 100644 --- a/react/components/Html/style.css +++ b/react/components/Html/style.css @@ -10,3 +10,8 @@ [class*="html--cep"] { margin: 16px 0; } + +[class*="agenciamagma-store-theme-5-x-html--pix-component" ]{ + margin: 0; + padding: 0; +} diff --git a/react/components/PixDiscount/index.tsx b/react/components/PixDiscount/index.tsx index 4da239f..10b0cd3 100644 --- a/react/components/PixDiscount/index.tsx +++ b/react/components/PixDiscount/index.tsx @@ -23,9 +23,9 @@ const PixDiscount = () => { className={styles["pixContainer__img"]} />
- +

R$ {pixPrice?.toFixed(2).toString().replace(".", ",")} - +

10% de desconto diff --git a/store/blocks/pdp/product.jsonc b/store/blocks/pdp/product.jsonc index 43bcc1e..2bf21e7 100644 --- a/store/blocks/pdp/product.jsonc +++ b/store/blocks/pdp/product.jsonc @@ -114,6 +114,14 @@ "children": ["vtex.store-components:product-name"] }, + // "html#flex-layout.row#selling-price": { + // "props": { + // "testId": "product-price", + // "tag": "span" + // }, + // "children": ["flex-layout.row#selling-price"] + // }, + "html#sku-selector": { "props": { "testId": "sku-selector" @@ -139,12 +147,12 @@ "product-installments#installment": { "props": { - "markers": ["portion"], + "markers": ["portion", "portion2"], "installmentOptionsFilter": { - "paymenSystemName": "Mastercard", + "paymentSystemName": "Mastercard", "installmentsQuantity": 4 }, - "message": "{installmentsNumber}x de {installmentValue} sem juros", + "message": "{installmentsNumber}x de {installmentValue} sem juros", "blockClas": "installment" } }, @@ -152,7 +160,8 @@ "html#pix-component": { "props": { "tag": "section", - "testId": "pix-price" + "testId": "pix-price", + "blockClass": "pix-component" }, "children": ["pix-component"] }, @@ -200,12 +209,6 @@ }, "flex-layout.row#product-availability": { - "props": { - "colGap": 7, - "marginTop": 4, - "marginBottom": 7, - "paddingTop": 7 - }, "children": [ "flex-layout.col#stack", "flex-layout.col#right-col-availability" diff --git a/styles/css/vtex.product-price.css b/styles/css/vtex.product-price.css index 7d1d94e..0a2856e 100644 --- a/styles/css/vtex.product-price.css +++ b/styles/css/vtex.product-price.css @@ -27,6 +27,6 @@ height: 22px; color: #929292; } -.installments .installments-portion { +.installments .installments-portion, .installments .installments-portion2 { font-weight: 400; } \ No newline at end of file diff --git a/styles/sass/pages/product/vtexProduct/vtex.product-price.scss b/styles/sass/pages/product/vtexProduct/vtex.product-price.scss index 7220bec..59458e7 100644 --- a/styles/sass/pages/product/vtexProduct/vtex.product-price.scss +++ b/styles/sass/pages/product/vtexProduct/vtex.product-price.scss @@ -17,7 +17,7 @@ height: 22px; color: #929292; - .installments-portion { + .installments-portion, .installments-portion2 { font-weight: 400; }