‪TYPO3CMS  ‪main
GetExtensionsCest.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\Env;
21 use Facebook\WebDriver\WebDriverKeys;
23 
28 {
29  public function ‪_before(‪ApplicationTester $I): void
30  {
31  $I->useExistingSession('admin');
32 
33  $I->click('Extensions', '#modulemenu');
34  $I->switchToContentFrame();
35 
36  if ($I->tryToSeeElement('#sudo-mode-verification')) {
37  $I->see('Verify with user password');
38  $I->fillField('//input[@name="password"]', 'password');
39  $I->click('//button[@type="submit"]');
40  }
41 
42  $I->waitForElementVisible('#typo3-extension-list');
43 
44  $I->selectOption('[name="ExtensionManagerModuleMenu"]', 'Get Extensions');
45  $I->waitForElementVisible('#terTable');
46 
47  // We expect exact two extensions created from the Fixtures
48  $I->seeNumberOfElements('#terTable tbody tr', 2);
49  }
50 
51  #[Env('classic')]
53  {
54  $I->see('superext');
55  $I->see('neededext');
56  }
57 
58  #[Env('classic')]
60  {
61  $I->dontSeeElement('.pagination-wrap');
62  $I->dontSee('Extensions 1 - 2');
63  }
64 
65  #[Env('classic')]
67  {
68  $I->fillField('input[name="search"]', 'superext');
69  $I->click('Go');
70  // @todo do something about the double loading of the table, it is rendered twice (not double, but once, then retrieve extension list loader, then second time)
71  $I->waitForElementVisible('#terSearchTable');
72  $I->wait(3);
73  $I->waitForElementNotVisible('#nprogess');
74  $I->seeNumberOfElements('#terSearchTable tbody tr', 1);
75  $I->see('Super Extension');
76 
77  $I->amGoingTo('search extension needed ext and submit with enter');
78 
79  $I->fillField('input[name="search"]', 'neededext');
80  $I->pressKey('input[name="search"]', WebDriverKeys::ENTER);
81  $I->waitForElementVisible('#terSearchTable');
82  $I->wait(3);
83  $I->waitForElementNotVisible('div#nprogess');
84  $I->seeNumberOfElements('#terSearchTable tbody tr', 1);
85  $I->see('Needed Extension');
86  }
87 
88  #[Env('classic')]
90  {
91  $I->fillField('input[name="search"]', 'ext');
92  $I->click('Go');
93  $I->waitForElementVisible('#terSearchTable');
94  $I->seeNumberOfElements('#terSearchTable tbody tr', 2);
95  $I->wait(3);
96  $I->waitForElementNotVisible('div#nprogess');
97  $I->see('Super Extension');
98  $I->see('Needed Extension');
99  }
100 }
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Extensionmanager\GetExtensionsCest\checkRetrievedExtensionsFromTerAreDisplayed
‪checkRetrievedExtensionsFromTerAreDisplayed(ApplicationTester $I)
Definition: GetExtensionsCest.php:52
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Extensionmanager\GetExtensionsCest\checkSearchFilterListFindsExtensionKey
‪checkSearchFilterListFindsExtensionKey(ApplicationTester $I)
Definition: GetExtensionsCest.php:66
‪TYPO3\CMS\Core\Tests\Acceptance\Support\ApplicationTester
Definition: ApplicationTester.php:28
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Extensionmanager\GetExtensionsCest\checkSearchFilterListFindsPartOfExtensionKey
‪checkSearchFilterListFindsPartOfExtensionKey(ApplicationTester $I)
Definition: GetExtensionsCest.php:89
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Extensionmanager
Definition: GetExtensionsCest.php:18
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Extensionmanager\GetExtensionsCest
Definition: GetExtensionsCest.php:28
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Extensionmanager\GetExtensionsCest\checkPaginationIsNotDisplayedForTwoRecords
‪checkPaginationIsNotDisplayedForTwoRecords(ApplicationTester $I)
Definition: GetExtensionsCest.php:59
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Extensionmanager\GetExtensionsCest\_before
‪_before(ApplicationTester $I)
Definition: GetExtensionsCest.php:29