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