feat: Adiciona testID

This commit is contained in:
Izabela Balizardo 2023-02-10 21:28:44 -03:00
parent d3ed0cc8c1
commit faa3fcd436
8 changed files with 170 additions and 35 deletions

View File

@ -205,9 +205,10 @@ button[class*="vtex-numeric-stepperminus-button numeric-stepperminus-button br2
color: rgba(0, 0, 0, 0.58); color: rgba(0, 0, 0, 0.58);
} }
[class*="pix-p"] span { [class*="pix-p"] p {
display: inline;
font-family: "Open Sans"; font-family: "Open Sans";
top: -10px;
position: relative; position: relative;
font-size: 13px; font-size: 13px;
font-weight: 300; font-weight: 300;
@ -215,3 +216,8 @@ button[class*="vtex-numeric-stepperminus-button numeric-stepperminus-button br2
margin-top: 10px; margin-top: 10px;
text-align: left; text-align: left;
} }
.html--botaoadc-quantidade {
display: flex;
}

View File

@ -19,7 +19,7 @@ const Pix = () => {
.toFixed(2) .toFixed(2)
.replace(".", ",")}`} .replace(".", ",")}`}
<div className="pix-p"> <div className="pix-p">
<span>10% de desconto</span> <p>10% de desconto</p>
</div> </div>
</div> </div>
</div> </div>

View File

