/** * Test creation for clear all compare products. * * @param string $products * @param ConfigData $config * @param CustomerAccountIndex $customerAccountIndex * @return void */ public function test(CustomerAccountIndex $customerAccountIndex, $products, ConfigData $config) { // Preconditions $config->persist(); $this->products = $this->createProducts($products); //Steps $this->cmsIndex->open(); $this->loginCustomer($this->customer); foreach ($this->products as $itemProduct) { $this->addProduct($itemProduct); $this->assertProductCompareSuccessAddMessage->processAssert($this->catalogProductView, $itemProduct); } $this->cmsIndex->getTopLinksBlock()->openAccount(); $this->cmsIndex->getLinksBlock()->openLink("My Account"); $customerAccountIndex->getCompareBlock()->clickClearAll(); }
/** * Set config. * * @param Store $store * @param FixtureFactory $fixtureFactory * @param ConfigData $config * @return void */ protected function setConfig(Store $store, FixtureFactory $fixtureFactory, ConfigData $config) { $configData = $config->getData(); $configData['section']['general/locale/code']['scope'] .= '/' . $store->getCode(); $fixtureFactory->createByCode('configData', ['data' => $configData['section']])->persist(); }
/** * Run CreateStoreEntity test. * * @param Store $store * @param ConfigData $config * @return void */ public function test(Store $store, ConfigData $config) { // Preconditions $this->store = $store; $config->persist(); $this->adminLogout->open(); // Steps $this->storeIndex->open(); $this->storeIndex->getGridPageActions()->addStoreView(); $this->storeNew->getStoreForm()->fill($store); $this->storeNew->getFormPageActions()->save(); }