‪TYPO3CMS  ‪main
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 
25 final class ‪ListGroupCest
26 {
27  public function ‪_before(‪ApplicationTester $I): void
28  {
29  $I->useExistingSession('admin');
30 
31  $I->see('Backend Users');
32  $I->click('Backend Users');
33 
34  $I->switchToContentFrame();
35  $I->selectOption('div.module-docheader select.t3-js-jumpMenuBox', 'Backend user groups');
36  $I->waitForElementVisible('table.table-striped');
37  $I->canSee('Backend user groups', 'h1');
38  }
39 
41  {
42  $groupname = $I->grabTextFrom('table.table-striped > tbody > tr:nth-child(1) > td.title > a > b');
43 
44  $I->amGoingTo('test edit on group name');
45  $I->click('table.table-striped > tbody > tr:nth-child(1) > td.title > a');
46  $this->‪openAndCloseTheEditForm($I, $groupname);
47 
48  $I->amGoingTo('test edit on edit button');
49  $I->click('table.table-striped > tbody > tr:nth-child(1) > td.col-control > div:nth-child(1) > a:nth-child(1)');
50  $this->‪openAndCloseTheEditForm($I, $groupname);
51  }
52 
54  {
55  $I->amGoingTo('test the subgroup edit form');
56  $groupname = $I->grabTextFrom('table.table-striped > tbody > tr:nth-child(2) > td:nth-child(3) > a:nth-child(1)');
57  $I->click('table.table-striped > tbody > tr:nth-child(2) > td:nth-child(3) > a:nth-child(1)');
58  $this->‪openAndCloseTheEditForm($I, $groupname);
59  }
60 
61  private function ‪openAndCloseTheEditForm(‪ApplicationTester $I, string $groupName): void
62  {
63  $I->wait(3);
64  $I->waitForText('Edit Backend usergroup "' . $groupName . '" on root level', 120);
65  $I->see('Edit Backend usergroup "' . $groupName . '" on root level', 'h1');
66 
67  $I->click('div.module-docheader .btn.t3js-editform-close');
68  $I->wait(3);
69  $I->waitForElementVisible('table.table-striped');
70  $I->waitForText('Backend user groups', 120);
71  $I->see('Backend user groups', 'h1');
72  }
73 }
‪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:40
‪TYPO3\CMS\Core\Tests\Acceptance\Application\BackendUser\ListGroupCest\openAndCloseTheEditForm
‪openAndCloseTheEditForm(ApplicationTester $I, string $groupName)
Definition: ListGroupCest.php:61
‪TYPO3\CMS\Core\Tests\Acceptance\Support\ApplicationTester
Definition: ApplicationTester.php:28
‪TYPO3\CMS\Core\Tests\Acceptance\Application\BackendUser\ListGroupCest\canEditSubGroupFromListView
‪canEditSubGroupFromListView(ApplicationTester $I)
Definition: ListGroupCest.php:53
‪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:27