@ -3,13 +3,20 @@
"children": [ "children": [
"html#breadcrumb", "html#breadcrumb",
"condition-layout.product#availability", "condition-layout.product#availability",
"tab-layout#descricao", "html#tab-layout",
"list-context.product-list#list", "list-context.product-list#list",
"product-questions-and-answers", "product-questions-and-answers",
"newsletter" "newsletter"
] ]
}, },
"html#tab-layout": {
"props": {
"testId": "product-description"
},
"children": ["tab-layout#descricao"]
},
"tab-layout#descricao": { "tab-layout#descricao": {
"children": ["tab-list#descricao", "tab-content#descricao"], "children": ["tab-list#descricao", "tab-content#descricao"],
@ -113,28 +120,57 @@
} }
}, },
"rich-text#prat-titulo":{ "rich-text#prat-titulo": {
"props": { "props": {
"textAlignment": "CENTER", "textAlignment": "CENTER",
"textPosition":"CENTER", "textPosition": "CENTER",
"text": "Você também pode gostar:", "text": "Você também pode gostar:",
"blockClass":"shelfTitleText" "blockClass": "shelfTitleText"
} }
}, },
"list-context.product-list#list": { "list-context.product-list#list": {
"blocks": ["product-summary.shelf#carrosselprodutos"], "blocks": ["product-summary.shelf#carrosselprodutos"],
"children": [ "rich-text#prat-titulo","slider-layout#carrosselatualizado"] "children": ["rich-text#prat-titulo", "html#slider"]
}, },
"product-summary.shelf#carrosselprodutos": { "product-summary.shelf#carrosselprodutos": {
"children": ["html#product-summary"]
},
"html#product-summary": {
"props": {
"testId": "vtex-product-summary"
},
"children": [ "children": [
"product-summary-image", "product-summary-image",
"product-summary-name", "product-summary-name",
"product-summary-price" "product-list-price#summary",
"product-selling-price#summary"
] ]
}, },
"html#product-list-price#summary": {
"props": {
"blockClass": "preco-prateleira"
},
"children": ["product-list-price"]
},
"html#selling-price#summary": {
"props": {
"blockClass": "preco-riscado"
},
"children": ["product-selling-price"]
},
"html#slider": {
"props": {
"testId": "product-summary-list"
},
"children": ["slider-layout#carrosselatualizado"]
},
"slider-layout#carrosselatualizado": { "slider-layout#carrosselatualizado": {
"props": { "props": {
"itemsPerPage": { "itemsPerPage": {
@ -183,6 +219,7 @@
}, },
"flex-layout.row#product-main": { "flex-layout.row#product-main": {
"props": { "props": {
"blockClass": "container-main",
"colGap": 7, "colGap": 7,
"rowGap": 7, "rowGap": 7,
"marginTop": 4, "marginTop": 4,
@ -190,6 +227,8 @@
"paddingTop": 7, "paddingTop": 7,
"paddingBottom": 7 "paddingBottom": 7
}, },
"children": ["flex-layout.col#stack", "flex-layout.col#right-col"] "children": ["flex-layout.col#stack", "flex-layout.col#right-col"]
}, },
@ -221,6 +260,13 @@
} }
}, },
"flex-layout.row#product-image": { "flex-layout.row#product-image": {
"children": ["html#product-image"]
},
"html#product-image": {
"props": {
"testId": "product-images"
},
"children": ["product-images"] "children": ["product-images"]
}, },
"product-images": { "product-images": {
@ -241,27 +287,63 @@
"rowGap": 0 "rowGap": 0
}, },
"children": [ "children": [
"flex-layout.row#product-name", "html#product-name",
"product-identifier.product", "html#codigo",
"product-rating-summary", "product-rating-summary",
"flex-layout.row#list-price-savings", "flex-layout.row#list-price-savings",
"flex-layout.row#selling-price", "flex-layout.row#selling-price",
"product-installments", "html#product-installments",
"Pix", "html#pix",
"sku-selector", "html#sku-selector",
"product-quantity", "html#container-buttonquantity",
"product-assembly-options", "product-assembly-options",
"product-gifts", "product-gifts",
"flex-layout.row#buy-button",
"availability-subscriber", "availability-subscriber",
"shipping-simulator", "html#shipping-simulator",
"share#default" "share#default"
] ]
}, },
"flex-layout.row#product-name": { "html#container-buttonquantity": {
"props": { "props": {
"marginBottom": 3 "blockClass": "botaoadc-quantidade"
},
"children": ["html#product-quantity", "flex-layout.row#buy-button"]
},
"html#shipping-simulator": {
"props": {
"testId": "shipping-simulator"
},
"children": ["shipping-simulator"]
},
"html#product-quantity": {
"props": {
"testId": "product-quantity"
},
"children": ["product-quantity"]
},
"html#product-installments": {
"props": {
"testId": "product-installments"
},
"children": ["product-installments"]
},
"html#pix": {
"props": {
"testId": "pix-price"
},
"children": ["Pix"]
},
"html#product-name": {
"props": {
"marginBottom": 3,
"testId": "product-name"
}, },
"children": ["vtex.store-components:product-name"] "children": ["vtex.store-components:product-name"]
}, },
@ -273,15 +355,28 @@
} }
}, },
"html#sku-selector": {
"props": {
"testId": "sku-selector"
},
"children": ["sku-selector"]
},
"flex-layout.row#buy-button": { "flex-layout.row#buy-button": {
"props": { "props": {
"marginTop": 4, "marginTop": 4,
"marginBottom": 7, "marginBottom": 7,
"blockClass": "btn-product" "blockClass": "btn-product"
}, },
"children": ["add-to-cart-button"] "children": ["html#add-to-cart-button"]
}, },
"html#add-to-cart-button": {
"props": {
"testId": "add-to-cart-button"
},
"children": ["add-to-cart-button"]
},
"flex-layout.row#product-availability": { "flex-layout.row#product-availability": {
"props": { "props": {
"colGap": 7, "colGap": 7,
@ -307,6 +402,13 @@
"flex-layout.row#availability" "flex-layout.row#availability"
] ]
}, },
"html#codigo": {
"props": {
"testId": "product-code"
},
"children": ["product-identifier.product"]
},
"flex-layout.row#availability": { "flex-layout.row#availability": {
"props": { "props": {
"blockClass": "message-availability" "blockClass": "message-availability"

View File

@ -6,7 +6,15 @@
"preventHorizontalStretch": true, "preventHorizontalStretch": true,
"marginBottom": 4 "marginBottom": 4
}, },
"children": ["html#selling-price"]
},
"html#selling-price": {
"props": {
"testId": "product-price"
},
"children": ["product-selling-price"] "children": ["product-selling-price"]
}, },
"flex-layout.row#list-price-savings": { "flex-layout.row#list-price-savings": {

View File

@ -8,22 +8,28 @@
/* Media Query M3 */ /* Media Query M3 */
/* Grid breakpoints */ /* Grid breakpoints */
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap");
.flexRowContent--btn-product {
margin: 0;
}
.flexRow--btn-product { .flexRow--btn-product {
width: 100%; width: 100%;
max-width: 380px; margin: 0 10px;
bottom: 75px;
position: relative;
left: 155px;
} }
.flexRow--btn-product :global(.vtex-button) { .flexRow--btn-product :global(.vtex-button) {
background-color: black; background-color: black;
border: 1px solid black; border: 1px solid black;
border-radius: 0; border-radius: 0;
height: 49px; padding: 12px;
margin: 0;
} }
.flexRow--btn-product :global(.vtex-button):hover { .flexRow--btn-product :global(.vtex-button):hover {
background-color: rgb(36, 36, 36); background-color: rgb(36, 36, 36);
} }
.flexRow--btn-product .flexRow--btn-product--botao-adicionar { .flexRow--btn-product .flexRow--btn-product--botao-adicionar {
font-family: "Open Sans", sans-serif; font-family: "Open Sans", sans-serif;
}
.flexRowContent--container-main {
padding: 0 40px;
} }

View File

@ -47,13 +47,18 @@
margin: 16px; margin: 16px;
} }
.newsletter .inputGroup { .newsletter .inputGroup {
width: 774px; display: flex;
} }
.newsletter .inputGroup :global(.vtex-input-prefix__group) { .newsletter .inputGroup :global(.vtex-input-prefix__group) {
border: none; border: none;
border-bottom: 1px solid gray; border-bottom: 1px solid gray;
border-radius: 0; border-radius: 0;
} }
@media screen and (min-width: 768px) {
.newsletter .inputGroup {
width: 774px;
}
}
.newsletter .inputGroup :global(.vtex-styleguide-9-x-input) { .newsletter .inputGroup :global(.vtex-styleguide-9-x-input) {
background-color: black; background-color: black;
} }
@ -115,7 +120,6 @@
.shippingContainer { .shippingContainer {
display: flex; display: flex;
position: relative; position: relative;
bottom: 76px;
} }
.shippingContainer :global(.vtex-button) { .shippingContainer :global(.vtex-button) {
background-color: black; background-color: black;

View File

@ -8,19 +8,20 @@
// border-radius: 0px; // border-radius: 0px;
// } // }
.flexRowContent--btn-product {
margin: 0;
}
.flexRow--btn-product { .flexRow--btn-product {
width: 100%; width: 100%;
margin: 0 10px;
max-width: 380px;
bottom: 75px;
position: relative;
left: 155px;
:global(.vtex-button) { :global(.vtex-button) {
background-color: black; background-color: black;
border: 1px solid black; border: 1px solid black;
border-radius: 0; border-radius: 0;
height: 49px; padding: 12px;
margin: 0;
&:hover { &:hover {
background-color: rgb(36, 36, 36); background-color: rgb(36, 36, 36);
@ -31,3 +32,7 @@
font-family: "Open Sans", sans-serif; font-family: "Open Sans", sans-serif;
} }
} }
.flexRowContent--container-main {
padding: 0 40px;
}

View File

@ -44,13 +44,17 @@
} }
.inputGroup { .inputGroup {
width: 774px; display: flex;
:global(.vtex-input-prefix__group) { :global(.vtex-input-prefix__group) {
border: none; border: none;
border-bottom: 1px solid gray; border-bottom: 1px solid gray;
border-radius: 0; border-radius: 0;
} }
@media screen and (min-width: 768px) {
width: 774px;
}
:global(.vtex-styleguide-9-x-input) { :global(.vtex-styleguide-9-x-input) {
background-color: black; background-color: black;
} }
@ -127,7 +131,7 @@
.shippingContainer { .shippingContainer {
display: flex; display: flex;
position: relative; position: relative;
bottom: 76px;
:global(.vtex-button) { :global(.vtex-button) {
background-color: black; background-color: black;
width: 70px; width: 70px;