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