[TASK] Enable v8 acceptance testing again
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Tests / Acceptance / Backend / Topbar / ModuleMenuButtonCest.php
1 <?php
2 namespace TYPO3\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 menu button in the topbar
21 */
22 class ModuleMenuButtonCest
23 {
24
25 /**
26 * @param BackendTester $I
27 */
28 public function _before(BackendTester $I)
29 {
30 $I->useExistingSession('admin');
31 }
32
33 /**
34 * @param BackendTester $I
35 */
36 public function checkModelMenuButtomFromBigToSmallScreen(BackendTester $I)
37 {
38 $I->wantTo('see the module menu button behavior when shrinking the window');
39
40 $I->seeElement('.scaffold-modulemenu-expanded');
41 $I->see('Web', 'span.modulemenu-group-title');
42 $I->seeElement('.modulemenu-group-icon');
43
44 $I->amGoingTo('collapse the module menu');
45 $I->click('button.t3js-topbar-button-modulemenu span[data-identifier="actions-menu"]');
46
47 $I->expectTo('see only the module menu icon');
48 $I->cantSeeElement('.scaffold-modulemenu-expanded');
49 $I->cantSee('Web', 'span.modulemenu-group-title');
50 $I->seeElement('.modulemenu-group-icon');
51
52 $I->amGoingTo('shrink the window');
53 $I->resizeWindow(680, 420);
54 $I->expectTo('see no module menu');
55 $I->cantSeeElement('.modulemenu-group-icon');
56
57 $I->amGoingTo('expand the module menu');
58 $I->click('button.t3js-topbar-button-modulemenu span[data-identifier="actions-menu"]');
59 $I->expectTo('see the expanded module menu');
60 $I->see('Web', 'span.modulemenu-group-title');
61 $I->seeElement('.modulemenu-group-icon');
62 }
63
64 /**
65 * @param BackendTester $I
66 */
67 public function checkModelMenuButtomFromSmallToBigScreen(BackendTester $I)
68 {
69 $I->wantTo('see the module menu button behavior when enlarging the window');
70
71 $I->amGoingTo('shrink the window');
72 $I->resizeWindow(320, 400);
73 $I->expectTo('see the module menu');
74 $I->seeElement('.scaffold-modulemenu-expanded');
75 $I->see('Web', 'span.modulemenu-group-title');
76 $I->seeElement('.modulemenu-group-icon');
77
78 $I->amGoingTo('collapse the module menu');
79 $I->click('button.t3js-topbar-button-modulemenu span[data-identifier="actions-menu"]');
80
81 $I->expectTo('see no module menu');
82 $I->cantSeeElement('.scaffold-modulemenu-expanded');
83 $I->cantSee('Web', 'span.modulemenu-group-title');
84 $I->cantSeeElement('.modulemenu-group-icon');
85
86 $I->amGoingTo('enlarge the window');
87 $I->resizeWindow(1280, 960);
88 $I->expectTo('see the module menu icon');
89 $I->seeElement('.modulemenu-group-icon');
90
91 $I->amGoingTo('expand the module menu');
92 $I->click('button.t3js-topbar-button-modulemenu span[data-identifier="actions-menu"]');
93
94 $I->expectTo('see the full module menu');
95 $I->seeElement('.scaffold-modulemenu-expanded');
96 $I->see('Web', 'span.modulemenu-group-title');
97 }
98 }