‪TYPO3CMS  10.4
SearchCest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
21 use TYPO3\TestingFramework\Core\Acceptance\Helper\Topbar;
22 
27 {
33  public static ‪$topBarModuleSelector = '#typo3-cms-backend-backend-toolbaritems-livesearchtoolbaritem';
34 
38  public function ‪_before(‪BackendTester $I)
39  {
40  $I->useExistingSession('admin');
41  }
42 
47  {
48  $I->cantSeeElement(self::$topBarModuleSelector . ' ' . Topbar::$dropdownListSelector);
49  $I->fillField('#live-search-box', 'adm');
50  $I->waitForElementVisible(self::$topBarModuleSelector . ' ' . Topbar::$dropdownListSelector);
51 
52  $I->canSee('Backend user', self::$topBarModuleSelector);
53  $I->click('admin', self::$topBarModuleSelector);
54 
55  $I->switchToContentFrame();
56  $I->waitForElementVisible('#EditDocumentController');
57  $I->canSee('Edit Backend user "admin" on root level');
58  }
59 
64  {
65  $I->fillField('#live-search-box', 'Kasper = Jesus # joh316');
66  $I->waitForElementVisible(self::$topBarModuleSelector . ' ' . Topbar::$dropdownListSelector, 100);
67 
68  // tod0: check why TYPO3 does not return a result for "Kasper" by itself
69  $I->canSee('No results found.', self::$topBarModuleSelector);
70 
71  $I->click(self::$topBarModuleSelector . ' .close');
72  $I->waitForElementNotVisible(self::$topBarModuleSelector . ' ' . Topbar::$dropdownListSelector, 100);
73  $I->cantSeeInField('#live-search-box', 'Kasper = Jesus # joh316');
74  }
75 
80  {
81  $I->fillField('#live-search-box', 'fileadmin');
82  $I->waitForElementVisible(self::$topBarModuleSelector . ' ' . Topbar::$dropdownListSelector);
83 
84  $I->canSee('fileadmin/ (auto-created)', self::$topBarModuleSelector);
85  $I->click('.t3js-live-search-show-all', self::$topBarModuleSelector);
86 
87  $I->switchToContentFrame();
88  $I->waitForElementVisible('form[name="dblistForm"]');
89  $I->canSee('fileadmin/ (auto-created)');
90  }
91 }
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\Topbar\SearchCest\_before
‪_before(BackendTester $I)
Definition: SearchCest.php:37
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\Topbar\SearchCest\searchForFancyTextAndCheckEmptyResultInfo
‪searchForFancyTextAndCheckEmptyResultInfo(BackendTester $I)
Definition: SearchCest.php:62
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\Topbar\SearchCest
Definition: SearchCest.php:27
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\Topbar
Definition: BookmarkCest.php:18
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\Topbar\SearchCest\checkIfTheShowAllLinkPointsToTheListViewWithSearchResults
‪checkIfTheShowAllLinkPointsToTheListViewWithSearchResults(BackendTester $I)
Definition: SearchCest.php:78
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\Topbar\SearchCest\searchAndTestIfAutocompletionWorks
‪searchAndTestIfAutocompletionWorks(BackendTester $I)
Definition: SearchCest.php:45
‪TYPO3\CMS\Core\Tests\Acceptance\Support\BackendTester
Definition: BackendTester.php:27
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\Topbar\SearchCest\$topBarModuleSelector
‪static string $topBarModuleSelector
Definition: SearchCest.php:32