[TASK] Acceptance test for NavigationComponent Tree 90/50390/2
authorGordon Br├╝ggemann <gordon.brueggemann@di-unternehmer.com>
Wed, 26 Oct 2016 15:46:21 +0000 (17:46 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 26 Oct 2016 17:30:07 +0000 (19:30 +0200)
Resolves: #78452
Releases: master
Change-Id: I097a9572662e7a4f36f1e0899b92fd2c41b89afe
Reviewed-on: https://review.typo3.org/50390
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Tests/Acceptance/Backend/Topbar/NavigationComponentTreeCest.php [new file with mode: 0644]

diff --git a/typo3/sysext/core/Tests/Acceptance/Backend/Topbar/NavigationComponentTreeCest.php b/typo3/sysext/core/Tests/Acceptance/Backend/Topbar/NavigationComponentTreeCest.php
new file mode 100644 (file)
index 0000000..93e5cb1
--- /dev/null
@@ -0,0 +1,74 @@
+<?php
+namespace TYPO3\CMS\Core\Tests\Acceptance\Backend\Topbar;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Core\Tests\Acceptance\Step\Backend\Admin;
+
+/**
+ * Acceptance test for the Navigation Component Tree
+ */
+class NavigationComponentTreeCest
+{
+    /**
+     * @param Admin $I
+     */
+    public function _before(Admin $I)
+    {
+        $I->useExistingSession();
+    }
+
+    /**
+     * @param Admin $I
+     */
+    public function checkTreefExpandsAndCollapseByPageModule(Admin $I)
+    {
+        $treeArea = '.scaffold-content-navigation-expanded';
+        $I->wantTo('check Page Module for Expands And Collapse');
+        $I->click('Page');
+        $I->waitForElement($treeArea);
+        $I->see('New TYPO3 site', $treeArea);
+        $I->wantTo('check Page Module for Collapse');
+        $I->click('button.t3js-topbar-button-navigationcomponent');
+        $I->waitForElementNotVisible($treeArea);
+        $I->cantSee('New TYPO3 site', $treeArea);
+        $I->wantTo('check Page Module for Expands');
+        $I->click('button.t3js-topbar-button-navigationcomponent');
+        $I->waitForElement($treeArea);
+
+        $I->see('New TYPO3 site', $treeArea);
+    }
+
+    /**
+     * @param Admin $I
+     */
+    public function checkTreefExpandsAndCollapseByFileModule(Admin $I)
+    {
+        $I->wantTo('check File Module for Expands And Collapse');
+        $I->click('Filelist');
+        $I->switchToIFrame('nav_frame');
+        $I->see('fileadmin', '.t3js-module-body');
+        $I->switchToIFrame();
+        $I->wantTo('check File Module for Collapse');
+        $I->click('button.t3js-topbar-button-navigationcomponent');
+        $I->switchToIFrame('nav_frame');
+        $I->cantSee('fileadmin', '.t3js-module-body');
+        $I->switchToIFrame();
+        $I->wantTo('check File Module for Expands');
+        $I->click('button.t3js-topbar-button-navigationcomponent');
+        $I->switchToIFrame('nav_frame');
+        $I->see('fileadmin', '.t3js-module-body');
+        $I->switchToIFrame();
+    }
+}