c7d098358e4abcf11102d8ac771e15b5b693e8b7
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Tests / Acceptance / Install / Postgresql / IntroductionPackageCest.php
1 <?php
2 declare(strict_types = 1);
3 namespace TYPO3\CMS\Core\Tests\Acceptance\Install\Postgresql;
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, install introduction package
23 */
24 class IntroductionPackageCest
25 {
26 /**
27 * @param InstallTester $I
28 * @param Scenario $scenario
29 * @env postgresql
30 */
31 public function installTypo3OnPgSql(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('No problems detected, continue with installation');
39 $I->click('No problems detected, continue with installation');
40
41 // DatabaseConnection step
42 $I->waitForText('Select database');
43 $I->selectOption('#t3js-connect-database-driver', 'Manually configured PostgreSQL connection');
44 $I->fillField('#t3-install-step-postgresManualConfiguration-username', $scenario->current('typo3InstallPostgresqlDatabaseUsername'));
45 // password intentionally not filled. Postgres authenticates with the shell user.
46 $I->fillField('#t3-install-step-postgresManualConfiguration-database', $scenario->current('typo3InstallPostgresqlDatabaseName'));
47 $I->click('Continue');
48
49 // DatabaseData step
50 $I->waitForText('Create Administrative User / Specify Site Name');
51 $I->fillField('#username', 'admin');
52 $I->fillField('#password', 'password');
53 $I->click('Continue');
54
55 // DefaultConfiguration step - load distributions
56 $I->waitForText('Installation Complete');
57 $I->click('#load-distributions');
58 $I->click('Open the TYPO3 Backend');
59
60 // Verify backend login successful
61 $I->waitForElement('#t3-username');
62 $I->fillField('#t3-username', 'admin');
63 $I->fillField('#t3-password', 'password');
64 $I->click('#t3-login-submit-section > button');
65 $I->waitForElement('.nav', 30);
66 $I->waitForElement('.scaffold-content iframe', 30);
67 $I->seeCookie('be_lastLoginProvider');
68 $I->seeCookie('be_typo_user');
69
70 // Loading might take some time
71 $I->wait(10);
72 $I->switchToIFrame('list_frame');
73 $I->waitForText('Get preconfigured distribution', 30);
74 $I->click('.t3-button-action-installdistribution');
75 $I->waitForText('You successfully installed the distribution \'introduction\'', 240);
76
77 // Verify default frontend is rendered
78 $I->amOnPage('/');
79 $I->waitForText('Let us introduce you to TYPO3', 30);
80 $I->waitForText('Make it your own');
81
82 // Verify link
83 $I->click('[title="Features"]');
84 $I->waitForText('Feature Complete Out-of-the-box', 30);
85 }
86 }