‪TYPO3CMS  ‪main
NavigationComponentTreeCest.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 {
27  public function ‪_before(‪ApplicationTester $I): void
28  {
29  $I->useExistingSession('admin');
30  }
31 
33  {
34  $treeArea = '.scaffold-content-navigation-expanded';
35  $I->wantTo('check Page Module for Expands And Collapse');
36  $I->click('Page');
37  $I->waitForElement($treeArea);
38  $I->see('New TYPO3 site', $treeArea);
39 
40  $I->wantTo('check Page Module for Collapse');
41  $I->click('button.scaffold-content-navigation-switcher-close');
42  $I->waitForElementNotVisible($treeArea);
43  $I->cantSee('New TYPO3 site', $treeArea);
44 
45  $I->wantTo('check Page Module for Expands');
46  $I->click('button.scaffold-content-navigation-switcher-open');
47  $I->waitForElement($treeArea);
48  $I->see('New TYPO3 site', $treeArea);
49  }
50 
52  {
53  $treeArea = '.scaffold-content-navigation-expanded';
54 
55  $I->wantTo('check File Module for Expands And Collapse');
56  $I->click('Filelist');
57 
58  // Make sure 'fileadmin' is selected since FileClipboardCest clicks around on file tree, too.
59  // @todo: Working on file tree could be extracted like Helper/PageTree
60  $I->waitForText('fileadmin');
61  $I->click('//*[@id="typo3-filestoragetree-tree"]//*[text()="fileadmin"]/..');
62 
63  $I->waitForElement($treeArea);
64  $I->see('fileadmin', $treeArea);
65 
66  $I->wantTo('check File Module for Collapse');
67  $I->click('button.scaffold-content-navigation-switcher-close');
68  $I->waitForElementNotVisible($treeArea);
69  $I->cantSee('fileadmin', $treeArea);
70 
71  $I->wantTo('check File Module for Expands');
72  $I->click('button.scaffold-content-navigation-switcher-open');
73  $I->waitForElement($treeArea);
74  $I->see('fileadmin', $treeArea);
75  }
76 }
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Topbar\NavigationComponentTreeCest\checkTreeExpandsAndCollapseByPageModule
‪checkTreeExpandsAndCollapseByPageModule(ApplicationTester $I)
Definition: NavigationComponentTreeCest.php:32
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Topbar\NavigationComponentTreeCest
Definition: NavigationComponentTreeCest.php:26
‪TYPO3\CMS\Core\Tests\Acceptance\Support\ApplicationTester
Definition: ApplicationTester.php:28
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Topbar\NavigationComponentTreeCest\checkTreeExpandsAndCollapseByFileModule
‪checkTreeExpandsAndCollapseByFileModule(ApplicationTester $I)
Definition: NavigationComponentTreeCest.php:51
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Topbar
Definition: BookmarkCest.php:18
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Topbar\NavigationComponentTreeCest\_before
‪_before(ApplicationTester $I)
Definition: NavigationComponentTreeCest.php:27