‪TYPO3CMS  ‪main
InfoModuleCest.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\Attribute\DataProvider;
21 use Codeception\Example;
24 
28 final class ‪InfoModuleCest
29 {
30  public function ‪_before(‪ApplicationTester $I, ‪PageTree $pageTree): void
31  {
32  $I->useExistingSession('admin');
33  $I->click('[data-modulemenu-identifier="web_info"]');
34  $pageTree->‪openPath(['styleguide TCA demo']);
35  $I->switchToContentFrame();
36  }
37 
38  private function ‪infoMenuDataProvider(): array
39  {
40  return [
41  ['option' => 'Pagetree Overview', 'expect' => 'Pagetree Overview'],
42  ['option' => 'Localization Overview', 'expect' => 'Localization Overview'],
43  ];
44  }
45 
46  #[DataProvider('infoMenuDataProvider')]
47  public function ‪seeInfoSubModules(‪ApplicationTester $I, Example $exampleData): void
48  {
49  $I->amGoingTo('select ' . $exampleData['option'] . ' in dropdown');
50  $I->waitForElementVisible('.t3-js-jumpMenuBox');
51  $I->wait(1);
52  $I->selectOption('.t3-js-jumpMenuBox', $exampleData['option']);
53  $I->wait(1);
54  $I->waitForText($exampleData['expect']);
55  $I->see($exampleData['expect'], 'h1');
56  }
57 }
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Info\InfoModuleCest\_before
‪_before(ApplicationTester $I, PageTree $pageTree)
Definition: InfoModuleCest.php:30
‪TYPO3\CMS\Core\Tests\Acceptance\Support\ApplicationTester
Definition: ApplicationTester.php:28
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Info
Definition: InfoModuleCest.php:18
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Helper\AbstractTree\openPath
‪openPath(array $path)
Definition: AbstractTree.php:55
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Helper\PageTree
Definition: PageTree.php:26
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Info\InfoModuleCest\infoMenuDataProvider
‪infoMenuDataProvider()
Definition: InfoModuleCest.php:38
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Info\InfoModuleCest\seeInfoSubModules
‪seeInfoSubModules(ApplicationTester $I, Example $exampleData)
Definition: InfoModuleCest.php:47
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Info\InfoModuleCest
Definition: InfoModuleCest.php:29