feat: Inclui testIds nos blocos

This commit is contained in:
Eleonora Otz de Mendonça Soares 2023-01-31 21:36:33 -03:00
parent 6e86de8d25
commit 23f0e8a3e8
2 changed files with 86 additions and 13 deletions

View File

@ -4,6 +4,10 @@
margin-bottom: 5px; margin-bottom: 5px;
} }
[class*="html--cart-button"] {
width: 100%;
}
[class*="html--buy-button"] :global(.vtex-button) { [class*="html--buy-button"] :global(.vtex-button) {
height: 49px; height: 49px;
background: black; background: black;

View File

@ -14,6 +14,8 @@
"newsletter" "newsletter"
] ]
}, },
// Breadcrumb
"html#breadcrumb": { "html#breadcrumb": {
"props": { "props": {
"tag": "section", "tag": "section",
@ -22,6 +24,8 @@
}, },
"children": ["breadcrumb"] "children": ["breadcrumb"]
}, },
// Produto
"flex-layout.row#specifications-title": { "flex-layout.row#specifications-title": {
"children": ["rich-text#specifications"] "children": ["rich-text#specifications"]
}, },
@ -71,6 +75,7 @@
] ]
}, },
// Imagens de produto
"flex-layout.col#stack": { "flex-layout.col#stack": {
"children": ["stack-layout"], "children": ["stack-layout"],
"props": { "props": {
@ -79,8 +84,15 @@
} }
}, },
"flex-layout.row#product-image": { "flex-layout.row#product-image": {
"children": ["product-images"] "children": ["html#product-images"]
}, },
"html#product-images": {
"children": ["product-images"],
"props": {
"testId": "product-images"
}
},
"product-images": { "product-images": {
"props": { "props": {
"aspectRatio": { "aspectRatio": {
@ -93,6 +105,8 @@
"thumbnailsOrientation": "horizontal" "thumbnailsOrientation": "horizontal"
} }
}, },
// Especificações de produto
"flex-layout.col#right-col": { "flex-layout.col#right-col": {
"props": { "props": {
"preventVerticalStretch": true, "preventVerticalStretch": true,
@ -103,8 +117,10 @@
"product-identifier.product", "product-identifier.product",
"flex-layout.row#selling-price", "flex-layout.row#selling-price",
"product-installments", "product-installments",
"Pix", "html#pix-price",
"sku-selector", // "Pix",
// "sku-selector",
"html#sku-selector",
"html#buy-button", "html#buy-button",
"product-gifts", "product-gifts",
"availability-subscriber", "availability-subscriber",
@ -119,6 +135,13 @@
"children": ["vtex.store-components:product-name"] "children": ["vtex.store-components:product-name"]
}, },
"html#sku-selector": {
"children": ["sku-selector"],
"props": {
"testId": "sku-selector"
}
},
"sku-selector": { "sku-selector": {
"props": { "props": {
"variationsSpacing": 3, "variationsSpacing": 3,
@ -127,6 +150,7 @@
} }
}, },
// Parcelamento
"product-installments": { "product-installments": {
"props": { "props": {
"markers": ["discount"], "markers": ["discount"],
@ -135,13 +159,38 @@
} }
}, },
// Quantidade e botão de compra
"html#buy-button": { "html#buy-button": {
"props": { "props": {
"blockClass": "buy-button" "blockClass": "buy-button"
}, },
"children": ["product-quantity#size", "add-to-cart-button"] "children": [ "html#product-quantity-size", "html#cart-button"]
}, },
"html#cart-button": {
"children": ["add-to-cart-button"],
"props": {
"testId": "add-to-cart-button",
"blockClass": "cart-button"
}
},
"html#product-quantity-size": {
"children": ["product-quantity#size"],
"props": {
"testId": "product-quantity"
}
},
"product-quantity#size": {
"props": {
"size": "large",
"width": "28%",
"showLabel": false
}
},
// Produto indisponível
"flex-layout.row#product-availability": { "flex-layout.row#product-availability": {
"props": { "props": {
"colGap": 7, "colGap": 7,
@ -154,6 +203,7 @@
"flex-layout.col#right-col-availability" "flex-layout.col#right-col-availability"
] ]
}, },
"flex-layout.col#right-col-availability": { "flex-layout.col#right-col-availability": {
"props": { "props": {
"preventVerticalStretch": true, "preventVerticalStretch": true,
@ -167,6 +217,8 @@
"sku-selector" "sku-selector"
] ]
}, },
// Formulário produto indisponível
"flex-layout.row#availability": { "flex-layout.row#availability": {
"props": { "props": {
"blockClass": "message-availability" "blockClass": "message-availability"
@ -174,14 +226,15 @@
"children": ["availability-subscriber"] "children": ["availability-subscriber"]
}, },
"product-quantity#size": { // Desconto Pix
"html#pix-price": {
"children": ["Pix"],
"props": { "props": {
"size": "large", "testId": "pix-price"
"width": "28%",
"showLabel": false
} }
}, },
// Descrição
"tab-layout": { "tab-layout": {
"children": ["tab-list", "tab-content"], "children": ["tab-list", "tab-content"],
"props": { "props": {
@ -328,6 +381,7 @@
} }
}, },
// Prateleira de produtos
"rich-text#carousel": { "rich-text#carousel": {
"props": { "props": {
"text": "Você também pode gostar:", "text": "Você também pode gostar:",
@ -338,6 +392,25 @@
}, },
"product-summary.shelf#carousel": { "product-summary.shelf#carousel": {
"children": ["html#product-summary"]
},
"list-context.product-list#product-carousel": {
"blocks": ["product-summary.shelf#carousel"],
"children": ["html#product-summary-list"]
},
"html#product-summary-list": {
"children": ["slider-layout#demo-products"],
"props": {
"testId": "product-summary-list"
}
},
"html#product-summary": {
"props": {
"testId": "vtex-product-summary"
},
"children": [ "children": [
"product-summary-image", "product-summary-image",
"product-summary-name", "product-summary-name",
@ -345,11 +418,7 @@
] ]
}, },
"list-context.product-list#product-carousel": { // Newsletter
"blocks": ["product-summary.shelf#carousel"],
"children": ["slider-layout#demo-products"]
},
"newsletter": { "newsletter": {
"props": { "props": {
"label": "Assine nossa newsletter", "label": "Assine nossa newsletter",