‪TYPO3CMS  ‪main
ElementsBasicInputEvalCest.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  // Make sure the test operates on the "input" tab
48  $I->click('input');
49  }
50 
54  private function ‪simpleEvalInputFieldsDataProvider(): array
55  {
56  return [
57  [
58  'label' => 'input_15',
59  'inputValue' => '12.335',
60  'expectedValue' => '12335',
61  'expectedInternalValue' => '12335',
62  'expectedValueAfterSave' => '12335',
63  'comment' => '',
64  ],
65  [
66  'label' => 'input_15',
67  'inputValue' => '12,9',
68  'expectedValue' => '129',
69  'expectedInternalValue' => '129',
70  'expectedValueAfterSave' => '129',
71  'comment' => '',
72  ],
73  [
74  'label' => 'input_15',
75  'inputValue' => 'TYPO3',
76  'expectedValue' => '3',
77  'expectedInternalValue' => '3',
78  'expectedValueAfterSave' => '3',
79  'comment' => '',
80  ],
81  [
82  'label' => 'input_15',
83  'inputValue' => '3TYPO',
84  'expectedValue' => '3',
85  'expectedInternalValue' => '3',
86  'expectedValueAfterSave' => '3',
87  'comment' => '',
88  ],
89  ];
90  }
91 
92  #[DataProvider('simpleEvalInputFieldsDataProvider')]
93  public function ‪simpleEvalInputFields(‪ApplicationTester $I, Example $testData): void
94  {
95  $this->‪runInputFieldTest($I, $testData);
96  }
97 }
‪TYPO3\CMS\Core\Tests\Acceptance\Application\FormEngine\ElementsBasicInputEvalCest
Definition: ElementsBasicInputEvalCest.php:29
‪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\Application\FormEngine\ElementsBasicInputEvalCest\_before
‪_before(ApplicationTester $I, PageTree $pageTree)
Definition: ElementsBasicInputEvalCest.php:33
‪TYPO3\CMS\Core\Tests\Acceptance\Application\FormEngine\ElementsBasicInputEvalCest\simpleEvalInputFieldsDataProvider
‪simpleEvalInputFieldsDataProvider()
Definition: ElementsBasicInputEvalCest.php:54
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Helper\AbstractTree\openPath
‪openPath(array $path)
Definition: AbstractTree.php:55
‪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\AbstractElementsBasicCest
Definition: AbstractElementsBasicCest.php:31
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Helper\PageTree
Definition: PageTree.php:26
‪TYPO3\CMS\Core\Tests\Acceptance\Application\FormEngine\ElementsBasicInputEvalCest\simpleEvalInputFields
‪simpleEvalInputFields(ApplicationTester $I, Example $testData)
Definition: ElementsBasicInputEvalCest.php:93