‪TYPO3CMS  9.5
InstalledExtensionsCest.php
Go to the documentation of this file.
1 <?php
2 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 use Codeception\Util\Locator;
20 
25 {
29  public function ‪_before(‪BackendTester $I)
30  {
31  $I->useExistingSession('admin');
32 
33  $I->click('Extensions', '#menu');
34  $I->switchToContentFrame();
35  $I->waitForElementVisible('#typo3-extension-list');
36  }
37 
42  {
43  $I->seeNumberOfElements('#typo3-extension-list tbody tr[role="row"]', [10, 100]);
44 
45  // Fill extension search field
46  $I->fillField('Tx_Extensionmanager_extensionkey', 'backend');
47  $I->waitForElementNotVisible(Locator::contains('#typo3-extension-list', 'core'));
48 
49  // see 2 rows. 1 for the header and one for the result
50  $I->seeNumberOfElements('#typo3-extension-list tbody tr[role="row"]', 3);
51 
52  // Look for extension key
53  $I->see('backend', '#typo3-extension-list tbody tr[role="row"] td');
54 
55  // unset the filter
56  $I->waitForElementVisible('#Tx_Extensionmanager_extensionkey ~button.close', 10);
57  $I->click('#Tx_Extensionmanager_extensionkey ~button.close');
58  $I->wait(1);
59  $I->seeNumberOfElements('#typo3-extension-list tbody tr[role="row"]', [10, 100]);
60  }
61 
66  {
67  $I->cantSeeElement('.module-body .uploadForm');
68  $I->click('a[title="Upload Extension .t3x/.zip"]', '.module-docheader');
69  $I->seeElement('.module-body .uploadForm');
70  }
71 
76  {
77  $I->wantTo('Check if uninstalling and installing an extension with backend module removes and adds the module from the module menu.');
78  $I->amGoingTo('uninstall extension belog');
79  $I->switchToMainFrame();
80  $I->seeElement('#system_BelogLog');
81 
82  $I->switchToContentFrame();
83  $I->waitForElementVisible('//*[@id="typo3-extension-list"]/tbody/tr[@id="belog"]');
84  $I->click('a[data-original-title="Deactivate"]', '//*[@id="typo3-extension-list"]/tbody/tr[@id="belog"]');
85 
86  $I->switchToMainFrame();
87  $I->cantSeeElement('#system_BelogLog');
88 
89  $I->amGoingTo('install extension belog');
90  $I->switchToMainFrame();
91  $I->seeElement('.modulemenu-item-link');
92  $I->cantSeeElement('#system_BelogLog');
93 
94  $I->switchToContentFrame();
95  $I->waitForElementVisible('//*[@id="typo3-extension-list"]/tbody/tr[@id="belog"]');
96  $I->click('a[data-original-title="Activate"]', '//*[@id="typo3-extension-list"]/tbody/tr[@id="belog"]');
97 
98  $I->switchToMainFrame();
99  $I->seeElement('#system_BelogLog');
100  }
101 }
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\Extensionmanager
Definition: GetExtensionsCest.php:3
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\Extensionmanager\InstalledExtensionsCest\checkIfUploadFormAppears
‪checkIfUploadFormAppears(BackendTester $I)
Definition: InstalledExtensionsCest.php:65
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\Extensionmanager\InstalledExtensionsCest
Definition: InstalledExtensionsCest.php:25
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\Extensionmanager\InstalledExtensionsCest\checkSearchFiltersList
‪checkSearchFiltersList(BackendTester $I)
Definition: InstalledExtensionsCest.php:41
‪TYPO3\CMS\Core\Tests\Acceptance\Support\BackendTester
Definition: BackendTester.php:25
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\Extensionmanager\InstalledExtensionsCest\_before
‪_before(BackendTester $I)
Definition: InstalledExtensionsCest.php:29
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\Extensionmanager\InstalledExtensionsCest\checkUninstallingAndInstallingAnExtension
‪checkUninstallingAndInstallingAnExtension(BackendTester $I)
Definition: InstalledExtensionsCest.php:75