Merge pull request 'feature/testId' (#16) from feature/testId into development

Reviewed-on: #16
This commit is contained in:
Emmanuel Vitor Pereira de Jesus 2023-02-09 02:28:48 +00:00
commit 55207b3546
8 changed files with 113 additions and 29 deletions

View File

@ -107,3 +107,5 @@ max-width:314.4px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
[class*="html--m3-add-to-cart-button "]{
width: 100%; }

View File

@ -30,6 +30,7 @@ font-style: normal;
font-weight: 700; font-weight: 700;
font-size: 18px; font-size: 18px;
line-height: 25px; line-height: 25px;
margin: 0;
/* identical to box height */ /* identical to box height */
@ -41,6 +42,7 @@ font-style: normal;
font-weight: 300; font-weight: 300;
font-size: 13px; font-size: 13px;
line-height: 18px; line-height: 18px;
margin: 0;
/* identical to box height */ /* identical to box height */

View File

@ -37,8 +37,8 @@ const Pix = () => {
<img src={pixImg} alt="Imagem de pix" className={handles.handles.pixImage} /> <img src={pixImg} alt="Imagem de pix" className={handles.handles.pixImage} />
</div> </div>
<div className={handles.handles.pixResult}> <div className={handles.handles.pixResult}>
<span className={handles.handles.pixResultValue}> R$ {strResult}</span> <p className={handles.handles.pixResultValue}> R$ {strResult}</p>
<span className={handles.handles.pixResultPercent}>10 % de desconto</span> <p className={handles.handles.pixResultPercent}>10 % de desconto</p>
</div> </div>
</div > </div >
); );

View File

