/** * Delete store. * * @return void */ public function tearDown() { if (!$this->cms instanceof CmsPage) { return; } $stores = $this->cms->getStoreId(); if ($stores) { $stores = $this->cms->getDataFieldConfig('store_id')['source']->getStore(); foreach ($stores as $store) { $this->storeIndex->open(); $this->storeIndex->getStoreGrid()->openStore($store); $this->editStore->getFormPageActions()->delete(); $this->deleteStore->getFormPageActions()->delete(); } } }