TYPO3 CMS  TYPO3_8-7
InstalledExtensionsCest.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
19 
24 {
28  public function _before(BackendTester $I)
29  {
30  $I->useExistingSession('admin');
31 
32  $I->click('Extensions', '#menu');
33  $I->switchToContentFrame();
34  $I->waitForElementVisible('#typo3-extension-list');
35  }
36 
41  {
42  $I->canSeeNumberOfElements('#typo3-extension-list tbody tr[role="row"]', [10, 100]);
43 
44  // Fill extension search field
45  $I->fillField('Tx_Extensionmanager_extensionkey', 'cshmanual');
46  $I->waitForElementNotVisible(Locator::contains('#typo3-extension-list', 'core'));
47 
48  // see 2 rows. 1 for the header and one for the result
49  $I->canSeeNumberOfElements('#typo3-extension-list tbody tr[role="row"]', 1);
50 
51  // Look for extension key
52  $I->see('cshmanual', '#typo3-extension-list tbody tr[role="row"] td');
53 
54  // unset the filter
55  $I->waitForElementVisible('#Tx_Extensionmanager_extensionkey ~button.close', 10);
56  $I->click('#Tx_Extensionmanager_extensionkey ~button.close');
57  $I->wait(1);
58  $I->canSeeNumberOfElements('#typo3-extension-list tbody tr[role="row"]', [10, 100]);
59  }
60 
65  {
66  $I->cantSeeElement('.module-body .uploadForm');
67  $I->click('a[title="Upload Extension .t3x/.zip"]', '.module-docheader');
68  $I->seeElement('.module-body .uploadForm');
69  }
70 
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('#system_BelogLog');
80 
81  $I->switchToContentFrame();
82  $I->waitForElementVisible('//*[@id="typo3-extension-list"]/tbody/tr[@id="belog"]');
83  $I->click('a[data-original-title="Deactivate"]', '//*[@id="typo3-extension-list"]/tbody/tr[@id="belog"]');
84 
85  $I->switchToMainFrame();
86  $I->cantSeeElement('#system_BelogLog');
87 
88  $I->amGoingTo('install extension belog');
89  $I->switchToMainFrame();
90  $I->seeElement('.modulemenu-item-link');
91  $I->cantSeeElement('#system_BelogLog');
92 
93  $I->switchToContentFrame();
94  $I->waitForElementVisible('//*[@id="typo3-extension-list"]/tbody/tr[@id="belog"]');
95  $I->click('a[data-original-title="Activate"]', '//*[@id="typo3-extension-list"]/tbody/tr[@id="belog"]');
96 
97  $I->switchToMainFrame();
98  $I->seeElement('#system_BelogLog');
99  }
100 }