‪TYPO3CMS  11.5
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(‪ApplicationTester $I): void
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(‪ApplicationTester $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\Application\BackendUser\ListGroupCest
Definition: ListGroupCest.php:26
‪TYPO3\CMS\Core\Tests\Acceptance\Application\BackendUser\ListGroupCest\canEditBeGroupsFromListView
‪canEditBeGroupsFromListView(ApplicationTester $I)
Definition: ListGroupCest.php:46
‪TYPO3\CMS\Core\Tests\Acceptance\Application\BackendUser\ListGroupCest\openAndCloseTheEditForm
‪openAndCloseTheEditForm(ApplicationTester $I, string $groupName)
Definition: ListGroupCest.php:74
‪TYPO3\CMS\Core\Tests\Acceptance\Support\ApplicationTester
Definition: ApplicationTester.php:27
‪TYPO3\CMS\Core\Tests\Acceptance\Application\BackendUser\ListGroupCest\canEditSubGroupFromListView
‪canEditSubGroupFromListView(ApplicationTester $I)
Definition: ListGroupCest.php:62
‪TYPO3\CMS\Core\Tests\Acceptance\Application\BackendUser
Definition: CompareUserCest.php:18
‪TYPO3\CMS\Core\Tests\Acceptance\Application\BackendUser\ListGroupCest\_before
‪_before(ApplicationTester $I)
Definition: ListGroupCest.php:30