547ec731606dc659b1891c13fb8ea7b81997d8ea
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Tests / Acceptance / Backend / ConfigurationModule / ConfigurationModuleProviderCest.php
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
18 namespace TYPO3\CMS\Core\Tests\Acceptance\Backend\ConfigurationModule;
19
20 use TYPO3\CMS\Core\Tests\Acceptance\Support\BackendTester;
21
22 /**
23 * Configuration module provider tests
24 */
25 class ConfigurationModuleProviderCest
26 {
27 /**
28 * @param BackendTester $I
29 */
30 public function _before(BackendTester $I): void
31 {
32 $I->useExistingSession('admin');
33 $I->scrollTo('#system_config');
34 $I->see('Configuration', '#system_config');
35 $I->click('#system_config');
36 $I->switchToContentFrame();
37 }
38
39 /**
40 * @param BackendTester $I
41 */
42 public function selectAndDisplayConfiguration(BackendTester $I): void
43 {
44 // Module can be accessed
45 $I->see('Configuration', 'h1');
46
47 // Sorting is applied and TYPO3_CONF_VARS is the default provider to display
48 $I->see('$GLOBALS[\'TYPO3_CONF_VARS\'] (Global Configuration)', 'h2');
49
50 // Middlewares provider exists
51 $I->selectOption('select[name=tree]', 'HTTP Middlewares (PSR-15)');
52
53 // Middleware provider can be loaded
54 $I->waitForElementVisible('#ConfigurationView');
55 $I->see('HTTP Middlewares (PSR-15)', 'h2');
56
57 // Tree search can be applied
58 $I->fillField('#lowlevel-searchString', '\/authentication$');
59 $I->checkOption('#lowlevel-regexSearch');
60 $I->click('input#search');
61
62 // Correct tree with search options present and active results is loaded
63 $I->waitForElementVisible('#ConfigurationView');
64 $I->see('HTTP Middlewares (PSR-15)', 'h2');
65 $I->seeElement('#lowlevel-searchString', ['value' => '\/authentication$']);
66 $I->seeCheckboxIsChecked('#lowlevel-regexSearch');
67 $I->seeElement('li.active');
68 }
69 }