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