TYPO3 CMS  TYPO3_8-7
ModuleMenuCest.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 
18 
23 {
27  public function _before(BackendTester $I)
28  {
29  $I->useExistingSession('admin');
30  }
31 
36  {
37  // A sub-element of web module is shown
38  $I->waitForElementVisible('#web .modulemenu-group-container .modulemenu-item');
39  $I->seeElement('#web .modulemenu-group-container .modulemenu-item');
40 
41  // Collapse web module and verify sub elements are hidden
42  $I->wantTo('collapse the menu element');
43  $I->waitForElementVisible('#web .modulemenu-group-header');
44  $I->click('#web .modulemenu-group-header');
45  $I->waitForElementNotVisible('#web .modulemenu-group-container .modulemenu-item');
46  $I->dontSeeElement('#web .modulemenu-group-container .modulemenu-item');
47 
48  // Expand again and verify sub elements are shown
49  $I->wantTo('expand the menu element again');
50  $I->click('#web .modulemenu-group-header');
51  $I->waitForElementVisible('#web .modulemenu-group-container .modulemenu-item');
52  $I->seeElement('#web .modulemenu-group-container .modulemenu-item');
53  }
54 
59  {
60  $I->seeNumberOfElements('#web .modulemenu-item-link', [2, 20]);
61 
62  $I->wantTo('check that the second element has no "active" class\'');
63  $I->cantSeeElement('#web #web_list.active');
64  $I->click('#web #web_list .modulemenu-item-link');
65 
66  $I->wantTo('see that the second element has an "active" class');
67  $I->canSeeElement('#web #web_list.active');
68  }
69 }