‪TYPO3CMS  ‪main
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\Attribute\DataProvider;
21 use Codeception\Example;
24 
29 {
33  public function ‪_before(‪ApplicationTester $I, ‪PageTree $pageTree): void
34  {
35  $I->useExistingSession('admin');
36  $I->click('List');
37  $pageTree->‪openPath(['styleguide TCA demo', 'elements basic']);
38  $I->switchToContentFrame();
39 
40  // Open record and wait until form is ready
41  $I->waitForText('elements basic', 20);
42  $editRecordLinkCssPath = '#recordlist-tx_styleguide_elements_basic a[aria-label="Edit record"]';
43  $I->click($editRecordLinkCssPath);
44  $I->waitForElementNotVisible('#t3js-ui-block');
45  $I->waitForText('Edit Form', 3, 'h1');
46  }
47 
51  private function ‪simpleRangeAndMd5FieldsDataProvider(): array
52  {
53  return [
66  [
67  'label' => 'number_3',
68  'inputValue' => '2',
69  'expectedValue' => '2',
70  'expectedInternalValue' => '2',
71  'expectedValueAfterSave' => '2',
72  'comment' => '',
73  'tab' => 'number',
74  ],
75  [
76  'label' => 'number_3',
77  'inputValue' => '-1',
78  'expectedValue' => '-1',
79  'expectedInternalValue' => '-1',
80  'expectedValueAfterSave' => '-1',
81  'comment' => '',
82  'tab' => 'number',
83  ],
84  [
85  'label' => 'input_12',
86  'inputValue' => 'Kasper TYPO3!',
87  'expectedValue' => '748469dd64911af8df8f9a3dcb2c9378',
88  'expectedInternalValue' => '748469dd64911af8df8f9a3dcb2c9378',
89  'expectedValueAfterSave' => '748469dd64911af8df8f9a3dcb2c9378',
90  'comment' => '',
91  'tab' => 'input',
92  ],
93  [
94  'label' => 'input_12',
95  'inputValue' => ' Kasper TYPO3! ',
96  'expectedValue' => '792a085606250c47d6ebb8c98804d5b0',
97  'expectedInternalValue' => '792a085606250c47d6ebb8c98804d5b0',
98  'expectedValueAfterSave' => '792a085606250c47d6ebb8c98804d5b0',
99  'comment' => 'Check whitespaces are not trimmed.',
100  'tab' => 'input',
101  ],
102  ];
103  }
104 
105  #[DataProvider('simpleRangeAndMd5FieldsDataProvider')]
106  public function ‪simpleRangeAndMd5Fields(‪ApplicationTester $I, Example $testData): void
107  {
108  $I->click($testData['tab']);
109  $this->‪runInputFieldTest($I, $testData);
110  }
111 }
‪TYPO3\CMS\Core\Tests\Acceptance\Application\FormEngine\ElementsBasicInputRangeCest\simpleRangeAndMd5FieldsDataProvider
‪simpleRangeAndMd5FieldsDataProvider()
Definition: ElementsBasicInputRangeCest.php:51
‪TYPO3\CMS\Core\Tests\Acceptance\Application\FormEngine
Definition: AbstractElementsBasicCest.php:18
‪TYPO3\CMS\Core\Tests\Acceptance\Support\ApplicationTester
Definition: ApplicationTester.php:28
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Helper\AbstractTree\openPath
‪openPath(array $path)
Definition: AbstractTree.php:55
‪TYPO3\CMS\Core\Tests\Acceptance\Application\FormEngine\ElementsBasicInputRangeCest
Definition: ElementsBasicInputRangeCest.php:29
‪TYPO3\CMS\Core\Tests\Acceptance\Application\FormEngine\ElementsBasicInputRangeCest\simpleRangeAndMd5Fields
‪simpleRangeAndMd5Fields(ApplicationTester $I, Example $testData)
Definition: ElementsBasicInputRangeCest.php:106
‪TYPO3\CMS\Core\Tests\Acceptance\Application\FormEngine\AbstractElementsBasicCest\runInputFieldTest
‪runInputFieldTest(ApplicationTester $I, Example $testData)
Definition: AbstractElementsBasicCest.php:35
‪TYPO3\CMS\Core\Tests\Acceptance\Application\FormEngine\ElementsBasicInputRangeCest\_before
‪_before(ApplicationTester $I, PageTree $pageTree)
Definition: ElementsBasicInputRangeCest.php:33
‪TYPO3\CMS\Core\Tests\Acceptance\Application\FormEngine\AbstractElementsBasicCest
Definition: AbstractElementsBasicCest.php:31
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Helper\PageTree
Definition: PageTree.php:26