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