/** * Update Custom System Variable Entity test. * * @param FixtureFactory $fixtureFactory * @param SystemVariable $customVariable * @param SystemVariable $customVariableOrigin * @param string $saveAction * @return array */ public function test(FixtureFactory $fixtureFactory, SystemVariable $customVariable, SystemVariable $customVariableOrigin, $saveAction) { $this->store = $fixtureFactory->createByCode('store', ['dataset' => 'custom']); $this->store->persist(); $customVariableOrigin->persist(); $filter = ['code' => $customVariableOrigin->getCode()]; // Steps $this->systemVariableIndexPage->open(); $this->systemVariableIndexPage->getSystemVariableGrid()->searchAndOpen($filter); $this->systemVariableNewPage->getFormPageActions()->selectStoreView($this->store->getData('name')); $this->systemVariableNewPage->getSystemVariableForm()->fill($customVariable); $this->systemVariableNewPage->getFormPageActions()->{$saveAction}(); return ['storeOrigin' => $this->store, 'customVariableOrigin' => $customVariableOrigin]; }
/** * Update Custom System Variable Entity test. * * @param SystemVariable $customVariable * @param SystemVariable $customVariableOrigin * @param Store $storeOrigin * @param string $saveAction * @return void */ public function test(SystemVariable $customVariable, SystemVariable $customVariableOrigin, Store $storeOrigin, $saveAction) { $filter = ['code' => $customVariableOrigin->getCode()]; // Steps $this->systemVariableIndexPage->open(); $this->systemVariableIndexPage->getSystemVariableGrid()->searchAndOpen($filter); $this->systemVariableNewPage->getFormPageActions()->selectStoreView($storeOrigin->getData('name')); $this->systemVariableNewPage->getSystemVariableForm()->fill($customVariable); $this->systemVariableNewPage->getFormPageActions()->{$saveAction}(); }