TYPO3 CMS  TYPO3_8-7
SearchCest.php
Go to the documentation of this file.
1 <?php
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 
19 
24 {
30  public static $topBarModuleSelector = '#typo3-cms-backend-backend-toolbaritems-livesearchtoolbaritem';
31 
35  public function _before(BackendTester $I)
36  {
37  $I->useExistingSession('admin');
38  }
39 
44  {
45  $I->cantSeeElement(self::$topBarModuleSelector . ' ' . Topbar::$dropdownListSelector);
46  $I->fillField('#live-search-box', 'adm');
47  $I->waitForElementVisible(self::$topBarModuleSelector . ' ' . Topbar::$dropdownListSelector);
48 
49  $I->canSee('Backend user', self::$topBarModuleSelector);
50  $I->click('admin', self::$topBarModuleSelector);
51 
52  $I->switchToContentFrame();
53  $I->waitForElementVisible('#EditDocumentController');
54  $I->canSee('Edit Backend user "admin" on root level');
55  }
56 
61  {
62  $I->fillField('#live-search-box', 'Kasper = Jesus # joh316');
63  $I->waitForElementVisible(self::$topBarModuleSelector . ' ' . Topbar::$dropdownListSelector, 100);
64 
65  // tod0: check why TYPO3 does not return a result for "Kasper" by itself
66  $I->canSee('No results found.', self::$topBarModuleSelector);
67 
68  $I->click(self::$topBarModuleSelector . ' .close');
69  $I->waitForElementNotVisible(self::$topBarModuleSelector . ' ' . Topbar::$dropdownListSelector, 100);
70  $I->cantSeeInField('#live-search-box', 'Kasper = Jesus # joh316');
71  }
72 
77  {
78  $I->fillField('#live-search-box', 'fileadmin');
79  $I->waitForElementVisible(self::$topBarModuleSelector . ' ' . Topbar::$dropdownListSelector);
80 
81  $I->canSee('fileadmin/ (auto-created)', self::$topBarModuleSelector);
82  $I->click('.t3js-live-search-show-all', self::$topBarModuleSelector);
83 
84  $I->switchToContentFrame();
85  $I->waitForElementVisible('form[name="dblistForm"]');
86  $I->canSee('fileadmin/ (auto-created)');
87  }
88 }