‪TYPO3CMS  ‪main
InstalledExtensionsCest.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;
22 
27 {
28  public function ‪_before(‪ApplicationTester $I): void
29  {
30  $I->useExistingSession('admin');
31 
32  $I->click('Extensions', '#modulemenu');
33  $I->switchToContentFrame();
34 
35  if ($I->tryToSeeElement('#sudo-mode-verification')) {
36  $I->see('Verify with user password');
37  $I->fillField('//input[@name="password"]', 'password');
38  $I->click('//button[@type="submit"]');
39  }
40 
41  $I->waitForElementVisible('#typo3-extension-list');
42  }
43 
45  {
46  $I->seeNumberOfElements('#typo3-extension-list tbody tr[role="row"]', [10, 100]);
47 
48  // Fill extension search field
49  $I->fillField('Tx_Extensionmanager_extensionkey', 'backend');
50  $I->waitForElementNotVisible('tr#core');
51 
52  // see 2 rows. 1 for the header and one for the result
53  $I->seeNumberOfElements('#typo3-extension-list tbody tr[role="row"]', 3);
54 
55  // Look for extension key
56  $I->see('backend', '#typo3-extension-list tbody tr[role="row"] td');
57 
58  // unset the filter
59  $I->waitForElementVisible('#Tx_Extensionmanager_extensionkey ~button.close', 10);
60  $I->click('#Tx_Extensionmanager_extensionkey ~button.close');
61  $I->wait(1);
62  $I->seeNumberOfElements('#typo3-extension-list tbody tr[role="row"]', [10, 100]);
63  }
64 
65  #[Env('classic')]
67  {
68  $I->cantSeeElement('.module-body .extension-upload-form');
69  $I->click('a[title="Upload Extension"]', '.module-docheader');
70  $I->seeElement('.module-body .extension-upload-form');
71  }
72 
73  #[Env('classic')]
75  {
76  $I->wantTo('Check if uninstalling and installing an extension with backend module removes and adds the module from the module menu.');
77  $I->amGoingTo('uninstall extension belog');
78  $I->switchToMainFrame();
79  $I->seeElement('[data-modulemenu-identifier="system_BelogLog"]');
80 
81  $I->switchToContentFrame();
82  $I->waitForElementVisible('//*[@id="typo3-extension-list"]/tbody/tr[@id="belog"]');
83  $I->click('a[title="Deactivate"]', '//*[@id="typo3-extension-list"]/tbody/tr[@id="belog"]');
84 
85  $I->switchToMainFrame();
86  $I->waitForElementNotVisible('[data-modulemenu-identifier="system_BelogLog"]');
87  $I->cantSeeElement('[data-modulemenu-identifier="system_BelogLog"]');
88 
89  $I->amGoingTo('install extension belog');
90  $I->switchToContentFrame();
91  $I->waitForElementVisible('//*[@id="typo3-extension-list"]/tbody/tr[@id="belog"]');
92  $I->click('a[title="Activate"]', '//*[@id="typo3-extension-list"]/tbody/tr[@id="belog"]');
93 
94  $I->switchToMainFrame();
95  $I->waitForElementVisible('[data-modulemenu-identifier="system_BelogLog"]');
96  $I->seeElement('[data-modulemenu-identifier="system_BelogLog"]');
97  }
98 }
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Extensionmanager\InstalledExtensionsCest\checkUninstallingAndInstallingAnExtension
‪checkUninstallingAndInstallingAnExtension(ApplicationTester $I)
Definition: InstalledExtensionsCest.php:74
‪TYPO3\CMS\Core\Tests\Acceptance\Support\ApplicationTester
Definition: ApplicationTester.php:28
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Extensionmanager\InstalledExtensionsCest\checkIfUploadFormAppears
‪checkIfUploadFormAppears(ApplicationTester $I)
Definition: InstalledExtensionsCest.php:66
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Extensionmanager\InstalledExtensionsCest
Definition: InstalledExtensionsCest.php:27
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Extensionmanager
Definition: GetExtensionsCest.php:18
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Extensionmanager\InstalledExtensionsCest\checkSearchFiltersList
‪checkSearchFiltersList(ApplicationTester $I)
Definition: InstalledExtensionsCest.php:44
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Extensionmanager\InstalledExtensionsCest\_before
‪_before(ApplicationTester $I)
Definition: InstalledExtensionsCest.php:28