[TASK] Provide AcceptanceTest for stand alone install tool
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Tests / Acceptance / InstallTool / LoginCest.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 LoginCest extends AbstractCest
21 {
22 public function installToolLogin(BackendTester $I)
23 {
24 $I->amGoingTo('assert the install tool is locked in the first place');
25 $I->see('The Install Tool is locked');
26 $I->assertFileNotExists(self::ENABLE_INSTALL_TOOL_FILEPATH);
27
28 $I->amGoingTo('lock the tool without logging in');
29 $I->writeToFile(self::ENABLE_INSTALL_TOOL_FILEPATH, '');
30 $I->seeFileFound(self::ENABLE_INSTALL_TOOL_FILEPATH);
31 $I->reloadPage();
32 $I->see('Login to TYPO3 Install Tool');
33 $I->click('Lock Install Tool again');
34 $I->see('The Install Tool is locked');
35 $I->dontSeeFileFound(self::ENABLE_INSTALL_TOOL_FILEPATH);
36
37 $I->amGoingTo('log into Install Tool');
38 $this->logIntoInstallTool($I);
39
40 $I->amGoingTo('assert page Maintenance contains the 8 expected cards');
41 $I->click('Maintenance');
42 $I->see('Maintenance', 'h1');
43 $I->see('Flush TYPO3 and PHP Cache', 'h1.card-title');
44 $I->see('Analyze Database Structure', 'h1.card-title');
45 $I->see('Remove Temporary Assets', 'h1.card-title');
46 $I->see('Rebuild PHP Autoload Information', 'h1.card-title');
47 $I->see('Clear Persistent Database Tables', 'h1.card-title');
48 $I->see('Create Administrative User', 'h1.card-title');
49 $I->see('Reset Backend User Preferences', 'h1.card-title');
50 $I->see('Manage Language Packs', 'h1.card-title');
51 $I->seeNumberOfElements('.card', 8);
52
53 $I->amGoingTo('assert page Settings contains the 6 expected cards');
54 $I->click('Settings');
55 $I->see('Settings', 'h1');
56 $I->see('Extension Configuration', 'h1.card-title');
57 $I->see('Change Install Tool Password', 'h1.card-title');
58 $I->see('Manage System Maintainers', 'h1.card-title');
59 $I->see('Configuration Presets', 'h1.card-title');
60 $I->see('Feature Toggles', 'h1.card-title');
61 $I->see('Configure Installation-Wide Options', 'h1.card-title');
62 $I->seeNumberOfElements('.card', 6);
63
64 $I->amGoingTo('assert page Upgrade contains the 7 expected cards');
65 $I->click('Upgrade');
66 $I->see('Upgrade', 'h1');
67 $I->see('Update TYPO3 Core', 'h1.card-title');
68 $I->see('Upgrade Wizard', 'h1.card-title');
69 $I->see('View Upgrade Documentation', 'h1.card-title');
70 $I->see('Check TCA in ext_tables.php', 'h1.card-title');
71 $I->see('Check for Broken Extensions', 'h1.card-title');
72 $I->see('Check TCA Migrations', 'h1.card-title');
73 $I->see('Scan Extension Files', 'h1.card-title');
74 $I->seeNumberOfElements('.card', 7);
75
76 $I->amGoingTo('assert page Environment contains the 6 expected cards');
77 $I->click('Environment');
78 $I->see('Environment', 'h1');
79 $I->see('Environment Overview', 'h1.card-title');
80 $I->see('Environment Status', 'h1.card-title');
81 $I->see('Directory Status', 'h1.card-title');
82 $I->see('PHP Info', 'h1.card-title');
83 $I->see('Test Mail Setup', 'h1.card-title');
84 $I->see('Image Processing', 'h1.card-title');
85 $I->seeNumberOfElements('.card', 6);
86 }
87 }