‪TYPO3CMS  11.5
ElementsBasicInputRangeCest.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 
20 use Codeception\Example;
23 
28 {
35  public function ‪_before(‪ApplicationTester $I, ‪PageTree $pageTree): void
36  {
37  $I->useExistingSession('admin');
38  $I->click('List');
39  $I->waitForElement('svg .nodes .node');
40  $pageTree->‪openPath(['styleguide TCA demo', 'elements basic']);
41  $I->switchToContentFrame();
42 
43  // Open record and wait until form is ready
44  $I->waitForText('elements basic', 20);
45  $editRecordLinkCssPath = '#recordlist-tx_styleguide_elements_basic a[aria-label="Edit record"]';
46  $I->click($editRecordLinkCssPath);
47  $I->waitForElementNotVisible('#t3js-ui-block');
48  $I->waitForText('Edit Form', 3, 'h1');
49 
50  // Make sure the test operates on the "input" tab
51  $I->click('input');
52  }
53 
57  protected function ‪simpleRangeAndMd5FieldsDataProvider(): array
58  {
59  return [
71  [
72  'label' => 'input_25',
73  'inputValue' => '2',
74  'expectedValue' => '2',
75  'expectedInternalValue' => '2',
76  'expectedValueAfterSave' => '2',
77  'comment' => '',
78  ],
79  [
80  'label' => 'input_25',
81  'inputValue' => '-1',
82  'expectedValue' => '-1',
83  'expectedInternalValue' => '-1',
84  'expectedValueAfterSave' => '-1',
85  'comment' => '',
86  ],
87  [
88  'label' => 'input_12',
89  'inputValue' => 'Kasper TYPO3!',
90  'expectedValue' => '748469dd64911af8df8f9a3dcb2c9378',
91  'expectedInternalValue' => '748469dd64911af8df8f9a3dcb2c9378',
92  'expectedValueAfterSave' => '748469dd64911af8df8f9a3dcb2c9378',
93  'comment' => '',
94  ],
95  [
96  'label' => 'input_12',
97  'inputValue' => ' Kasper TYPO3! ',
98  'expectedValue' => '792a085606250c47d6ebb8c98804d5b0',
99  'expectedInternalValue' => '792a085606250c47d6ebb8c98804d5b0',
100  'expectedValueAfterSave' => '792a085606250c47d6ebb8c98804d5b0',
101  'comment' => 'Check whitespaces are not trimmed.',
102  ],
103  ];
104  }
105 
111  public function ‪simpleRangeAndMd5Fields(‪ApplicationTester $I, Example $testData): void
112  {
113  $this->‪runInputFieldTest($I, $testData);
114  }
115 }
‪TYPO3\CMS\Core\Tests\Acceptance\Application\FormEngine\ElementsBasicInputRangeCest\simpleRangeAndMd5FieldsDataProvider
‪simpleRangeAndMd5FieldsDataProvider()
Definition: ElementsBasicInputRangeCest.php:57
‪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\ElementsBasicInputRangeCest
Definition: ElementsBasicInputRangeCest.php:28
‪TYPO3\CMS\Core\Tests\Acceptance\Application\FormEngine\ElementsBasicInputRangeCest\simpleRangeAndMd5Fields
‪simpleRangeAndMd5Fields(ApplicationTester $I, Example $testData)
Definition: ElementsBasicInputRangeCest.php:111
‪TYPO3\CMS\Core\Tests\Acceptance\Application\FormEngine\AbstractElementsBasicCest\runInputFieldTest
‪runInputFieldTest(ApplicationTester $I, Example $testData)
Definition: AbstractElementsBasicCest.php:38
‪TYPO3\CMS\Core\Tests\Acceptance\Application\FormEngine\ElementsBasicInputRangeCest\_before
‪_before(ApplicationTester $I, PageTree $pageTree)
Definition: ElementsBasicInputRangeCest.php:35
‪TYPO3\CMS\Core\Tests\Acceptance\Application\FormEngine\AbstractElementsBasicCest
Definition: AbstractElementsBasicCest.php:30
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Helper\PageTree
Definition: PageTree.php:31