/** * Assert that displayed Store Group data on edit page equals passed from fixture * * @param StoreIndex $storeIndex * @param EditGroup $editGroup * @param StoreGroup $storeGroup * @param StoreGroup $storeGroupOrigin [optional] * @return void */ public function processAssert(StoreIndex $storeIndex, EditGroup $editGroup, StoreGroup $storeGroup, StoreGroup $storeGroupOrigin = null) { $fixtureData = $storeGroupOrigin != null ? array_merge($storeGroupOrigin->getData(), $storeGroup->getData()) : $storeGroup->getData(); $storeIndex->open()->getStoreGrid()->searchAndOpenStoreGroup($storeGroup); $formData = $editGroup->getEditFormGroup()->getData(); $errors = $this->verifyData($fixtureData, $formData); \PHPUnit_Framework_Assert::assertEmpty($errors, $errors); }
/** * Update New StoreGroup * * @param StoreGroup $storeGroupOrigin * @param StoreGroup $storeGroup * @return void */ public function test(StoreGroup $storeGroupOrigin, StoreGroup $storeGroup) { //Preconditions $storeGroupOrigin->persist(); //Steps $this->storeIndex->open(); $this->storeIndex->getStoreGrid()->searchAndOpenStoreGroup($storeGroupOrigin); $this->editGroup->getEditFormGroup()->fill($storeGroup); $this->editGroup->getFormPageActions()->save(); }
/** * Delete StoreGroup * * @param StoreGroup $storeGroup * @param string $createBackup * @return void */ public function test(StoreGroup $storeGroup, $createBackup) { //Preconditions $storeGroup->persist(); $this->backupIndex->open()->getBackupGrid()->massaction([], 'Delete', true, 'Select All'); //Steps $this->storeIndex->open(); $this->storeIndex->getStoreGrid()->searchAndOpenStoreGroup($storeGroup); $this->editGroup->getFormPageActions()->delete(); $this->deleteGroup->getDeleteGroupForm()->fillForm(['create_backup' => $createBackup]); $this->deleteGroup->getFormPageFooterActions()->delete(); }