[TASK] Enable v8 acceptance testing again
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Tests / Acceptance / Backend / Topbar / NavigationComponentTreeCest.php
1 <?php
2 namespace TYPO3\CMS\Core\Tests\Acceptance\Backend\Topbar;
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
17 use TYPO3\CMS\Core\Tests\Acceptance\Support\BackendTester;
18
19 /**
20 * Acceptance test for the Navigation Component Tree
21 */
22 class NavigationComponentTreeCest
23 {
24 /**
25 * @param BackendTester $I
26 */
27 public function _before(BackendTester $I)
28 {
29 $I->useExistingSession('admin');
30 }
31
32 /**
33 * @param BackendTester $I
34 */
35 public function checkTreeExpandsAndCollapseByPageModule(BackendTester $I)
36 {
37 $treeArea = '.scaffold-content-navigation-expanded';
38 $I->wantTo('check Page Module for Expands And Collapse');
39 $I->click('Page');
40 $I->waitForElement($treeArea);
41 $I->see('New TYPO3 site', $treeArea);
42 $I->wantTo('check Page Module for Collapse');
43 $I->click('button.t3js-topbar-button-navigationcomponent');
44 $I->waitForElementNotVisible($treeArea);
45 $I->cantSee('New TYPO3 site', $treeArea);
46 $I->wantTo('check Page Module for Expands');
47 $I->click('button.t3js-topbar-button-navigationcomponent');
48 $I->waitForElement($treeArea);
49
50 $I->see('New TYPO3 site', $treeArea);
51 }
52
53 /**
54 * @param BackendTester $I
55 */
56 public function checkTreeExpandsAndCollapseByFileModule(BackendTester $I)
57 {
58 $I->wantTo('check File Module for Expands And Collapse');
59 $I->click('Filelist');
60 $I->switchToIFrame('nav_frame');
61 $I->waitForElement('.t3js-module-body');
62 $I->see('fileadmin', '.t3js-module-body');
63 $I->switchToMainFrame();
64 $I->wantTo('check File Module for Collapse');
65 $I->click('button.t3js-topbar-button-navigationcomponent');
66 $I->waitForElementNotVisible('.scaffold-content-navigation-expanded');
67 $I->wantTo('check File Module for Expands');
68 $I->click('button.t3js-topbar-button-navigationcomponent');
69 $I->switchToIFrame('nav_frame');
70 $I->waitForElement('.t3js-module-body');
71 $I->see('fileadmin', '.t3js-module-body');
72 $I->switchToMainFrame();
73 }
74 }