Skip to content

Commit

Permalink
Merge pull request #69 from shopgate/PWA-334-e2e-productpage
Browse files Browse the repository at this point in the history
PWA-334 e2e productpage
  • Loading branch information
devbucket authored May 28, 2018
2 parents a86ee7e + f9b8b5c commit b5ad528
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ exports[`<Image /> should render placeholders if src is null 1`] = `
<img
alt={null}
className="css-1trsaz6"
data-test-id="image"
role="presentation"
src="foo/bar?w=440&h=440&q=70&zc=resize&fillc=FFFFFF"
style={Object {}}
Expand Down
1 change: 1 addition & 0 deletions libraries/common/components/Image/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ class Image extends Component {
style={inlineStyles}
alt={this.props.alt}
role="presentation"
data-test-id="image"
/>
);
}
Expand Down
3 changes: 3 additions & 0 deletions libraries/ui-shared/Availability/__snapshots__/spec.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ exports[`<Availability /> should render if state is "ok" when "showWhenAvailable
>
<div
className=" css-1ixzglu"
data-test-id="availabilityText: Available"
>
Available
</div>
Expand All @@ -42,6 +43,7 @@ exports[`<Availability /> should render if state is "warning" 1`] = `
>
<div
className=" css-14jedxl"
data-test-id="availabilityText: Only 5 left"
>
Only 5 left
</div>
Expand All @@ -57,6 +59,7 @@ exports[`<Availability /> should render if state is "warning" 2`] = `
>
<div
className=" css-qsvazi"
data-test-id="availabilityText: Out of stock"
>
Out of stock
</div>
Expand Down
2 changes: 1 addition & 1 deletion libraries/ui-shared/Availability/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const Availability = ({
}

return (
<div className={`${className} ${style}`}>
<div className={`${className} ${style}`} data-test-id={`availabilityText: ${text}`}>
{text}
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ exports[`<FavoritesButton /> should only render when no favorites set 1`] = `
<button
aria-label="favorites.add"
className="css-orm6vn "
data-test-id="button"
data-test-id="favoriteButton"
onClick={[Function]}
>
<Ripple
Expand Down Expand Up @@ -116,7 +116,7 @@ exports[`<FavoritesButton /> should render when favorites set 1`] = `
<button
aria-label="favorites.remove"
className="css-orm6vn "
data-test-id="button"
data-test-id="favoriteButton"
onClick={[Function]}
>
<Ripple
Expand Down
2 changes: 1 addition & 1 deletion libraries/ui-shared/FavoritesButton/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class FavoritesButton extends Component {
aria-label={this.getLabel()}
className={`${className} ${this.props.className}`}
onClick={this.handleClick}
data-test-id="button"
data-test-id="favoriteButton"
>
<Ripple
className={`${styles.ripple} ${this.props.rippleClassName}`}
Expand Down
1 change: 1 addition & 0 deletions libraries/ui-shared/PriceInfo/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const PriceInfo = ({ className, text }) => (
<div
className={`${styles} ${className}`}
dangerouslySetInnerHTML={{ __html: text }}
data-test-id={`priceInfo: ${text}`}
/>
);

Expand Down
5 changes: 5 additions & 0 deletions libraries/ui-shared/RatingStars/__snapshots__/spec.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ exports[`<RatingStars /> renders with value of 0 1`] = `
<div
aria-label="reviews.rating_stars"
className="css-13azwyo "
data-test-id="ratedStars: 0"
>
<div
className="css-4s85e9"
Expand Down Expand Up @@ -74,6 +75,7 @@ exports[`<RatingStars /> renders with value of 50 1`] = `
<div
aria-label="reviews.rating_stars"
className="css-13azwyo "
data-test-id="ratedStars: 2.5"
>
<div
className="css-4s85e9"
Expand Down Expand Up @@ -178,6 +180,7 @@ exports[`<RatingStars /> renders with value of 100 1`] = `
<div
aria-label="reviews.rating_stars"
className="css-13azwyo "
data-test-id="ratedStars: 5"
>
<div
className="css-4s85e9"
Expand Down Expand Up @@ -304,6 +307,7 @@ exports[`<RatingStars /> should change rating on click 1`] = `
<div
aria-label="reviews.rating_stars"
className="css-13azwyo "
data-test-id="ratedStars: 5"
>
<div
className="css-4s85e9"
Expand Down Expand Up @@ -460,6 +464,7 @@ exports[`<RatingStars /> should change rating on click 2`] = `
<div
aria-label="reviews.rating_stars"
className="css-13azwyo "
data-test-id="ratedStars: 3.5"
>
<div
className="css-4s85e9"
Expand Down
2 changes: 1 addition & 1 deletion libraries/ui-shared/RatingStars/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class RatingStars extends Component {
];

return (
<div className={className} aria-label={this.getTextualFinal(ratedStars)}>
<div className={className} aria-label={this.getTextualFinal(ratedStars)} data-test-id={`ratedStars: ${ratedStars}`}>
<div className={styles.emptyStars}>
{emptyStars}
</div>
Expand Down
14 changes: 9 additions & 5 deletions libraries/ui-shared/TaxDisclaimer/__snapshots__/spec.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
exports[`<TaxDisclaimer /> should display null 1`] = `""`;

exports[`<TaxDisclaimer /> should display the component 1`] = `
<Translate
className="css-fazkyv"
params={Object {}}
string="product.tax_disclaimer"
/>
<div
data-test-id="taxDisclaimer"
>
<Translate
className="css-fazkyv"
params={Object {}}
string="product.tax_disclaimer"
/>
</div>
`;
10 changes: 6 additions & 4 deletions libraries/ui-shared/TaxDisclaimer/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ import styles from './style';
*/
const TaxDisclaimer = () => (
showTaxDisclaimer ? (
<I18n.Text
className={styles}
string="product.tax_disclaimer"
/>
<div data-test-id="taxDisclaimer">
<I18n.Text
className={styles}
string="product.tax_disclaimer"
/>
</div>
) : null
);

Expand Down
2 changes: 1 addition & 1 deletion themes/gmd
Submodule gmd updated 31 files
+2 −0 components/List/__snapshots__/spec.jsx.snap
+3 −1 components/List/components/Item/index.jsx
+1 −0 components/Picker/index.jsx
+1 −0 components/ProductImage/__snapshots__/spec.jsx.snap
+2 −2 components/ProductImage/index.jsx
+208 −174 components/Reviews/__snapshots__/spec.jsx.snap
+1 −1 components/Reviews/components/AllReviewsLink/index.jsx
+128 −116 components/Reviews/components/Header/__snapshots__/spec.jsx.snap
+1 −1 components/Reviews/components/Header/components/AverageRating/index.jsx
+62 −58 components/Reviews/components/Header/components/WriteReviewLink/__snapshots__/spec.jsx.snap
+5 −3 components/Reviews/components/Header/components/WriteReviewLink/index.jsx
+8 −0 components/Reviews/components/List/__snapshots__/spec.jsx.snap
+1 −1 components/Reviews/components/List/components/Review/index.jsx
+1 −1 components/Reviews/index.jsx
+27 −2 e2e/elements/de.js
+131 −0 e2e/integration/ProductPage.js
+1 −0 pages/Product/components/Description/__snapshots__/spec.jsx.snap
+1 −1 pages/Product/components/Description/index.jsx
+1 −1 pages/Product/components/Header/components/Manufacturer/index.jsx
+3 −1 pages/Product/components/Header/components/Name/index.jsx
+1 −0 pages/Product/components/Header/components/Rating/__snapshots__/spec.jsx.snap
+94 −88 pages/Product/components/Options/__snapshots__/spec.jsx.snap
+22 −20 pages/Product/components/Options/index.jsx
+2 −0 pages/Product/components/Properties/__snapshots__/spec.jsx.snap
+1 −1 pages/Product/components/Properties/index.jsx
+1,922 −1,863 pages/Product/components/VariantSelects/__snapshots__/spec.jsx.snap
+378 −354 pages/Product/components/VariantSelects/components/ProductVariants/__snapshots__/spec.jsx.snap
+1 −1 pages/Product/components/VariantSelects/components/VariantPickerButton/index.jsx
+20 −18 pages/Product/components/VariantSelects/index.jsx
+52 −50 pages/Product/index.jsx
+7 −0 pages/WriteReview/components/ReviewForm/__snapshots__/spec.jsx.snap
2 changes: 1 addition & 1 deletion themes/ios11
Submodule ios11 updated 31 files
+2 −0 components/List/__snapshots__/spec.jsx.snap
+3 −1 components/List/components/Item/index.jsx
+1 −0 components/Picker/index.jsx
+1 −0 components/ProductImage/__snapshots__/spec.jsx.snap
+1 −1 components/ProductImage/index.jsx
+1 −1 components/Reviews/components/AllReviewsLink/index.jsx
+128 −116 components/Reviews/components/Header/__snapshots__/spec.jsx.snap
+1 −1 components/Reviews/components/Header/components/AverageRating/index.jsx
+62 −58 components/Reviews/components/Header/components/WriteReviewLink/__snapshots__/spec.jsx.snap
+5 −3 components/Reviews/components/Header/components/WriteReviewLink/index.jsx
+8 −0 components/Reviews/components/List/__snapshots__/spec.jsx.snap
+1 −1 components/Reviews/components/List/components/Review/index.jsx
+1 −1 components/Reviews/index.jsx
+27 −2 e2e/elements/de.js
+131 −0 e2e/integration/ProductPage.js
+2 −0 pages/Product/components/AddToCartBar/__snapshots__/spec.jsx.snap
+1 −1 pages/Product/components/AddToCartBar/components/AddToCartButton/index.jsx
+1 −0 pages/Product/components/Description/__snapshots__/spec.jsx.snap
+1 −1 pages/Product/components/Description/index.jsx
+1 −1 pages/Product/components/Header/components/Manufacturer/index.jsx
+3 −1 pages/Product/components/Header/components/Name/index.jsx
+94 −88 pages/Product/components/Options/__snapshots__/spec.jsx.snap
+22 −20 pages/Product/components/Options/index.jsx
+2 −0 pages/Product/components/Properties/__snapshots__/spec.jsx.snap
+1 −1 pages/Product/components/Properties/index.jsx
+238 −224 pages/Product/components/VariantSelects/__snapshots__/spec.jsx.snap
+378 −354 pages/Product/components/VariantSelects/components/ProductVariants/__snapshots__/spec.jsx.snap
+1 −1 pages/Product/components/VariantSelects/components/VariantPickerButton/index.jsx
+20 −18 pages/Product/components/VariantSelects/index.jsx
+58 −56 pages/Product/index.jsx
+7 −0 pages/WriteReview/components/ReviewForm/__snapshots__/spec.jsx.snap

0 comments on commit b5ad528

Please sign in to comment.