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