[TASK] Provide AcceptanceTest for stand alone install tool
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Tests / Acceptance / InstallTool / MaintenanceCest.php
1 <?php
2 declare(strict_types = 1);
3 namespace TYPO3\CMS\Core\Tests\Acceptance\InstallTool;
4
5 /*
6 * This file is part of the TYPO3 CMS project.
7 *
8 * It is free software; you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License, either version 2
10 * of the License, or any later version.
11 *
12 * For the full copyright and license information, please read the
13 * LICENSE.txt file that was distributed with this source code.
14 *
15 * The TYPO3 project - inspiring people to share!
16 */
17
18 use TYPO3\CMS\Core\Tests\Acceptance\Support\BackendTester;
19
20 class MaintenanceCest extends AbstractCest
21 {
22 public function _before(BackendTester $I)
23 {
24 parent::_before($I);
25 $this->logIntoInstallTool($I);
26 $I->click('Maintenance');
27 $I->see('Maintenance', 'h1');
28 }
29 public function flushCacheWorks(BackendTester $I)
30 {
31 $I->click('Flush cache');
32 $I->waitForElementVisible('.alert-success');
33 $I->see('Caches cleared', '.alert-success h4');
34 }
35
36 public function analyzeDatabaseStructureWorks(BackendTester $I)
37 {
38 $I->click('Analyze database');
39 $I->waitForElementVisible('.modal-dialog');
40 $I->see('Analyze Database Structure', '.modal-dialog h4');
41 $I->waitForElementVisible('.callout-success');
42 $I->see('Database schema is up to date. Good job!', '.callout-success h4');
43 $I->click('.t3js-modal-close');
44 $I->waitForElementNotVisible('.modal-dialog');
45 }
46
47 public function removeTemporaryAssetsWorks(BackendTester $I)
48 {
49 $I->click('Scan temporary files');
50 $I->waitForElementVisible('.modal-dialog');
51 $I->see('Remove Temporary Assets', '.modal-dialog h4');
52 $I->click('.t3js-modal-close');
53 $I->waitForElementNotVisible('.modal-dialog');
54 }
55
56 public function dumpAutoloadWorks(BackendTester $I)
57 {
58 $I->click('Dump autoload');
59 $I->waitForElementVisible('.alert-success');
60 $I->see('Successfully dumped class loading information for extensions.', '.alert-success h4');
61 }
62
63 public function clearPersistentTablesWorks(BackendTester $I)
64 {
65 $I->click('Scan tables');
66 $I->waitForElementVisible('.modal-dialog');
67 $I->see('Clear Persistent Database Tables', '.modal-dialog h4');
68 $I->click('.t3js-modal-close');
69 $I->waitForElementNotVisible('.modal-dialog');
70 }
71
72 public function createAdminUserWorks(BackendTester $I)
73 {
74 $I->click('Create Administrator');
75 $I->waitForElementVisible('.modal-dialog');
76 $I->see('Create Administrative User', '.modal-dialog h4');
77 $I->click('.t3js-modal-close');
78 $I->waitForElementNotVisible('.modal-dialog');
79 }
80
81 public function resetBackendUserPreferencesWorks(BackendTester $I)
82 {
83 $I->click('Reset backend user preferences');
84 $I->waitForElementVisible('.alert-success');
85 $I->see('Preferences of all backend users have been reset', '.alert-success h4');
86 }
87
88 public function manageLanguagePacksWorks(BackendTester $I)
89 {
90 $I->click('Manage languages');
91 $I->waitForElementVisible('.modal-dialog');
92 $I->see('Manage Language Packs', '.modal-dialog h4');
93 $I->see('Active Languages', '.modal-dialog h3');
94 $I->click('.t3js-modal-close');
95 $I->waitForElementNotVisible('.modal-dialog');
96 }
97 }