[TASK] Unify installation tests
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Tests / AcceptanceInstallMysql / InstallWithMysqlBlankPageCest.php
1 <?php
2 namespace TYPO3\CMS\Core\Tests\AcceptanceInstallMysql;
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, check blank site in FE works
19 */
20 class InstallWithMysqlBlankPageCest
21 {
22 /**
23 * @param \AcceptanceTester $I
24 */
25 public function installTypo3OnMysql(\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->fillField('#t3-install-step-mysqliManualConfiguration-username', getenv('typo3DatabaseUsername'));
38 $I->fillField('#t3-install-step-mysqliManualConfiguration-password', getenv('typo3DatabasePassword'));
39 $I->click('Continue');
40
41 // DatabaseSelect step
42 $I->waitForText('Select database');
43 $I->click('#t3-install-form-db-select-type-new');
44 $I->fillField('#t3-install-step-database-new', getenv('typo3DatabaseName') . '_atimysql');
45 $I->click('Continue');
46
47 // DatabaseData step
48 $I->waitForText('Create user and import base data');
49 $I->fillField('#username', 'admin');
50 $I->fillField('#password', 'password');
51 $I->click('Continue');
52
53 // DefaultConfiguration step - Create empty page
54 $I->waitForText('Installation done!');
55 $I->click('#create-site');
56 $I->click('Open the TYPO3 Backend');
57
58 // Verify backend login successful
59 $I->waitForElement('#t3-username');
60 $I->fillField('#t3-username', 'admin');
61 $I->fillField('#t3-password', 'password');
62 $I->click('#t3-login-submit-section > button');
63 $I->waitForElement('.nav', 30);
64 $I->waitForElement('.scaffold-content iframe', 30);
65 $I->seeCookie('be_lastLoginProvider');
66 $I->seeCookie('be_typo_user');
67
68 // Verify default frontend is rendered
69 $I->amOnPage('/');
70 $I->waitForText('Welcome to a default website made with TYPO3');
71 }
72 }