5eb83e49829dcccaf8a75e1e90f5be45d90f2c37
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Tests / Acceptance / Install / Mysql / IntroductionPackageCest.php
1 <?php
2 declare(strict_types = 1);
3 namespace TYPO3\CMS\Core\Tests\Acceptance\Install\Mysql;
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 Codeception\Scenario;
19 use TYPO3\CMS\Core\Tests\Acceptance\Support\InstallTester;
20
21 /**
22 * Click through installer, go to backend, check blank site in FE works
23 */
24 class IntroductionPackageCest
25 {
26 /**
27 * @env mysql
28 * @param InstallTester $I
29 */
30 public function installTypo3OnMysql(InstallTester $I, Scenario $scenario)
31 {
32 // Calling frontend redirects to installer
33 $I->amOnPage('/');
34
35 // EnvironmentAndFolders step
36 $I->waitForText('Installing TYPO3');
37 $I->waitForText('No problems detected, continue with installation');
38 $I->click('No problems detected, continue with installation');
39
40 // DatabaseConnection step
41 $I->waitForText('Select database');
42 $I->fillField('#t3-install-step-mysqliManualConfiguration-username', $scenario->current('typo3InstallMysqlDatabaseUsername'));
43 $I->fillField('#t3-install-step-mysqliManualConfiguration-password', $scenario->current('typo3InstallMysqlDatabasePassword'));
44 $I->click('Continue');
45
46 // DatabaseSelect step
47 $I->waitForText('Select a database');
48 $I->click('#t3-install-form-db-select-type-new');
49 $I->fillField('#t3-install-step-database-new', $scenario->current('typo3InstallMysqlDatabaseName'));
50 $I->click('Continue');
51
52 // DatabaseData step
53 $I->waitForText('Create Administrative User / Specify Site Name');
54 $I->fillField('#username', 'admin');
55 $I->fillField('#password', 'password');
56 $I->click('Continue');
57
58 // DefaultConfiguration step - Create empty page
59 $I->waitForText('Installation Complete');
60 $I->click('#load-distributions');
61 $I->click('Open the TYPO3 Backend');
62
63 // Verify backend login successful
64 $I->waitForElement('#t3-username');
65 $I->fillField('#t3-username', 'admin');
66 $I->fillField('#t3-password', 'password');
67 $I->click('#t3-login-submit-section > button');
68 $I->waitForElement('.nav', 30);
69 $I->waitForElement('.scaffold-content iframe', 30);
70 $I->seeCookie('be_lastLoginProvider');
71 $I->seeCookie('be_typo_user');
72
73 // Loading might take some time
74 $I->wait(10);
75 $I->switchToIFrame('list_frame');
76 $I->waitForText('Get preconfigured distribution', 30);
77 $I->click('.t3-button-action-installdistribution');
78 $I->waitForText('You successfully installed the distribution \'introduction\'', 240);
79
80 // Verify default frontend is rendered
81 $I->amOnPage('/');
82 $I->waitForText('Let us introduce you to TYPO3', 30);
83 $I->waitForText('Make it your own');
84
85 // Verify link
86 $I->click('[title="Features"]');
87 $I->waitForText('Feature Complete Out-of-the-box', 30);
88 }
89 }