/**
  * Create customer group.
  *
  * @param CustomerGroup $customerGroup
  * @return void
  */
 public function test(CustomerGroup $customerGroup)
 {
     // Steps
     $this->customerGroupIndex->open();
     $this->customerGroupIndex->getGridPageActions()->addNew();
     $this->customerGroupNew->getCustomerGroupForm()->fill($customerGroup);
     $this->customerGroupNew->getPageActionsBlock()->save();
 }
 /**
  * Assert that success message is displayed after customer group save.
  *
  * @param CustomerGroupIndex $customerGroupIndex
  * @return void
  */
 public function processAssert(CustomerGroupIndex $customerGroupIndex)
 {
     \PHPUnit_Framework_Assert::assertEquals(self::SUCCESS_MESSAGE, $customerGroupIndex->getMessagesBlock()->getSuccessMessages());
 }
 /**
  * Assert that customer group is present in customer groups grid.
  *
  * @param CustomerGroup $customerGroup
  * @param CustomerGroupIndex $customerGroupIndex
  * @return void
  */
 public function processAssert(CustomerGroup $customerGroup, CustomerGroupIndex $customerGroupIndex)
 {
     $customerGroupIndex->open();
     $customerGroupCode = $customerGroup->getCustomerGroupCode();
     \PHPUnit_Framework_Assert::assertTrue($customerGroupIndex->getCustomerGroupGrid()->isRowVisible(['code' => $customerGroupCode]), "Group '{$customerGroupCode}' is absent in customer groups grid.");
 }