/** * Delete Widget Entity test. * * @param Widget $widget * @return void */ public function test(Widget $widget) { // Precondition $widget->persist(); // Steps $filter = ['title' => $widget->getTitle()]; $this->widgetInstanceIndex->open(); $this->widgetInstanceIndex->getWidgetGrid()->searchAndOpen($filter); $this->widgetInstanceEdit->getPageActionsBlock()->delete(); }
/** * Delete Widget on backend * * @return array */ public function run() { $this->widgetInstanceIndex->open(); $this->widgetInstanceIndex->getWidgetGrid()->resetFilter(); while ($this->widgetInstanceIndex->getWidgetGrid()->isFirstRowVisible()) { $this->widgetInstanceIndex->getWidgetGrid()->openFirstRow(); $this->widgetInstanceEdit->getTemplateBlock()->waitLoader(); $this->widgetInstanceEdit->getPageActionsBlock()->delete(); $this->widgetInstanceIndex->getSystemMessageDialog()->closePopup(); } }