@ -4,10 +4,7 @@
"blockClass": "m3-shelf-retaletd" "blockClass": "m3-shelf-retaletd"
}, },
"blocks": ["product-summary.shelf#m3-shelf-retaletd-content"], "blocks": ["product-summary.shelf#m3-shelf-retaletd-content"],
"children": [ "children": ["rich-text#m3-shelf-related-title", "html#slider-layout"]
"rich-text#m3-shelf-related-title",
"slider-layout#m3-carousel-products"
]
}, },
"product-summary.shelf#m3-shelf-retaletd-content": { "product-summary.shelf#m3-shelf-retaletd-content": {
"props": { "props": {
@ -33,6 +30,12 @@
"message": "de {listPriceValue} por" "message": "de {listPriceValue} por"
} }
}, },
"html#slider-layout": {
"props": {
"testId": "product-summary-list"
},
"children": ["slider-layout#m3-carousel-products"]
},
"slider-layout#m3-carousel-products": { "slider-layout#m3-carousel-products": {
"props": { "props": {
"blockClass": "m3-carousel-products", "blockClass": "m3-carousel-products",

View File

@ -3,7 +3,7 @@
"children": [ "children": [
"html#breadcrumb", "html#breadcrumb",
"condition-layout.product#availability", "condition-layout.product#availability",
"tab-layout#tab-product", "html#tab-layout",
"list-context.product-list#m3-shelf-retaletd", "list-context.product-list#m3-shelf-retaletd",
"newsletter#m3-newsletter", "newsletter#m3-newsletter",
"product-questions-and-answers" "product-questions-and-answers"
@ -55,7 +55,7 @@
"blockClass": "product" "blockClass": "product"
}, },
"children": [ "children": [
"flex-layout.row#product-image", "html#product-images",
"product-bookmark", "product-bookmark",
"product-specification-badges" "product-specification-badges"
] ]
@ -76,6 +76,12 @@
"rowGap": 0 "rowGap": 0
} }
}, },
"html#product-images": {
"props": {
"testId": "product-images"
},
"children": ["flex-layout.row#product-image"]
},
"flex-layout.row#product-image": { "flex-layout.row#product-image": {
"children": ["product-images"] "children": ["product-images"]
}, },
@ -100,14 +106,13 @@
"rowGap": 0 "rowGap": 0
}, },
"children": [ "children": [
"flex-layout.row#product-name", "html#product-name",
"product-identifier.product", "html#product-identifier.product",
"product-rating-summary", "product-rating-summary",
"flex-layout.row#selling-price", "html#selling-price",
"product-installments#parcelas", "html#product-installments",
"m3-pix", "html#m3-pix",
"sku-selector", "html#sku-selector",
"product-assembly-options",
"product-gifts", "product-gifts",
"html#buy-button", "html#buy-button",
"availability-subscriber", "availability-subscriber",
@ -115,6 +120,26 @@
] ]
}, },
"html#product-identifier.product": {
"props": { "testId": "product-code" },
"children": ["product-identifier.product"]
},
"html#selling-price": {
"props": { "testId": "product-price" },
"children": ["flex-layout.row#selling-price"]
},
"html#m3-pix": {
"props": {
"testId": "pix-price"
},
"children": ["m3-pix"]
},
"html#product-installments": {
"props": {
"testId": "product-installments"
},
"children": ["product-installments#parcelas"]
},
"product-installments#parcelas": { "product-installments#parcelas": {
"props": { "props": {
"blockClass": "desconto", "blockClass": "desconto",
@ -123,13 +148,24 @@
"message": "{installmentsNumber} <x>x</x> de {installmentValue} sem juros" "message": "{installmentsNumber} <x>x</x> de {installmentValue} sem juros"
} }
}, },
"html#product-name": {
"props": {
"testId": "product-name"
},
"children": ["flex-layout.row#product-name"]
},
"flex-layout.row#product-name": { "flex-layout.row#product-name": {
"props": { "props": {
"marginBottom": 3 "marginBottom": 3
}, },
"children": ["vtex.store-components:product-name"] "children": ["vtex.store-components:product-name"]
}, },
"html#sku-selector": {
"props": {
"testId": "sku-selector"
},
"children": ["sku-selector"]
},
"sku-selector": { "sku-selector": {
"props": { "props": {
"variationsSpacing": 3, "variationsSpacing": 3,
@ -143,12 +179,19 @@
"marginBottom": 7, "marginBottom": 7,
"paddingRight": 0 "paddingRight": 0
}, },
"children": ["html#sizeQuantity", "add-to-cart-button"] "children": ["html#product-quantity", "html#add-to-cart-button"]
}, },
"html#sizeQuantity": { "html#add-to-cart-button": {
"props": {
"blockClass": "m3-add-to-cart-button",
"testId": "add-to-cart-button"
},
"children": ["add-to-cart-button"]
},
"html#product-quantity": {
"props": { "props": {
"blockClass": "quantity", "blockClass": "quantity",
"testid": "product-quantity" "testId": "product-quantity"
}, },
"children": ["product-quantity#size"] "children": ["product-quantity#size"]
}, },
@ -182,17 +225,12 @@
}, },
"children": [ "children": [
"flex-layout.row#product-name", "flex-layout.row#product-name",
"product-identifier.product", "html#product-identifier.product",
"flex-layout.row#availability", "flex-layout.row#availability",
"sku-selector" "sku-selector"
] ]
}, },
// "flex-layout.row#identifieAndName": {
// "props": {
// "blockClass": "identifieAndName"
// },
// "children": ["flex-layout.row#product-name", "product-identifier.product"]
// },
"flex-layout.row#availability": { "flex-layout.row#availability": {
"props": { "props": {
"blockClass": "message-availability" "blockClass": "message-availability"
@ -203,7 +241,7 @@
"props": { "props": {
"blockClass": "m3-shipping-simulator" "blockClass": "m3-shipping-simulator"
}, },
"children": ["rich-text", "shipping-simulator"] "children": ["rich-text", "html#shipping-simulator"]
}, },
"rich-text": { "rich-text": {
"props": { "props": {
@ -212,6 +250,12 @@
"text": "Calcular o frete" "text": "Calcular o frete"
} }
}, },
"html#shipping-simulator": {
"props": {
"testId": "shipping-simulator"
},
"children": ["shipping-simulator"]
},
"share#default": { "share#default": {
"props": { "props": {

View File

@ -1,4 +1,11 @@
{ {
"html#tab-layout": {
"props": {
"testId": "product-description"
},
"children": ["tab-layout#tab-product"]
},
"tab-layout#tab-product": { "tab-layout#tab-product": {
"children": ["tab-list#tab-product", "tab-content#tab-product"], "children": ["tab-list#tab-product", "tab-content#tab-product"],
"props": { "props": {
@ -101,6 +108,7 @@
}, },
"children": ["product-images#imageDescription", "product-description"] "children": ["product-images#imageDescription", "product-description"]
}, },
"product-description": { "product-description": {
"props": { "props": {
"collapseContent": false "collapseContent": false

View File

@ -133,8 +133,9 @@
.shippingContainer :global(.vtex-address-form__postalCode) { .shippingContainer :global(.vtex-address-form__postalCode) {
display: flex; display: flex;
} }
@media (max-width: 1024px) { @media (max-width: 768px) {
.shippingContainer :global(.vtex-address-form__postalCode) { .shippingContainer :global(.vtex-address-form__postalCode) {
width: 100%;
flex-direction: column; flex-direction: column;
} }
} }
@ -158,6 +159,14 @@
position: initial; position: initial;
} }
} }
@media (max-width: 768px) {
.shippingContainer :global(.vtex-address-form__postalCode) :global(.vtex-address-form__postalCode-forgottenURL) {
position: absolute;
right: 0;
bottom: 0;
left: auto;
}
}
.shippingContainer :global(.vtex-address-form__postalCode) :global(.vtex-address-form__postalCode-forgottenURL) :global(.vtex__icon-external-link) { .shippingContainer :global(.vtex-address-form__postalCode) :global(.vtex-address-form__postalCode-forgottenURL) :global(.vtex__icon-external-link) {
display: none; display: none;
} }
@ -170,6 +179,11 @@
max-width: 231px; max-width: 231px;
height: 49px; height: 49px;
} }
@media (max-width: 768px) {
.shippingContainer :global(.vtex-input-prefix__group) {
max-width: none;
}
}
.shippingContainer :global(.vtex-input-prefix__group) :global(.vtex-address-form-4-x-input), .shippingContainer :global(.vtex-input-prefix__group) :global(.vtex-address-form-4-x-input),
.shippingContainer :global(.vtex-input-prefix__group) :global(.vtex-address-form-4-x-input)::placeholder { .shippingContainer :global(.vtex-input-prefix__group) :global(.vtex-address-form-4-x-input)::placeholder {
font-family: "Open Sans"; font-family: "Open Sans";

View File

@ -142,7 +142,8 @@
:global(.vtex-address-form__postalCode) { :global(.vtex-address-form__postalCode) {
display: flex; display: flex;
@media (max-width:1024px) { @media (max-width:768px) {
width: 100%;
flex-direction: column; flex-direction: column;
} }
@ -166,6 +167,13 @@
position: initial; position: initial;
} }
@media (max-width:768px) {
position: absolute;
right: 0;
bottom: 0;
left: auto;
}
:global(.vtex__icon-external-link) { :global(.vtex__icon-external-link) {
display: none; display: none;
} }
@ -182,6 +190,9 @@
max-width: 231px; max-width: 231px;
height: 49px; height: 49px;
@media (max-width:768px) {
max-width: none;
}
:global(.vtex-address-form-4-x-input), :global(.vtex-address-form-4-x-input),