[BUGFIX] Streamline iframe namings for new backend
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Tests / Acceptance / Backend / Topbar / HelpCest.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\Step\Backend\Admin;
18 use TYPO3\CMS\Core\Tests\Acceptance\Support\Helper\Topbar;
19
20 /**
21 * Tests for the help module in the topbar
22 */
23 class HelpCest
24 {
25 /**
26 * Selector for the module container in the topbar
27 *
28 * @var string
29 */
30 public static $topBarModuleSelector = '#typo3-cms-backend-backend-toolbaritems-helptoolbaritem';
31
32 /**
33 * @param Admin $I
34 */
35 public function _before(Admin $I)
36 {
37 $I->useExistingSession();
38 // Ensure main content frame is fully loaded, otherwise there are load-race-conditions
39 $I->switchToIFrame('list_frame');
40 $I->waitForText('Web Content Management System');
41 $I->switchToIFrame();
42 }
43
44 /**
45 * @param Admin $I
46 * @return Admin
47 */
48 public function canSeeModuleInTopbar(Admin $I)
49 {
50 $I->canSeeElement(self::$topBarModuleSelector);
51
52 return $I;
53 }
54
55 /**
56 * @depends canSeeModuleInTopbar
57 * @param Admin $I
58 */
59 public function seeStyleguideInHelpModule(Admin $I)
60 {
61 $I->click(Topbar::$dropdownToggleSelector, self::$topBarModuleSelector);
62 $I->canSee('Styleguide', self::$topBarModuleSelector);
63 $I->click('Styleguide', self::$topBarModuleSelector);
64 $I->switchToIFrame('list_frame');
65 $I->see('TYPO3 CMS Backend Styleguide', 'h1');
66 }
67 }