IntroductionPackageCest.php 3.53 KB
Newer Older
1
<?php
2

3
declare(strict_types=1);
4
5
6
7
8
9
10
11
12
13
14
15
16
17

/*
 * This file is part of the TYPO3 CMS project.
 *
 * It is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License, either version 2
 * of the License, or any later version.
 *
 * For the full copyright and license information, please read the
 * LICENSE.txt file that was distributed with this source code.
 *
 * The TYPO3 project - inspiring people to share!
 */

18
19
namespace TYPO3\CMS\Core\Tests\Acceptance\Install\Mysql;

Davert's avatar
Davert committed
20
use Codeception\Scenario;
21
use TYPO3\CMS\Core\Tests\Acceptance\Install\AbstractIntroductionPackage;
Davert's avatar
Davert committed
22
23
use TYPO3\CMS\Core\Tests\Acceptance\Support\InstallTester;

24
25
26
/**
 * Click through installer, go to backend, check blank site in FE works
 */
27
class IntroductionPackageCest extends AbstractIntroductionPackage
28
29
{
    /**
Davert's avatar
Davert committed
30
31
     * @env mysql
     * @param InstallTester $I
32
     * @skip
33
     */
Davert's avatar
Davert committed
34
    public function installTypo3OnMysql(InstallTester $I, Scenario $scenario)
35
36
37
38
39
40
    {
        // Calling frontend redirects to installer
        $I->amOnPage('/');

        // EnvironmentAndFolders step
        $I->waitForText('Installing TYPO3');
Tom Warwick's avatar
Tom Warwick committed
41
42
        $I->waitForText('No problems detected, continue with installation');
        $I->click('No problems detected, continue with installation');
43
44

        // DatabaseConnection step
45
        $I->waitForText('Select database', 30);
Davert's avatar
Davert committed
46
47
        $I->fillField('#t3-install-step-mysqliManualConfiguration-username', $scenario->current('typo3InstallMysqlDatabaseUsername'));
        $I->fillField('#t3-install-step-mysqliManualConfiguration-password', $scenario->current('typo3InstallMysqlDatabasePassword'));
48
        $I->fillField('#t3-install-step-mysqliManualConfiguration-host', $scenario->current('typo3InstallMysqlDatabaseHost'));
49
50
51
        $I->click('Continue');

        // DatabaseSelect step
52
        $I->waitForText('Select a database', 30);
53
        $I->click('#t3-install-form-db-select-type-new');
Davert's avatar
Davert committed
54
        $I->fillField('#t3-install-step-database-new', $scenario->current('typo3InstallMysqlDatabaseName'));
55
56
57
        $I->click('Continue');

        // DatabaseData step
Tom Warwick's avatar
Tom Warwick committed
58
        $I->waitForText('Create Administrative User / Specify Site Name');
59
60
61
62
63
        $I->fillField('#username', 'admin');
        $I->fillField('#password', 'password');
        $I->click('Continue');

        // DefaultConfiguration step - Create empty page
64
        $I->waitForText('Installation Complete', 60);
65
        $I->click('#load-distributions');
66
67
68
69
70
71
72
        $I->click('Open the TYPO3 Backend');

        // Verify backend login successful
        $I->waitForElement('#t3-username');
        $I->fillField('#t3-username', 'admin');
        $I->fillField('#t3-password', 'password');
        $I->click('#t3-login-submit-section > button');
73
        $I->waitForElement('.modulemenu', 30);
74
75
76
        $I->waitForElement('.scaffold-content iframe', 30);
        $I->seeCookie('be_typo_user');

77
        // Loading might take some time
78
        $I->wait(10);
79
80
81
        $I->switchToIFrame('list_frame');
        $I->waitForText('Get preconfigured distribution', 30);
        $I->click('.t3-button-action-installdistribution');
82
        $I->waitForText('You successfully installed the distribution \'introduction\'', 240);
83

84
85
        $this->manipulateSiteConfigurationOnlyForTesting($I);

86
87
        // Verify default frontend is rendered
        $I->amOnPage('/');
88
        $I->waitForText('Deliver business value', 60);
89
        $I->waitForText('100% free open source software');
90
91
92

        // Verify link
        $I->click('[title="Features"]');
93
        $I->waitForText('rich core feature set out-of-the-box', 30);
94
95
    }
}