‪TYPO3CMS  9.5
CompareUserCest.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  $I->switchToContentFrame();
35  }
36 
41  {
42  // put two users into compare list
43  $I->see('Backend User Listing');
44  $I->click('#typo3-backend-user-list > tbody > tr:nth-child(1) > td.col-control > div:nth-child(3) > a');
45  $I->waitForElementVisible('table#typo3-backend-user-list');
46  $I->click('#typo3-backend-user-list > tbody > tr:nth-child(2) > td.col-control > div:nth-child(3) > a');
47  $I->waitForElementVisible('table#typo3-backend-user-list-compare', 20);
48  $I->canSeeNumberOfElements('#typo3-backend-user-list-compare tbody tr', 2);
49  $I->click('body > div > div.module-body.t3js-module-body > form:nth-child(4) > input');
50  $I->waitForElementVisible('table.table-striped');
51 
52  // first user can be edited
53  $usernameFirstCompare = $I->grabTextFrom('#tx_beuser_compare > thead > tr > th:nth-child(2)');
54  $I->click('#tx_beuser_compare > thead > tr > th:nth-child(2) > a.btn.btn-default.pull-right');
55  $I->waitForElementNotVisible('#t3js-ui-block');
56  $I->waitForElementVisible('#EditDocumentController');
57  $I->canSee('Edit Backend user "' . $usernameFirstCompare . '" on root level');
58 
59  // back to compare view
60  $I->click('.module-docheader .btn.t3js-editform-close');
61  $I->waitForElementVisible('table.table-striped');
62  $I->canSee('Compare backend users', 'h1');
63 
64  // second user can be edited
65  $usernameFirstCompare = $I->grabTextFrom('#tx_beuser_compare > thead > tr > th:nth-child(3)');
66  $I->click('#tx_beuser_compare > thead > tr > th:nth-child(3) > a.btn.btn-default.pull-right');
67  $I->waitForElementNotVisible('#t3js-ui-block');
68  $I->waitForElementVisible('#EditDocumentController');
69  $I->canSee('Edit Backend user "' . $usernameFirstCompare . '" on root level');
70  }
71 }
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\BackendUser\CompareUserCest
Definition: CompareUserCest.php:24
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\BackendUser\CompareUserCest\editingBeUserRecordsFromCompareViewWorks
‪editingBeUserRecordsFromCompareViewWorks(BackendTester $I)
Definition: CompareUserCest.php:40
‪TYPO3\CMS\Core\Tests\Acceptance\Support\BackendTester
Definition: BackendTester.php:25
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\BackendUser\CompareUserCest\_before
‪_before(BackendTester $I)
Definition: CompareUserCest.php:28
‪TYPO3\CMS\Core\Tests\Acceptance\Backend\BackendUser
Definition: CompareUserCest.php:3