‪TYPO3CMS  11.5
NullPlaceholderCest.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 
22 
27 {
31  public function ‪_before(‪ApplicationTester $I, ‪PageTree $pageTree): void
32  {
33  $I->useExistingSession('admin');
34  $this->‪goToListModule($I, $pageTree);
35  }
36 
43  {
44  $I->amGoingTo('Check if deactivating null checkboxes marks as "changed"');
45 
46  $editRecordLinkCssPath = '#recordlist-tx_styleguide_inline_fal a[aria-label="Edit record"]';
47  $I->click($editRecordLinkCssPath);
48 
49  $I->waitForElementNotVisible('#t3js-ui-block');
50  $I->waitForText('Edit Form engine - inline fal "1" on page "inline fal"');
51  $I->click('typical fal');
52  $I->click('.form-irre-header');
53  $I->waitForElementNotVisible('.nprogress-custom-parent');
54 
55  $I->amGoingTo('enable checkboxes and see whether the fields get marked as changed');
56  foreach (['title', 'alternative', 'description'] as $fieldName) {
57  $currentCheckboxSelector = '//input[contains(@name, "[' . $fieldName . ']") and @type="checkbox" and contains(@name, "control[active][sys_file_reference]")]';
58  $I->checkOption($currentCheckboxSelector);
59  $I->seeElement($currentCheckboxSelector . '/./ancestor::div[contains(concat(\' \', @class, \' \'), \'has-change\')]');
60 
61  // Remove focus from field, otherwise codeception can't find other checkboxes
62  $I->click('.form-irre-object .form-section');
63  }
64  }
65 
71  private function ‪goToListModule(‪ApplicationTester $I, ‪PageTree $pageTree): void
72  {
73  $I->switchToMainFrame();
74  $I->click('List');
75  $I->waitForElement('svg .nodes .node');
76  $pageTree->‪openPath(['styleguide TCA demo', 'inline fal']);
77  $I->switchToContentFrame();
78  $I->waitForText('inline fal');
79  }
80 }
‪TYPO3\CMS\Core\Tests\Acceptance\Application\FormEngine
Definition: AbstractElementsBasicCest.php:18
‪TYPO3\CMS\Core\Tests\Acceptance\Support\ApplicationTester
Definition: ApplicationTester.php:27
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Helper\PageTree\openPath
‪openPath(array $path)
Definition: PageTree.php:76
‪TYPO3\CMS\Core\Tests\Acceptance\Application\FormEngine\NullPlaceholderCest\goToListModule
‪goToListModule(ApplicationTester $I, PageTree $pageTree)
Definition: NullPlaceholderCest.php:71
‪TYPO3\CMS\Core\Tests\Acceptance\Application\FormEngine\NullPlaceholderCest\checkIfDeactivatingNullCheckboxesMarksAsChanged
‪checkIfDeactivatingNullCheckboxesMarksAsChanged(ApplicationTester $I)
Definition: NullPlaceholderCest.php:42
‪TYPO3\CMS\Core\Tests\Acceptance\Application\FormEngine\NullPlaceholderCest\_before
‪_before(ApplicationTester $I, PageTree $pageTree)
Definition: NullPlaceholderCest.php:31
‪TYPO3\CMS\Core\Tests\Acceptance\Application\FormEngine\NullPlaceholderCest
Definition: NullPlaceholderCest.php:27
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Helper\PageTree
Definition: PageTree.php:31