/** * @depends createASchedulerTask * @param Admin $I * @param ModalDialog $modalDialog */ public function canDeleteTask(Admin $I, ModalDialog $modalDialog) { $I->wantTo('See a delete button for a task'); $I->seeElement('//a[contains(@title, "Delete")]'); $I->click('//a[contains(@title, "Delete")]'); $I->wantTo('Cancel the delete dialog'); $modalDialog->clickButtonInDialog('Cancel'); $I->switchToIFrame('content'); $I->wantTo('Still see and can click the Delete button as the deletion has been canceled'); $I->click('//a[contains(@title, "Delete")]'); $modalDialog->clickButtonInDialog('OK'); $I->switchToIFrame('content'); $I->see('The task was successfully deleted.'); $I->see('No tasks defined yet'); }
/** * @param Admin $I * @depends checkThatAddingABookmarkAddsItemToTheBookmarkList */ public function checkIfDeleteBookmarkWorks(Admin $I, ModalDialog $dialog) { $this->clickBookmarkDropdownToggleInTopbar($I); $I->canSee('Scheduled tasks renamed', self::$topBarModuleSelector); $I->click('.shortcut-delete', self::$topBarModuleSelector . ' .shortcut'); $dialog->clickButtonInDialog('OK'); $I->cantSee('Scheduled tasks renamed', self::$topBarModuleSelector); }