Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX] Bring back valuePicker for TCA type
email
While extracting dedicated TCA types from the god type `input`, the `valuePicker` option was forgotten for type `email`. Other types like `number` do have this option. An acceptance test is added to ensure this option will not be dropped by accident in the future. Resolves: #103510 Related: #97013 Releases: main, 12.4 Change-Id: I95c51d858ca9cb3caefa174cd8ce5946c8352aa2 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83639 Tested-by: Nikita Hovratov <nikita.h@live.de> Reviewed-by: Nikita Hovratov <nikita.h@live.de> Tested-by: core-ci <typo3@b13.com>
- Loading branch information
Showing
2 changed files
with
102 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
typo3/sysext/core/Tests/Acceptance/Application/FormEngine/ElementsBasicEmailCest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the TYPO3 CMS project. | ||
* | ||
* It is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License, either version 2 | ||
* of the License, or any later version. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* The TYPO3 project - inspiring people to share! | ||
*/ | ||
|
||
namespace TYPO3\CMS\Core\Tests\Acceptance\Application\FormEngine; | ||
|
||
use Codeception\Attribute\DataProvider; | ||
use Codeception\Example; | ||
use TYPO3\CMS\Core\Tests\Acceptance\Support\ApplicationTester; | ||
use TYPO3\CMS\Core\Tests\Acceptance\Support\Helper\PageTree; | ||
|
||
/** | ||
* Tests for "elements_basic" simple input fields of ext:styleguide | ||
*/ | ||
final class ElementsBasicEmailCest extends AbstractElementsBasicCest | ||
{ | ||
/** | ||
* Open list module of styleguide elements basic page | ||
*/ | ||
public function _before(ApplicationTester $I, PageTree $pageTree): void | ||
{ | ||
$I->useExistingSession('admin'); | ||
$I->click('List'); | ||
$pageTree->openPath(['styleguide TCA demo', 'elements basic']); | ||
// Wait until DOM actually rendered everything | ||
$I->switchToContentFrame(); | ||
|
||
// Open record and wait until form is ready | ||
$I->waitForText('elements basic', 20); | ||
$editRecordLinkCssPath = '#recordlist-tx_styleguide_elements_basic a[aria-label="Edit record"]'; | ||
$I->click($editRecordLinkCssPath); | ||
$I->waitForElementNotVisible('#t3js-ui-block'); | ||
$I->waitForText('Edit Form', 3, 'h1'); | ||
|
||
// Make sure the test operates on the "email" tab | ||
$I->click('input'); | ||
} | ||
|
||
/** | ||
* Data provider to check various type=email variants | ||
*/ | ||
private function emailFieldsDataProvider(): array | ||
{ | ||
return [ | ||
[ | ||
'label' => 'input_39', | ||
'inputValue' => 'foo@example.com', | ||
'expectedValue' => 'foo@example.com', | ||
'expectedInternalValue' => 'foo@example.com', | ||
'expectedValueAfterSave' => 'foo@example.com', | ||
'comment' => '', | ||
], | ||
]; | ||
} | ||
|
||
#[DataProvider('emailFieldsDataProvider')] | ||
public function emailFields(ApplicationTester $I, Example $testData): void | ||
{ | ||
$this->runInputFieldTest($I, $testData); | ||
} | ||
} |