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