diff --git a/typo3/sysext/core/Tests/Acceptance/Backend/Scheduler/CreateASchedulerTaskCest.php b/typo3/sysext/core/Tests/Acceptance/Backend/Scheduler/CreateASchedulerTaskCest.php deleted file mode 100644 index 9eb2f20d820cb5da57d98ac08212d8e3a8111809..0000000000000000000000000000000000000000 --- a/typo3/sysext/core/Tests/Acceptance/Backend/Scheduler/CreateASchedulerTaskCest.php +++ /dev/null @@ -1,69 +0,0 @@ -<?php -namespace TYPO3\CMS\Core\Tests\Acceptance\Backend\Scheduler; - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -use TYPO3\CMS\Core\Tests\Acceptance\Step\Backend\Kasper; - -/** - * Acceptance test - */ -class CreateASchedulerTaskCest -{ - /** - * @param Kasper $I - */ - public function _before(Kasper $I) - { - $I->loginAsAdmin(); - } - - /** - * @param Kasper $I - */ - public function _after(Kasper $I) - { - $I->logout(); - } - - /** - * @param Kasper $I - */ - public function tryToTest(Kasper $I) - { - $I->wantTo("To create a scheduler task"); - $I->see('Scheduler', '#system_txschedulerM1'); - $I->click('Scheduler', '#system_txschedulerM1'); - - // switch to content iframe - $I->switchToIFrame('content'); - - // create a new task - $I->see('No tasks defined yet'); - $I->click("//a[contains(@title, 'Add task')]"); - $I->selectOption("form select[id=task_class]", 'System Status Update'); - $I->selectOption("form select[id=task_type]", 'Single'); - $I->fillField('#task_SystemStatusUpdateNotificationEmail', 'test@local.typo3.org'); - $I->click("div.module button.dropdown-toggle"); - $I->click("//a[contains(@data-value,'saveclose')]"); - $I->waitForText('The task was added successfully.'); - - // run the task - $I->click("//a[contains(@title, 'Run task')]"); - $I->waitForText('Executed: System Status Update'); - - // leave the iframe - $I->switchToIFrame(); - } -} diff --git a/typo3/sysext/core/Tests/Acceptance/Backend/Scheduler/TasksCest.php b/typo3/sysext/core/Tests/Acceptance/Backend/Scheduler/TasksCest.php new file mode 100644 index 0000000000000000000000000000000000000000..15990f8a73ddac49594e3a537bce3997be4e6917 --- /dev/null +++ b/typo3/sysext/core/Tests/Acceptance/Backend/Scheduler/TasksCest.php @@ -0,0 +1,93 @@ +<?php +namespace TYPO3\CMS\Core\Tests\Acceptance\Backend\Scheduler; + +/* + * This file is part of the TYPO3 CMS project. + * + * It is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License, either version 2 + * of the License, or any later version. + * + * For the full copyright and license information, please read the + * LICENSE.txt file that was distributed with this source code. + * + * The TYPO3 project - inspiring people to share! + */ + +use TYPO3\CMS\Core\Tests\Acceptance\Step\Backend\Admin; + +/** + * Scheduler task tests + */ +class TasksCest +{ + /** + * @param Admin $I + */ + public function _before(Admin $I) + { + $I->useExistingSession(); + + $I->see('Scheduler', '#system_txschedulerM1'); + $I->click('Scheduler', '#system_txschedulerM1'); + + // switch to content iframe + $I->switchToIFrame('content'); + } + + /** + * @param Admin $I + * @return Admin + */ + public function createASchedulerTask(Admin $I) + { + $I->see('No tasks defined yet'); + $I->click('//a[contains(@title, "Add task")]', '.module-docheader'); + + $I->cantSeeElement('#task_SystemStatusUpdateNotificationEmail'); + $I->selectOption('#task_class', 'System Status Update'); + $I->seeElement('#task_SystemStatusUpdateNotificationEmail'); + + $I->selectOption('#task_type', 'Single'); + + $I->fillField('#task_SystemStatusUpdateNotificationEmail', 'test@local.typo3.org'); + + $I->click('button.dropdown-toggle', '.module-docheader'); + $I->wantTo('Click "Save and close"'); + $I->click("//a[contains(@data-value,'saveclose')]"); + + $I->waitForText('The task was added successfully.'); + + return $I; + } + + /** + * @depends createASchedulerTask + * @param Admin $I + * @return Admin + */ + public function canRunTask(Admin $I) + { + // run the task + $I->click('//a[contains(@title, "Run task")]'); + $I->waitForText('Executed: System Status Update'); + + return $I; + } + + /** + * @depends createASchedulerTask + * @param Admin $I + */ + public function canDeleteTask(Admin $I) + { + // delete the task + $I->click('//a[contains(@title, "Delete")]'); + $I->switchToIFrame(); + $I->waitForElement('.t3-modal.modal'); + $I->click('.t3-modal.modal .btn.btn-warning'); + $I->switchToIFrame('content'); + $I->see('The task was successfully deleted.'); + $I->see('No tasks defined yet'); + } +}