‪TYPO3CMS  10.4
CategoryTreeCest.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 
26 {
30  public function ‪_before(‪BackendTester $I)
31  {
32  $I->useExistingSession('admin');
33  }
34 
39  {
40  // A sub-element of web module is show
41  $I->waitForElementVisible('#web + .modulemenu-group-container .modulemenu-action');
42  $I->click('#web_list');
43  $I->switchToContentFrame();
44  $I->waitForElement('#recordlist-sys_category');
45  $I->seeNumberOfElements('#recordlist-sys_category table > tbody > tr', [5, 100]);
46  }
47 
52  {
53  // A sub-element of web module is show
54  $I->waitForElementVisible('#web + .modulemenu-group-container .modulemenu-action');
55  $I->click('#web_list');
56  $I->switchToContentFrame();
57  // Collapse all tables and expand category again - ensures category fits into window
58  $I->executeJS('$(\'.icon-actions-view-list-collapse\').click();');
59  $I->wait(1);
60  $I->executeJS('$(\'a[data-table="sys_category"] .icon-actions-view-list-expand\').click();');
61  $I->waitForElementVisible('#recordlist-sys_category tr[data-uid="7"] a[data-original-title="Edit record"]');
62  // Select category with id 7
63  $I->click('#recordlist-sys_category tr[data-uid="7"] a[data-original-title="Edit record"]');
64  $I->waitForText('Category', 20);
65  // Change title and level to root
66  $I->fillField('input[data-formengine-input-name="data[sys_category][7][title]"]', 'level-1-4');
67  $I->click('.identifier-0_7 text.node-name');
68  $I->click('.identifier-0_3 text.node-name');
69  $I->click('button[name="_savedok"]');
70  // Wait for tree and check if isset level-1-4
71  $I->waitForElement('.svg-tree-wrapper svg');
72  $I->waitForText('Category');
73  $I->see('level-1-4');
74  }
75 }
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\FormEngine\CategoryTreeCest\checkIfCategoryListIsAvailable
‪checkIfCategoryListIsAvailable(BackendTester $I)
Definition: CategoryTreeCest.php:38
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\FormEngine\CategoryTreeCest\editCategoryItem
‪editCategoryItem(BackendTester $I)
Definition: CategoryTreeCest.php:51
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\FormEngine\CategoryTreeCest\_before
‪_before(BackendTester $I)
Definition: CategoryTreeCest.php:30
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\FormEngine\CategoryTreeCest
Definition: CategoryTreeCest.php:26
‪TYPO3\CMS\Core\Tests\Acceptance\Support\BackendTester
Definition: BackendTester.php:27
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\FormEngine
Definition: AbstractElementsBasicCest.php:18