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

View File

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