Skip to content

Commit c0c05ba

Browse files
committed
ACP2E-111: Inconsistent product rating on category page
1 parent 505c675 commit c0c05ba

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

app/code/Magento/Review/Test/Mftf/Section/StorefrontMyProductReviewsSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,7 @@
1111
<section name="StorefrontMyProductReviewsSection">
1212
<element name="reviewDescription" type="text" selector="//td[@data-th='Review']"/>
1313
<element name="reviewRating" type="text" selector="//tbody/tr[position()='{{reviewNumber}}']/td/div/div/span[contains(@style,'width: {{reviewValue}};')]" parameterized="true"/>
14+
<element name="reviewFirstRowSeeDetails" type="text" selector="#my-reviews-table > tbody > tr:nth-child(1) > td.col.actions > a" />
15+
<element name="reviewSecondRowSeeDetails" type="text" selector="#my-reviews-table > tbody > tr:nth-child(2) > td.col.actions > a" />
1416
</section>
1517
</sections>

app/code/Magento/Review/Test/Mftf/Test/StorefrontVerifyMultipleInconsistentProductRatingsOnCategoryPageTest.xml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,30 @@
140140
<actualResult type="string">$getFirstProductResultStarsUnderProductName</actualResult>
141141
<expectedResult type="string">width: 80%;</expectedResult>
142142
</assertEquals>
143-
<click selector=".action.more" stepKey="amOnProductReviewDetailsPage"/>
144143
<!-- Check stars at rating result under the product name -->
145144
<grabAttributeFrom selector="#rating-result_$$createProduct2.id$$ span" userInput="style" stepKey="getSecondProductResultStarsUnderProductName"/>
146145
<assertEquals stepKey="checkSecondProductResultStarsUnderProductName">
147146
<actualResult type="string">$getSecondProductResultStarsUnderProductName</actualResult>
148147
<expectedResult type="string">width: 20%;</expectedResult>
149148
</assertEquals>
149+
<!--Click on See Details button of two reviews -->
150+
<!-- Navigate to user account and check product ratings-->
151+
<amOnPage url="review/customer/" stepKey="amOnCustomerReviewPage2"/>
152+
<!--Click on Second Product review -->
153+
<click selector="{{StorefrontMyProductReviewsSection.reviewFirstRowSeeDetails}}" stepKey="clickFirstReviewRow"/>
154+
<grabAttributeFrom selector="#rating-result_$$createProduct2.id$$ span" userInput="style" stepKey="getSecondProductResultStarsUnderProductName1"/>
155+
<assertEquals stepKey="checkSecondProductResultStarsUnderProductName1">
156+
<actualResult type="string">$getSecondProductResultStarsUnderProductName1</actualResult>
157+
<expectedResult type="string">width: 20%;</expectedResult>
158+
</assertEquals>
159+
<!-- Navigate to user account and check product ratings-->
160+
<amOnPage url="review/customer/" stepKey="amOnCustomerReviewPage3"/>
161+
<!--Click on first product review -->
162+
<click selector="{{StorefrontMyProductReviewsSection.reviewSecondRowSeeDetails}}" stepKey="clickSecondReviewRow"/>
163+
<grabAttributeFrom selector="#rating-result_$$createProduct1.id$$ span" userInput="style" stepKey="getFirstProductResultStarsUnderProductName2"/>
164+
<assertEquals stepKey="checkFirstProductResultStarsUnderProductName2">
165+
<actualResult type="string">$getFirstProductResultStarsUnderProductName2</actualResult>
166+
<expectedResult type="string">width: 80%;</expectedResult>
167+
</assertEquals>
150168
</test>
151169
</tests>

0 commit comments

Comments
 (0)