Feat(Pdp): Cria blocos html adicionando os testIds nos elementos

This commit is contained in:
Rhayllon Daudt 2023-02-10 23:53:42 -03:00
parent 44507ba5ab
commit 839c0afbc8
2 changed files with 96 additions and 18 deletions

View File

@ -3,7 +3,7 @@
"children": [ "children": [
"html#breadcrumb", "html#breadcrumb",
"condition-layout.product#availability", "condition-layout.product#availability",
"tab-layout#descriptionLayout", "html#productDescription",
// "flex-layout.row#specifications-title", // "flex-layout.row#specifications-title",
// "product-specification-group#table", // "product-specification-group#table",
"rich-text#otherProductTitle", "rich-text#otherProductTitle",
@ -48,13 +48,11 @@
"product-summary.shelf#prateleira": { "product-summary.shelf#prateleira": {
"props": { "props": {
"blockClass": "prateleiraShelf" "blockClass": "prateleiraShelf",
"testId": "vtex-product-summary"
}, },
"children": [ "children": [
"product-summary-image#prateleiraImg", "html#productSummary"
"product-summary-name#prateleira",
"product-list-price#prateleira",
"product-selling-price#prateleira"
] ]
}, },
@ -96,7 +94,7 @@
"list-context.product-list#prateleira": { "list-context.product-list#prateleira": {
"blocks": ["product-summary.shelf#prateleira"], "blocks": ["product-summary.shelf#prateleira"],
"children": ["slider-layout#prateleiraSlider"] "children": ["html#productSummaryList"]
}, },
"flex-layout.col#description": { "flex-layout.col#description": {
@ -164,7 +162,7 @@
"props": { "props": {
"blockClass": "wrapperQuantity" "blockClass": "wrapperQuantity"
}, },
"children": ["product-quantity#quantityPdpItens", "flex-layout.row#buy-button"] "children": ["html#productQuantity", "flex-layout.row#buy-button"]
}, },
"product-quantity#quantityPdpItens": { "product-quantity#quantityPdpItens": {
@ -319,7 +317,7 @@
} }
}, },
"flex-layout.row#product-image": { "flex-layout.row#product-image": {
"children": ["product-images#imgsMain"] "children": ["html#productImages"]
}, },
"product-images#imgsMain": { "product-images#imgsMain": {
"props": { "props": {
@ -343,15 +341,15 @@
"children": [ "children": [
"flex-layout.row#product-name", "flex-layout.row#product-name",
"product-rating-summary", "product-rating-summary",
"product-identifier.product#identifierMain", "html#productCode",
"flex-layout.row#selling-price", "html#productPrice",
"html#productInstallments", "html#productInstallments",
"pix", "html#pixPrice",
"product-separator", "product-separator",
"sku-selector#inverseOrder", "html#skuSelector",
"html#wrapperQuantity", "html#wrapperQuantity",
"availability-subscriber", "availability-subscriber",
"shipping-simulator" "html#shippingSimulator"
] ]
}, },
@ -362,6 +360,86 @@
"children": ["product-installments#InstallmentsMainPdp"] "children": ["product-installments#InstallmentsMainPdp"]
}, },
"html#pixPrice": {
"props": {
"testId": "pix-price"
},
"children": ["pix"]
},
"html#productPrice": {
"props": {
"testId": "product-price"
},
"children": ["flex-layout.row#selling-price"]
},
"html#productQuantity": {
"props": {
"testId": "product-quantity"
},
"children": ["product-quantity#quantityPdpItens"]
},
"html#addToCartButton": {
"props": {
"testId": "add-to-cart-button"
},
"children": ["add-to-cart-button#addSacola"]
},
"html#productCode": {
"props": {
"testId": "product-code"
},
"children": ["product-identifier.product#identifierMain"]
},
"html#productImages": {
"props": {
"testId": "product-images"
},
"children": ["product-images#imgsMain"]
},
"html#productName": {
"props": {
"testId": "product-name"
},
"children": ["vtex.store-components:product-name"]
},
"html#shippingSimulator": {
"props": {
"testId": "shipping-simulator"
},
"children": ["shipping-simulator"]
},
"html#skuSelector": {
"props": {
"testId": "sku-selector"
},
"children": ["sku-selector#inverseOrder"]
},
"html#productDescription": {
"props": {
"testId": "product-description"
},
"children": ["tab-layout#descriptionLayout"]
},
"html#productSummary": {
"props": {
"testId": "vtex-product-summary"
},
"children": [
"product-summary-image#prateleiraImg",
"product-summary-name#prateleira",
"product-list-price#prateleira",
"product-selling-price#prateleira"
]
},
"html#productSummaryList": {
"props": {
"testId": "product-summary-list"
},
"children": [
"slider-layout#prateleiraSlider"
]
},
"product-installments#InstallmentsMainPdp": { "product-installments#InstallmentsMainPdp": {
"props": { "props": {
"blockClass": "InstallmentsMainPdp", "blockClass": "InstallmentsMainPdp",
@ -373,7 +451,7 @@
"props": { "props": {
"marginBottom": 3 "marginBottom": 3
}, },
"children": ["vtex.store-components:product-name"] "children": ["html#productName"]
}, },
@ -398,7 +476,7 @@
"marginBottom": 7, "marginBottom": 7,
"blockClass": "buyButton" "blockClass": "buyButton"
}, },
"children": ["add-to-cart-button#addSacola"] "children": ["html#addToCartButton"]
}, },
"flex-layout.row#product-availability": { "flex-layout.row#product-availability": {

View File

@ -24,7 +24,7 @@
} }
.sliderRightArrow--prateleiraSlider { .sliderRightArrow--prateleiraSlider {
right: -2.53%; right: -2%;
} }
@media screen and (max-width: 1024px) { @media screen and (max-width: 1024px) {
.sliderRightArrow--prateleiraSlider { .sliderRightArrow--prateleiraSlider {
@ -33,7 +33,7 @@
} }
.sliderLeftArrow--prateleiraSlider { .sliderLeftArrow--prateleiraSlider {
left: -2.53%; left: -2%;
} }
@media screen and (max-width: 1024px) { @media screen and (max-width: 1024px) {
.sliderLeftArrow--prateleiraSlider { .sliderLeftArrow--prateleiraSlider {