‪TYPO3CMS  11.5
EnvironmentCest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
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 
19 
20 use Codeception\Example;
23 
25 {
26  public function ‪_before(‪ApplicationTester $I): void
27  {
28  parent::_before($I);
29  $this->‪logIntoInstallTool($I);
30  $I->click('Environment');
31  $I->see('Environment', 'h1');
32  }
33 
40  public function ‪seeCardsAndModals(‪ApplicationTester $I, ‪ModalDialog $modalDialog, Example $testData): void
41  {
42  $I->see($testData['title']);
43  $I->click($testData['button']);
44  $modalDialog->‪canSeeDialog();
45  $I->see($testData['seeInModal'], ‪ModalDialog::$openedModalSelector);
46 
47  $I->click('.t3js-modal-close');
48  $I->waitForElementNotVisible('.modal-dialog');
49  }
50 
54  protected function ‪cardsDataProvider(): array
55  {
56  return [
57  ['title' => 'Environment Overview', 'button' => 'Show System Information', 'seeInModal' => 'Operating system'],
58  ['title' => 'Environment Status', 'button' => 'Check Environment', 'seeInModal' => 'File uploads allowed in PHP'],
59  ['title' => 'Directory Status', 'button' => 'Check Environment', 'seeInModal' => 'PHP version is fine'],
60  ['title' => 'PHP Info', 'button' => 'View PHP Info', 'seeInModal' => 'PHP Version'],
61  ['title' => 'Test Mail Setup', 'button' => 'Test Mail Setup', 'seeInModal' => 'Check the basic mail functionality by entering your email address here and clicking the button.'],
62  ];
63  }
64 
69  {
70  $I->click('Test Images');
71  $I->waitForElementVisible('.modal-dialog');
72  // This is odd: The 'close' X upper right does not immediately work, even though waitForElementVisible below
73  // reports 'is ok' quickly. Worth a look of some JS jockey? We give the system some time to accumulate.
74  $I->wait(1);
75  $I->waitForElementVisible('.t3js-modal-close');
76  $I->click('.t3js-modal-close');
77  $I->waitForElementNotVisible('.modal-dialog');
78  }
79 }
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Helper\ModalDialog\$openedModalSelector
‪static string $openedModalSelector
Definition: ModalDialog.php:33
‪TYPO3\CMS\Core\Tests\Acceptance\Application\InstallTool\EnvironmentCest\_before
‪_before(ApplicationTester $I)
Definition: EnvironmentCest.php:26
‪TYPO3\CMS\Core\Tests\Acceptance\Application\InstallTool\EnvironmentCest
Definition: EnvironmentCest.php:25
‪TYPO3\CMS\Core\Tests\Acceptance\Support\ApplicationTester
Definition: ApplicationTester.php:27
‪TYPO3\CMS\Core\Tests\Acceptance\Application\InstallTool\EnvironmentCest\seeCardsAndModals
‪seeCardsAndModals(ApplicationTester $I, ModalDialog $modalDialog, Example $testData)
Definition: EnvironmentCest.php:40
‪TYPO3\CMS\Core\Tests\Acceptance\Application\InstallTool\EnvironmentCest\cardsDataProvider
‪string[][] cardsDataProvider()
Definition: EnvironmentCest.php:54
‪TYPO3\CMS\Core\Tests\Acceptance\Application\InstallTool\AbstractCest\logIntoInstallTool
‪logIntoInstallTool(ApplicationTester $I)
Definition: AbstractCest.php:58
‪TYPO3\CMS\Core\Tests\Acceptance\Application\InstallTool
Definition: AbstractCest.php:18
‪TYPO3\CMS\Core\Tests\Acceptance\Application\InstallTool\AbstractCest
Definition: AbstractCest.php:26
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Helper\ModalDialog\canSeeDialog
‪canSeeDialog()
Definition: ModalDialog.php:73
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Helper\ModalDialog
Definition: ModalDialog.php:27
‪TYPO3\CMS\Core\Tests\Acceptance\Application\InstallTool\EnvironmentCest\imageProcessingWorks
‪imageProcessingWorks(ApplicationTester $I)
Definition: EnvironmentCest.php:68