File tree Expand file tree Collapse file tree 2 files changed +18
-10
lines changed
view/frontend/templates/helper Expand file tree Collapse file tree 2 files changed +18
-10
lines changed Original file line number Diff line number Diff line change 89
89
</actionGroup >
90
90
<waitForPageLoad stepKey =" waitForPageToLoad" />
91
91
<!-- check if the div#customer-reviews element -->
92
- <!-- <scrollTo selector="div#customer-reviews" stepKey="scrollToElement"/>-->
93
- <!-- <dontSeeElement selector="div#product-review-container > div#customer-reviews" stepKey="customerReviewDivIsNotLoaded"/>-->
92
+ <dontSeeElementInDOM selector =" div#product-review-container > div#customer-review" stepKey =" customerReviewDivIsNotLoaded" />
94
93
<!-- Click on reviews and add reviews with current user -->
95
94
<click selector =" {{StorefrontProductReviewsSection.reviewsTab}}" stepKey =" openReviewTab2" />
96
95
<!-- Verify products reviews div#product-review-container > div#customer-reviews is loaded after click-->
97
96
<actionGroup ref =" AssertStorefrontSeeElementActionGroup" stepKey =" seeCustomerReviewsDivIsLoaded" >
98
97
<argument name =" selector" value =" div#product-review-container > div#customer-reviews" />
99
98
</actionGroup >
99
+
100
+ <!-- Navigate to PLP and check product rating for list and table views -->
101
+ <actionGroup ref =" StorefrontOpenHomePageActionGroup" stepKey =" amOnStoreViewHomePage2" />
102
+ <actionGroup ref =" StoreFrontQuickSearchActionGroup" stepKey =" searchBySku2" >
103
+ <argument name =" query" value =" $$createProduct1.sku$$" />
104
+ </actionGroup >
105
+ <!-- Click on the review button for product -->
106
+ <click selector =" .action.view" stepKey =" clickOnProductReviewsLink" />
107
+ <waitForPageLoad stepKey =" waitForPageToLoad2" />
108
+ <!-- Verify products reviews div#product-review-container > div#customer-reviews is loaded if reviews are open directly-->
109
+ <actionGroup ref =" AssertStorefrontSeeElementActionGroup" stepKey =" seeCustomerReviewsDivIsLoaded2" >
110
+ <argument name =" selector" value =" div#product-review-container > div#customer-reviews" />
111
+ </actionGroup >
100
112
</test >
101
113
</tests >
Original file line number Diff line number Diff line change @@ -19,10 +19,7 @@ $urlForm = $block->getReviewsUrl() . '#review-form';
19
19
<?php if ($ rating ):?>
20
20
<div class="rating-summary">
21
21
<span class="label"><span><?= $ block ->escapeHtml (__ ('Rating ' )) ?> :</span></span>
22
- <div class="rating-result"
23
- id="rating-result_<?= /* @noEscape */ $ block ->getProduct ()->getId () ?> "
24
- title="<?= $ block ->escapeHtmlAttr ($ rating ) ?> %"
25
- >
22
+ <div class="rating-result" title="<?= $ block ->escapeHtmlAttr ($ rating ); ?> %">
26
23
<span>
27
24
<span>
28
25
<span itemprop="ratingValue"><?= $ block ->escapeHtml ($ rating ); ?>
@@ -31,10 +28,9 @@ $urlForm = $block->getReviewsUrl() . '#review-form';
31
28
</span>
32
29
</div>
33
30
</div>
34
- <?= /* @noEscape */
35
- $ secureRenderer ->renderStyleAsTag (
36
- 'width: ' . $ block ->escapeHtmlAttr ($ rating ) . '% ' ,
37
- '#rating-result_ ' . $ block ->getProduct ()->getId () . ' span '
31
+ <?= /* @noEscape */ $ secureRenderer ->renderStyleAsTag (
32
+ "width: " . $ block ->escapeHtmlAttr ($ rating ) . "% " ,
33
+ 'div.rating-summary div.rating-result>span:first-child '
38
34
) ?>
39
35
<?php endif ;?>
40
36
<div class="reviews-actions">
You can’t perform that action at this time.
0 commit comments