‪TYPO3CMS  9.5
ListGroupCest.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  $I->see('Backend users');
33  $I->click('Backend users');
34 
35  $I->switchToContentFrame();
36  $I->selectOption('div.module-docheader select.t3-js-jumpMenuBox', 'Backend user groups');
37  $I->waitForElementVisible('table.table-striped');
38  $I->canSee('Backend User Group Listing', 'h1');
39  }
40 
45  {
46  $groupname = $I->grabTextFrom('table.table-striped > tbody > tr:nth-child(1) > td.col-title > a > b');
47 
48  $I->amGoingTo('test edit on group name');
49  $I->click('table.table-striped > tbody > tr:nth-child(1) > td.col-title > a');
50  $this->‪openAndCloseTheEditForm($I, $groupname);
51 
52  $I->amGoingTo('test edit on edit button');
53  $I->click('table.table-striped > tbody > tr:nth-child(1) > td.col-control > div:nth-child(1) > a:nth-child(1)');
54  $this->‪openAndCloseTheEditForm($I, $groupname);
55  }
56 
61  {
62  $I->amGoingTo('test the subgroup edit form');
63  $groupname = $I->grabTextFrom('table.table-striped > tbody > tr:nth-child(2) > td:nth-child(3) > a:nth-child(1)');
64  $I->click('table.table-striped > tbody > tr:nth-child(2) > td:nth-child(3) > a:nth-child(1)');
65  $this->‪openAndCloseTheEditForm($I, $groupname);
66  }
67 
72  private function ‪openAndCloseTheEditForm(‪BackendTester $I, string $groupName): void
73  {
74  $I->waitForText('Edit Backend usergroup "' . $groupName . '" on root level', 120);
75  $I->see('Edit Backend usergroup "' . $groupName . '" on root level', 'h1');
76 
77  $I->click('div.module-docheader .btn.t3js-editform-close');
78  $I->waitForElementVisible('table.table-striped');
79  $I->waitForText('Backend User Group Listing', 120);
80  $I->see('Backend User Group Listing', 'h1');
81  }
82 }
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\BackendUser\ListGroupCest
Definition: ListGroupCest.php:24
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\BackendUser\ListGroupCest\openAndCloseTheEditForm
‪openAndCloseTheEditForm(BackendTester $I, string $groupName)
Definition: ListGroupCest.php:72
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\BackendUser\ListGroupCest\canEditBeGroupsFromListView
‪canEditBeGroupsFromListView(BackendTester $I)
Definition: ListGroupCest.php:44
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\BackendUser\ListGroupCest\_before
‪_before(BackendTester $I)
Definition: ListGroupCest.php:28
‪TYPO3\CMS\Core\Tests\Acceptance\Support\BackendTester
Definition: BackendTester.php:25
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\BackendUser\ListGroupCest\canEditSubGroupFromListView
‪canEditSubGroupFromListView(BackendTester $I)
Definition: ListGroupCest.php:60
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\BackendUser
Definition: CompareUserCest.php:3