TYPO3 CMS  TYPO3_8-7
ElementsBasicInputRangeCest.php
Go to the documentation of this file.
1 <?php
2 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 
21 
26 {
33  public function _before(BackendTester $I, PageTree $pageTree)
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[data-original-title="Edit record"]';
43  $I->click($editRecordLinkCssPath);
44  $I->waitForElementNotVisible('#t3js-ui-block');
45  $I->waitForText('Edit Form', 3, 'h1');
46  }
47 
52  {
53  return [
65  [
66  'label' => 'input_25 eval=int, default=0, range lower=-2, range upper=2',
67  'inputValue' => '2',
68  'expectedValue' => '2',
69  'expectedInternalValue' => '2',
70  'expectedValueAfterSave' => '2',
71  'comment' => '',
72  ],
73  [
74  'label' => 'input_25 eval=int, default=0, range lower=-2, range upper=2',
75  'inputValue' => '-1',
76  'expectedValue' => '-1',
77  'expectedInternalValue' => '-1',
78  'expectedValueAfterSave' => '-1',
79  'comment' => '',
80  ],
81  [
82  'label' => 'input_12 eval=md5',
83  'inputValue' => 'Kasper TYPO3!',
84  'expectedValue' => '748469dd64911af8df8f9a3dcb2c9378',
85  'expectedInternalValue' => '748469dd64911af8df8f9a3dcb2c9378',
86  'expectedValueAfterSave' => '748469dd64911af8df8f9a3dcb2c9378',
87  'comment' => '',
88  ],
89  [
90  'label' => 'input_12 eval=md5',
91  'inputValue' => ' Kasper TYPO3! ',
92  'expectedValue' => '792a085606250c47d6ebb8c98804d5b0',
93  'expectedInternalValue' => '792a085606250c47d6ebb8c98804d5b0',
94  'expectedValueAfterSave' => '792a085606250c47d6ebb8c98804d5b0',
95  'comment' => 'Check whitespaces are not trimmed.',
96  ],
97  ];
98  }
99 
105  public function simpleRangeAndMd5Fields(BackendTester $I, Example $testData)
106  {
107  $this->runInputFieldTest($I, $testData);
108  }
109 }