[TASK] Unify installation tests
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Tests / AcceptanceInstallPgsql / InstallWithPgsqlIntroductionPackageCest.php
1 <?php
2 namespace TYPO3\CMS\Core\Tests\AcceptanceInstallPsql;
3
4 /*
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16
17 /**
18 * Click through installer, go to backend, install introduction package
19 */
20 class InstallWithPgsqlIntroductionPackageCest
21 {
22 /**
23 * @param \AcceptanceTester $I
24 */
25 public function installTypo3OnPgSql(\AcceptanceTester $I)
26 {
27 // Calling frontend redirects to installer
28 $I->amOnPage('/');
29
30 // EnvironmentAndFolders step
31 $I->waitForText('Installing TYPO3');
32 $I->see('System looks good. Continue!');
33 $I->click('System looks good. Continue!');
34
35 // DatabaseConnection step
36 $I->waitForText('Database connection');
37 $I->selectOption('#t3js-connect-database-driver', 'Manually configured PostgreSQL connection');
38 $I->fillField('#t3-install-step-postgresManualConfiguration-username', getenv('typo3DatabaseUsername'));
39 // password intentionally not filled. Postgres authenticates with the shell user.
40 $I->fillField('#t3-install-step-postgresManualConfiguration-database', getenv('typo3DatabaseName') . '_atipgsql');
41 $I->click('Continue');
42
43 // DatabaseData step
44 $I->waitForText('Create user and import base data');
45 $I->fillField('#username', 'admin');
46 $I->fillField('#password', 'password');
47 $I->click('Continue');
48
49 // DefaultConfiguration step - load distributions
50 $I->waitForText('Installation done!');
51 $I->click('#load-distributions');
52 $I->click('Open the TYPO3 Backend');
53
54 // Verify backend login successful
55 $I->waitForElement('#t3-username');
56 $I->fillField('#t3-username', 'admin');
57 $I->fillField('#t3-password', 'password');
58 $I->click('#t3-login-submit-section > button');
59 $I->waitForElement('.nav', 30);
60 $I->waitForElement('.scaffold-content iframe', 30);
61 $I->seeCookie('be_lastLoginProvider');
62 $I->seeCookie('be_typo_user');
63
64 // Loading might take some time
65 $I->switchToIFrame('list_frame');
66 $I->waitForText('Get preconfigured distribution', 30);
67 $I->click('.t3-button-action-installdistribution');
68 $I->waitForText('You successfully installed the distribution:introduction', 30);
69
70 // Verify default frontend is rendered
71 $I->amOnPage('/');
72 $I->waitForText('Let us introduce you to TYPO3', 30);
73 $I->waitForText('Make it your own');
74
75 // Verify link
76 $I->click('[title="Features"]');
77 $I->waitForText('Feature Complete Out-of-the-box', 30);
78 }
79 }