/**
  * Runs delete product Rating entity test
  *
  * @param Rating $productRating
  * @return void
  */
 public function testDeleteProductRatingEntity(Rating $productRating)
 {
     // Preconditions
     $productRating->persist();
     // Steps
     $this->ratingIndex->open();
     $this->ratingIndex->getRatingGrid()->searchAndOpen(['rating_code' => $productRating->getRatingCode()]);
     $this->ratingEdit->getPageActions()->delete();
 }
 /**
  * Clear data after test
  *
  * @return void
  */
 public function tearDown()
 {
     $filter = ['rating_code' => $this->productRating->getRatingCode()];
     $this->ratingIndex->open();
     $this->ratingIndex->getRatingGrid()->searchAndOpen($filter);
     $this->ratingEdit->getPageActions()->delete();
 }
 /**
  * Clear data after test
  *
  * @return void
  */
 public function tearDown()
 {
     $this->ratingIndex->open();
     if ($this->review instanceof Review) {
         foreach ($this->review->getRatings() as $rating) {
             $this->ratingIndex->getRatingGrid()->searchAndOpen(['rating_code' => $rating['title']]);
             $this->ratingEdit->getPageActions()->delete();
         }
     }
 }
 /**
  * Clear data after test
  *
  * @return void
  */
 public function tearDown()
 {
     $this->ratingIndex->open();
     $ratingGrid = $this->ratingIndex->getRatingGrid();
     $pageActions = $this->ratingEdit->getPageActions();
     foreach ($this->review->getRatings() as $rating) {
         $ratingGrid->searchAndOpen(['rating_code' => $rating['title']]);
         $pageActions->delete();
     }
 }
 /**
  * Clear data after test.
  *
  * @return void
  */
 public function tearDown()
 {
     if (!$this->productRating instanceof Rating) {
         return;
     }
     $filter = ['rating_code' => $this->productRating->getRatingCode()];
     $this->ratingIndex->open();
     $this->ratingIndex->getRatingGrid()->searchAndOpen($filter);
     $this->ratingEdit->getPageActions()->delete();
     $this->ratingEdit->getModalBlock()->acceptAlert();
 }
 /**
  * Clear data after test
  *
  * @return void
  */
 public function tearDown()
 {
     if (!$this->reviewInitial instanceof ReviewInjectable) {
         return;
     }
     $this->ratingIndex->open();
     foreach ($this->reviewInitial->getRatings() as $rating) {
         $this->ratingIndex->getRatingGrid()->searchAndOpen(['rating_code' => $rating['title']]);
         $this->ratingEdit->getPageActions()->delete();
     }
 }
 /**
  * Clear data after test.
  *
  * @return void
  */
 public function tearDown()
 {
     if ($this->review instanceof Review) {
         $ratings = $this->review->getRatings();
         if (empty($ratings)) {
             return;
         }
         $this->ratingIndex->open();
         foreach ($ratings as $rating) {
             $this->ratingIndex->getRatingGrid()->searchAndOpen(['rating_code' => $rating['title']]);
             $this->ratingEdit->getPageActions()->delete();
             $this->ratingEdit->getModalBlock()->acceptAlert();
         }
     }
 }