9eb2f20d820cb5da57d98ac08212d8e3a8111809
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Tests / Acceptance / Backend / Scheduler / CreateASchedulerTaskCest.php
1 <?php
2 namespace TYPO3\CMS\Core\Tests\Acceptance\Backend\Scheduler;
3
4 /*
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16
17 use TYPO3\CMS\Core\Tests\Acceptance\Step\Backend\Kasper;
18
19 /**
20 * Acceptance test
21 */
22 class CreateASchedulerTaskCest
23 {
24 /**
25 * @param Kasper $I
26 */
27 public function _before(Kasper $I)
28 {
29 $I->loginAsAdmin();
30 }
31
32 /**
33 * @param Kasper $I
34 */
35 public function _after(Kasper $I)
36 {
37 $I->logout();
38 }
39
40 /**
41 * @param Kasper $I
42 */
43 public function tryToTest(Kasper $I)
44 {
45 $I->wantTo("To create a scheduler task");
46 $I->see('Scheduler', '#system_txschedulerM1');
47 $I->click('Scheduler', '#system_txschedulerM1');
48
49 // switch to content iframe
50 $I->switchToIFrame('content');
51
52 // create a new task
53 $I->see('No tasks defined yet');
54 $I->click("//a[contains(@title, 'Add task')]");
55 $I->selectOption("form select[id=task_class]", 'System Status Update');
56 $I->selectOption("form select[id=task_type]", 'Single');
57 $I->fillField('#task_SystemStatusUpdateNotificationEmail', 'test@local.typo3.org');
58 $I->click("div.module button.dropdown-toggle");
59 $I->click("//a[contains(@data-value,'saveclose')]");
60 $I->waitForText('The task was added successfully.');
61
62 // run the task
63 $I->click("//a[contains(@title, 'Run task')]");
64 $I->waitForText('Executed: System Status Update');
65
66 // leave the iframe
67 $I->switchToIFrame();
68 }
69 }