/** * Assert that New Store Group visible on StoreView Form in Store dropdown. * * @param StoreIndex $storeIndex * @param StoreNew $storeNew * @param StoreGroup $storeGroup * @return void */ public function processAssert(StoreIndex $storeIndex, StoreNew $storeNew, StoreGroup $storeGroup) { $storeIndex->open(); $storeGroupName = $storeGroup->getName(); $storeIndex->getGridPageActions()->addStoreView(); \PHPUnit_Framework_Assert::assertTrue($storeNew->getStoreForm()->isStoreVisible($storeGroupName), "Store Group '{$storeGroupName}' is not present on StoreView Form in Store dropdown."); }
/** * Run CreateStoreEntity test. * * @param Store $store * @param ConfigData $config * @return void */ public function test(Store $store, ConfigData $config) { // Preconditions $this->store = $store; $config->persist(); // Steps $this->storeIndex->open(); $this->storeIndex->getGridPageActions()->addStoreView(); $this->storeNew->getStoreForm()->fill($store); $this->storeNew->getFormPageActions()->save(); }
/** * Assert that displayed Store View data on edit page equals passed from fixture. * * @param StoreIndex $storeIndex * @param StoreNew $storeNew * @param Store $store * @return void */ public function processAssert(StoreIndex $storeIndex, StoreNew $storeNew, Store $store) { $storeIndex->open()->getStoreGrid()->openStore($store); $errors = $this->verifyData($store->getData(), $storeNew->getStoreForm()->getData()); \PHPUnit_Framework_Assert::assertEmpty($errors, $errors); }