2 namespace TYPO3\CMS\Core\Tests\Acceptance\Backend\Topbar
;
5 * This file is part of the TYPO3 CMS project.
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.
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
14 * The TYPO3 project - inspiring people to share!
17 use TYPO3\TestingFramework\Core\Acceptance\Step\Backend\Admin
;
18 use TYPO3\TestingFramework\Core\Acceptance\Support\Helper\Topbar
;
21 * Test the search module in the top bar
26 * Selector for the module container in the topbar
30 public static $topBarModuleSelector = '#typo3-cms-backend-backend-toolbaritems-livesearchtoolbaritem';
35 public function _before(Admin
$I)
37 $I->useExistingSession();
43 public function searchAndTestIfAutocompletionWorks(Admin
$I)
45 $I->cantSeeElement(self
::$topBarModuleSelector . ' ' . Topbar
::$dropdownListSelector);
46 $I->fillField('#live-search-box', 'adm');
47 $I->waitForElementVisible(self
::$topBarModuleSelector . ' ' . Topbar
::$dropdownListSelector);
49 $I->canSee('Backend user', self
::$topBarModuleSelector);
50 $I->click('admin', self
::$topBarModuleSelector);
52 $I->switchToContentFrame();
53 $I->waitForElementVisible('#EditDocumentController');
54 $I->canSee('Edit Backend user "admin" on root level');
60 public function searchForFancyTextAndCheckEmptyResultInfo(Admin
$I)
62 $I->fillField('#live-search-box', 'Kasper = Jesus # joh316');
63 $I->waitForElementVisible(self
::$topBarModuleSelector . ' ' . Topbar
::$dropdownListSelector, 100);
65 // tod0: check why TYPO3 does not return a result for "Kasper" by itself
66 $I->canSee('No results found.', self
::$topBarModuleSelector);
68 $I->click(self
::$topBarModuleSelector . ' .close');
69 $I->waitForElementNotVisible(self
::$topBarModuleSelector . ' ' . Topbar
::$dropdownListSelector, 100);
70 $I->cantSeeInField('#live-search-box', 'Kasper = Jesus # joh316');
76 public function checkIfTheShowAllLinkPointsToTheListViewWithSearchResults(Admin
$I)
78 $I->fillField('#live-search-box', 'fileadmin');
79 $I->waitForElementVisible(self
::$topBarModuleSelector . ' ' . Topbar
::$dropdownListSelector);
81 $I->canSee('fileadmin/ (auto-created)', self
::$topBarModuleSelector);
82 $I->click('.t3js-live-search-show-all', self
::$topBarModuleSelector);
84 $I->switchToContentFrame();
85 $I->waitForElementVisible('form[name="dblistForm"]');
86 $I->canSee('fileadmin/ (auto-created)');