/** * 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 customer group already exist error message is displayed after customer group save. * * @param CustomerGroupNew $customerGroupNew * @return void */ public function processAssert(CustomerGroupNew $customerGroupNew) { \PHPUnit_Framework_Assert::assertEquals(self::ERROR_MESSAGE, $customerGroupNew->getMessagesBlock()->getErrorMessages()); }