[TASK] Enable v8 acceptance testing again
[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 * @param InstallTester $I
28 * @param Scenario
29 * @env mysql
30 */
31 public function installTypo3OnMysql(InstallTester $I, Scenario $scenario)
32 {
33 // Calling frontend redirects to installer
34 $I->amOnPage('/');
35
36 // EnvironmentAndFolders step
37 $I->waitForText('Installing TYPO3');
38 $I->waitForText('System looks good. Continue!');
39 $I->click('System looks good. Continue!');
40
41 // DatabaseConnection step
42 $I->waitForText('Database connection');
43 $I->fillField('#t3-install-step-mysqliManualConfiguration-username', $scenario->current('typo3InstallMysqlDatabaseUsername'));
44 $I->fillField('#t3-install-step-mysqliManualConfiguration-password', $scenario->current('typo3InstallMysqlDatabasePassword'));
45 $I->fillField('#t3-install-step-mysqliManualConfiguration-host', $scenario->current('typo3InstallMysqlDatabaseHost'));
46 $I->click('Continue');
47
48 // DatabaseSelect step
49 $I->waitForText('Select database');
50 $I->click('#t3-install-form-db-select-type-new');
51 $I->fillField('#t3-install-step-database-new', $scenario->current('typo3InstallMysqlDatabaseName'));
52 $I->click('Continue');
53
54 // DatabaseData step
55 $I->waitForText('Create user and import base data');
56 $I->fillField('#username', 'admin');
57 $I->fillField('#password', 'password');
58 $I->click('Continue');
59
60 // DefaultConfiguration step - Create empty page
61 $I->waitForText('Installation done!');
62 $I->click('#load-distributions');
63 $I->click('Open the TYPO3 Backend');
64
65 // Verify backend login successful
66 $I->waitForElement('#t3-username');
67 $I->fillField('#t3-username', 'admin');
68 $I->fillField('#t3-password', 'password');
69 $I->click('#t3-login-submit-section > button');
70 $I->waitForElement('.nav', 30);
71 $I->waitForElement('.scaffold-content iframe', 30);
72 $I->seeCookie('be_lastLoginProvider');
73 $I->seeCookie('be_typo_user');
74
75 // Loading might take some time
76 $I->wait(10);
77 $I->switchToIFrame('list_frame');
78 $I->waitForText('Get preconfigured distribution', 30);
79 $I->click('.t3-button-action-installdistribution');
80 $I->waitForText('You successfully installed the distribution:introduction', 240);
81
82 // Verify default frontend is rendered
83 $I->amOnPage('/');
84 $I->waitForText('Let us introduce you to TYPO3', 30);
85 $I->waitForText('Make it your own');
86
87 // Verify link
88 $I->click('[title="Features"]');
89 $I->waitForText('Feature Complete Out-of-the-box', 30);
90 }
91 }