9 use Magento\Catalog\Test\Page\Product\CatalogProductView;
12 use Magento\Review\Test\Page\Adminhtml\RatingEdit;
13 use Magento\Review\Test\Page\Adminhtml\RatingIndex;
14 use Magento\Mtf\Client\BrowserInterface;
15 use Magento\Mtf\TestCase\Injectable;
37 const TEST_TYPE =
'acceptance_test, extended_acceptance_test';
96 BrowserInterface $browser,
103 $product =
$review->getDataFieldConfig(
'entity_id')[
'source']->getEntity();
104 $browser->open($_ENV[
'app_frontend_url'] .
$product->getUrlKey() .
'.html');
105 $assertProductReviewIsAbsentOnProductPage->
processAssert($this->catalogProductView);
106 $this->catalogProductView->getReviewSummary()->clickAddReviewLink();
107 $reviewForm = $this->catalogProductView->getReviewFormBlock();
109 $reviewForm->submit();
121 if ($this->review instanceof Review) {
122 $ratings = $this->review->getRatings();
123 if (empty($ratings)) {
126 $this->ratingIndex->open();
127 foreach ($ratings as
$rating) {
128 $this->ratingIndex->getRatingGrid()->searchAndOpen([
'rating_code' =>
$rating[
'title']]);
129 $this->ratingEdit->getPageActions()->delete();
130 $this->ratingEdit->getModalBlock()->acceptAlert();
test(Review $review, BrowserInterface $browser, AssertProductReviewIsAbsentOnProductPage $assertProductReviewIsAbsentOnProductPage)
__inject(CatalogProductView $catalogProductView, RatingIndex $ratingIndex, RatingEdit $ratingEdit)
processAssert(CatalogProductView $catalogProductView)