From ca07cdb06c5350eac84764c576feed64f8cf4410 Mon Sep 17 00:00:00 2001 From: Ramon Dias Ferreira Date: Fri, 10 Feb 2023 15:07:00 -0300 Subject: [PATCH] feat: todos os testes ids adicionados --- store/blocks/pdp/product-assembly.jsonc | 2 +- store/blocks/pdp/product.jsonc | 99 +++++++++++++++++++++---- 2 files changed, 86 insertions(+), 15 deletions(-) diff --git a/store/blocks/pdp/product-assembly.jsonc b/store/blocks/pdp/product-assembly.jsonc index 726e24a..0811152 100644 --- a/store/blocks/pdp/product-assembly.jsonc +++ b/store/blocks/pdp/product-assembly.jsonc @@ -3,7 +3,7 @@ "props": { "position": "bottom" }, - "children": ["html#add-to-cart-button"] + "children": ["html#add-to-cart-container"] }, "product-assembly-options": { "children": [ diff --git a/store/blocks/pdp/product.jsonc b/store/blocks/pdp/product.jsonc index c924844..0d7ab70 100644 --- a/store/blocks/pdp/product.jsonc +++ b/store/blocks/pdp/product.jsonc @@ -6,7 +6,7 @@ // "flex-layout.row#description", // "flex-layout.row#specifications-title", // "product-specification-group#table", - "tab-layout#product", + "html#product-description", "rich-text#carrossel-message", "list-context.product-list#carousel-list", // "product-summary.shelf", @@ -57,7 +57,8 @@ "marginTop": 4, "marginBottom": 7, "paddingTop": 7, - "paddingBottom": 7 + "paddingBottom": 7, + "blockClass": "product-main" }, "children": ["flex-layout.col#stack", "flex-layout.col#right-col"] }, @@ -90,8 +91,16 @@ } }, "flex-layout.row#product-image": { + "children": ["html#product-image"] + }, + + "html#product-image": { + "props": { + "testId": "product-images" + }, "children": ["product-images"] }, + "product-images": { "props": { "aspectRatio": { @@ -113,7 +122,7 @@ "rowGap": 0 }, "children": [ - "flex-layout.row#product-name", + "html#product-name", // "product-rating-summary", // "flex-layout.row#list-price-savings", @@ -121,16 +130,23 @@ "html#installments", "html#pix", // "product-separator", - "sku-selector", + "html#sku-selector", "product-assembly-options", "product-gifts", - "html#add-to-cart-button", + "html#add-to-cart-container", "availability-subscriber", - "shipping-simulator", + "html#shipping-simulator", "share#default" ] }, + "html#shipping-simulator": { + "props": { + "testId": "shipping-simulator" + }, + "children": ["shipping-simulator"] + }, + "html#installments": { "props": { "testId": "product-installments" @@ -152,12 +168,28 @@ "children": ["flex-layout.row#selling-price"] }, - "html#add-to-cart-button": { + "html#add-to-cart-container": { "props": { "testId": "add-to-cart-button", "blockClass": "cart-button" }, - "children": ["product-quantity", "add-to-cart-button"] + "children": ["html#product-quantity", "add-to-cart-button"] + }, + + "html#product-quantity": { + "props": { + "testId": "product-quantity", + "blockClass": "cart-button" + }, + "children": ["product-quantity"] + }, + + + "html#product-name": { + "props": { + "testId": "product-name" + }, + "children": ["flex-layout.row#product-name"] }, "flex-layout.row#product-name": { @@ -165,7 +197,21 @@ "marginBottom": 3, "blockClass": "identifier" }, - "children": ["vtex.store-components:product-name", "product-identifier.product"] + "children": ["vtex.store-components:product-name", "html#codigo"] + }, + + "html#codigo": { + "props": { + "testId": "product-code" + }, + "children": ["product-identifier.product"] + }, + + "html#sku-selector": { + "props": { + "testId": "sku-selector" + }, + "children": ["sku-selector"] }, "sku-selector": { @@ -226,6 +272,13 @@ } }, + "html#product-description": { + "props": { + "testId": "product-description" + }, + "children": ["tab-layout#product"] + }, + "tab-layout#product":{ "children": [ "tab-list#product", @@ -357,18 +410,36 @@ "list-context.product-list#carousel-list": { "blocks": ["product-summary.shelf#carousel-shelf"], - "children": ["slider-layout#carousel"] + "children": ["html#product-summary-list"] }, "product-summary.shelf#carousel-shelf": { "children": [ - "product-summary-image", - "product-summary-name", - "product-summary-space", - "product-summary-price" + "html#vtex-product-summary" ] }, + "html#vtex-product-summary": { + "props": { + "testId": "vtex-product-summary" + }, + "children": ["product-summary-image", + "product-summary-name", + "product-summary-space", + "product-list-price", + "product-selling-price"] + }, + + + + "html#product-summary-list": { + "props": { + "testId": "product-summary-list" + }, + "children": ["slider-layout#carousel"] + }, + + "slider-layout#carousel": { "props": { "itemsPerPage": {