‪TYPO3CMS  ‪main
ModuleMenuButtonCest.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  $I->wantTo('see the module menu button behavior when shrinking the window');
35 
36  $I->seeElement('.scaffold-modulemenu-expanded');
37  $I->seeElement('.modulemenu-indicator');
38  $I->seeElement('.modulemenu-icon');
39 
40  $I->amGoingTo('collapse the module menu');
41  $I->click('button.t3js-topbar-button-modulemenu span[data-identifier="actions-menu"]');
42 
43  $I->expectTo('see only the module menu icon');
44  $I->cantSeeElement('.scaffold-modulemenu-expanded');
45  $I->cantSeeElement('.modulemenu-indicator');
46  $I->seeElement('.modulemenu-icon');
47 
48  $I->amGoingTo('shrink the window');
49  $I->resizeWindow(680, 420);
50  $I->expectTo('see no module menu');
51  $I->cantSeeElement('.modulemenu-icon');
52 
53  $I->amGoingTo('expand the module menu');
54  $I->click('button.t3js-topbar-button-modulemenu span[data-identifier="actions-menu"]');
55  $I->expectTo('see the expanded module menu');
56  $I->seeElement('.modulemenu-indicator');
57  $I->seeElement('.modulemenu-icon');
58  }
59 
61  {
62  $I->wantTo('see the module menu button behavior when enlarging the window');
63 
64  $I->amGoingTo('shrink the window');
65  $I->resizeWindow(320, 400);
66  $I->expectTo('see the module menu');
67  $I->seeElement('.scaffold-modulemenu-expanded');
68  $I->seeElement('.modulemenu-indicator');
69  $I->seeElement('.modulemenu-icon');
70 
71  $I->amGoingTo('collapse the module menu');
72  $I->click('button.t3js-topbar-button-modulemenu span[data-identifier="actions-menu"]');
73 
74  $I->expectTo('see no module menu');
75  $I->cantSeeElement('.scaffold-modulemenu-expanded');
76  $I->cantSeeElement('.modulemenu-indicator');
77  $I->cantSeeElement('.modulemenu-icon');
78 
79  $I->amGoingTo('enlarge the window');
80  $I->resizeWindow(1280, 960);
81  $I->expectTo('see the module menu icon');
82  $I->seeElement('.modulemenu-icon');
83 
84  $I->amGoingTo('expand the module menu');
85  $I->click('button.t3js-topbar-button-modulemenu span[data-identifier="actions-menu"]');
86 
87  $I->expectTo('see the full module menu');
88  $I->seeElement('.scaffold-modulemenu-expanded');
89  $I->seeElement('.modulemenu-indicator');
90  $I->seeElement('.modulemenu-icon');
91  }
92 }
‪TYPO3\CMS\Core\Tests\Acceptance\Support\ApplicationTester
Definition: ApplicationTester.php:28
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Topbar
Definition: BookmarkCest.php:18
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Topbar\ModuleMenuButtonCest\_before
‪_before(ApplicationTester $I)
Definition: ModuleMenuButtonCest.php:27
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Topbar\ModuleMenuButtonCest\checkModelMenuButtonFromBigToSmallScreen
‪checkModelMenuButtonFromBigToSmallScreen(ApplicationTester $I)
Definition: ModuleMenuButtonCest.php:32
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Topbar\ModuleMenuButtonCest
Definition: ModuleMenuButtonCest.php:26
‪TYPO3\CMS\Core\Tests\Acceptance\Application\Topbar\ModuleMenuButtonCest\checkModelMenuButtonFromSmallToBigScreen
‪checkModelMenuButtonFromSmallToBigScreen(ApplicationTester $I)
Definition: ModuleMenuButtonCest.php:60