Skip to content

Commit

Permalink
[TASK] Update to typo3/cms-styleguide:~11.1.0
Browse files Browse the repository at this point in the history
composer req --dev typo3/cms-styleguide:~11.1.0

New version brings a series of field label changes. The
FormEngine acceptance tests need a slight xpath adaption
to deal with this, which also stabilizes the selectors a bit.

Change-Id: I3b4ac800b3d9303228ed652f23aaf2d6c773274d
Resolves: #93673
Releases: master
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/68232
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Oliver Bartsch <bo@cedev.de>
Tested-by: Richard Haeser <richard@richardhaeser.com>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
Reviewed-by: Richard Haeser <richard@richardhaeser.com>
  • Loading branch information
lolli42 authored and haassie committed Mar 8, 2021
1 parent d9daf64 commit 121812e
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 50 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -95,7 +95,7 @@
"phpspec/prophecy": "^1.12.2",
"phpstan/phpstan": "^0.12.64",
"phpunit/phpunit": "^8.5.13",
"typo3/cms-styleguide": "~11.0.2",
"typo3/cms-styleguide": "~11.1.0",
"typo3/testing-framework": "^6.6.3"
},
"suggest": {
Expand Down
25 changes: 13 additions & 12 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -40,7 +40,7 @@ abstract class AbstractElementsBasicCest
protected function runInputFieldTest(BackendTester $I, Example $testData)
{
$fieldLabel = $testData['label'];
$initializedInputFieldXpath = '(//label[contains(text(),"' . $fieldLabel . '")])'
$initializedInputFieldXpath = '(//label/code[contains(text(),"[' . $fieldLabel . ']")]/..)'
. '[1]/parent::*//*/input[@data-formengine-input-name][@data-formengine-input-initialized]';

// Wait until JS initialized everything
Expand Down Expand Up @@ -122,7 +122,7 @@ protected function getFormSectionByFieldLabel(BackendTester $I, string $fieldLab
function (RemoteWebDriver $webDriver) use ($fieldLabel) {
return $webDriver->findElement(
\Facebook\WebDriver\WebDriverBy::xpath(
'(//label[contains(text(),"' . $fieldLabel . '")])[1]/ancestor::fieldset[@class="form-section"][1]'
'(//label/code[contains(text(),"[' . $fieldLabel . ']")]/..)[1]/ancestor::fieldset[@class="form-section"][1]'
)
);
}
Expand Down
Expand Up @@ -54,55 +54,55 @@ protected function simpleEvalInputFieldsDataProvider()
{
return [
[
'label' => 'input_8 eval=double2',
'label' => 'input_8',
'inputValue' => '12.335',
'expectedValue' => '12.34',
'expectedInternalValue' => '12.34',
'expectedValueAfterSave' => '12.34',
'comment' => '',
],
[
'label' => 'input_8 eval=double2',
'label' => 'input_8',
'inputValue' => '12,335', // comma as delimiter
'expectedValue' => '12.34',
'expectedInternalValue' => '12.34',
'expectedValueAfterSave' => '12.34',
'comment' => '',
],
[
'label' => 'input_8 eval=double2',
'label' => 'input_8',
'inputValue' => '1.1', // dot as delimiter
'expectedValue' => '1.10',
'expectedInternalValue' => '1.10',
'expectedValueAfterSave' => '1.10',
'comment' => '',
],
[
'label' => 'input_8 eval=double2',
'label' => 'input_8',
'inputValue' => 'TYPO3', // word having a number at end
'expectedValue' => '3.00',
'expectedInternalValue' => '3.00',
'expectedValueAfterSave' => '3.00',
'comment' => '',
],
[
'label' => 'input_8 eval=double2',
'label' => 'input_8',
'inputValue' => '3TYPO', // word having a number in front
'expectedValue' => '3.00',
'expectedInternalValue' => '3.00',
'expectedValueAfterSave' => '3.00',
'comment' => '',
],
[
'label' => 'input_9 eval=int',
'label' => 'input_9',
'inputValue' => '12.335',
'expectedValue' => '12',
'expectedInternalValue' => '12',
'expectedValueAfterSave' => '12',
'comment' => '',
],
[
'label' => 'input_9 eval=int',
'label' => 'input_9',
'inputValue' => '12,9',
'expectedValue' => '129',
'expectedInternalValue' => '129',
Expand All @@ -112,7 +112,7 @@ protected function simpleEvalInputFieldsDataProvider()
/**
[
// @todo this one probably broke with the html type="number" patch
'label' => 'input_9 eval=int',
'label' => 'input_9',
'inputValue' => 'TYPO3',
'expectedValue' => '0',
'expectedInternalValue' => '0',
Expand All @@ -121,39 +121,39 @@ protected function simpleEvalInputFieldsDataProvider()
],
*/
[
'label' => 'input_9 eval=int',
'label' => 'input_9',
'inputValue' => '3TYPO',
'expectedValue' => '3',
'expectedInternalValue' => '3',
'expectedValueAfterSave' => '3',
'comment' => '',
],
[
'label' => 'input_15 eval=num',
'label' => 'input_15',
'inputValue' => '12.335',
'expectedValue' => '12335',
'expectedInternalValue' => '12335',
'expectedValueAfterSave' => '12335',
'comment' => '',
],
[
'label' => 'input_15 eval=num',
'label' => 'input_15',
'inputValue' => '12,9',
'expectedValue' => '129',
'expectedInternalValue' => '129',
'expectedValueAfterSave' => '129',
'comment' => '',
],
[
'label' => 'input_15 eval=num',
'label' => 'input_15',
'inputValue' => 'TYPO3',
'expectedValue' => '3',
'expectedInternalValue' => '3',
'expectedValueAfterSave' => '3',
'comment' => '',
],
[
'label' => 'input_15 eval=num',
'label' => 'input_15',
'inputValue' => '3TYPO',
'expectedValue' => '3',
'expectedInternalValue' => '3',
Expand Down
Expand Up @@ -66,7 +66,7 @@ protected function simpleRangeAndMd5FieldsDataProvider()
/**
[
// @todo this one probably broke with the type="number" patch
'label' => 'input_25 eval=int, default=0, range lower=-2, range upper=2',
'label' => 'input_25',
'inputValue' => 'Kasper TYPO3',
'expectedValue' => '0',
'expectedInternalValue' => '0',
Expand All @@ -75,31 +75,31 @@ protected function simpleRangeAndMd5FieldsDataProvider()
],
*/
[
'label' => 'input_25 eval=int default=0 range lower=-2 range upper=2',
'label' => 'input_25',
'inputValue' => '2',
'expectedValue' => '2',
'expectedInternalValue' => '2',
'expectedValueAfterSave' => '2',
'comment' => '',
],
[
'label' => 'input_25 eval=int default=0 range lower=-2 range upper=2',
'label' => 'input_25',
'inputValue' => '-1',
'expectedValue' => '-1',
'expectedInternalValue' => '-1',
'expectedValueAfterSave' => '-1',
'comment' => '',
],
[
'label' => 'input_12 eval=md5',
'label' => 'input_12',
'inputValue' => 'Kasper TYPO3!',
'expectedValue' => '748469dd64911af8df8f9a3dcb2c9378',
'expectedInternalValue' => '748469dd64911af8df8f9a3dcb2c9378',
'expectedValueAfterSave' => '748469dd64911af8df8f9a3dcb2c9378',
'comment' => '',
],
[
'label' => 'input_12 eval=md5',
'label' => 'input_12',
'inputValue' => ' Kasper TYPO3! ',
'expectedValue' => '792a085606250c47d6ebb8c98804d5b0',
'expectedInternalValue' => '792a085606250c47d6ebb8c98804d5b0',
Expand Down
Expand Up @@ -62,127 +62,127 @@ protected function simpleInputFieldsDataProvider()
'comment' => '',
],
[
'label' => 'input_2, size=10',
'label' => 'input_2',
'inputValue' => 'This is a demo text with numbers and other characters 42 #!',
'expectedValue' => 'This is a demo text with numbers and other characters 42 #!',
'expectedInternalValue' => 'This is a demo text with numbers and other characters 42 #!',
'expectedValueAfterSave' => 'This is a demo text with numbers and other characters 42 #!',
'comment' => '',
],
[
'label' => 'input_3 max=4',
'label' => 'input_3',
'inputValue' => 'Kasper',
'expectedValue' => 'Kasp',
'expectedInternalValue' => 'Kasp',
'expectedValueAfterSave' => 'Kasp',
'comment' => '',
],
[
'label' => 'input_4 eval=alpha',
'label' => 'input_4',
'inputValue' => 'Kasper = TYPO3',
'expectedValue' => 'KasperTYPO',
'expectedInternalValue' => 'KasperTYPO',
'expectedValueAfterSave' => 'KasperTYPO',
'comment' => '',
],
[
'label' => 'input_4 eval=alpha',
'label' => 'input_4',
'inputValue' => 'Non-latin characters: ŠĐŽĆČ',
'expectedValue' => 'Nonlatincharacters',
'expectedInternalValue' => 'Nonlatincharacters',
'expectedValueAfterSave' => 'Nonlatincharacters',
'comment' => '',
],
[
'label' => 'input_5 eval=alphanum',
'label' => 'input_5',
'inputValue' => 'Kasper = TYPO3',
'expectedValue' => 'KasperTYPO3',
'expectedInternalValue' => 'KasperTYPO3',
'expectedValueAfterSave' => 'KasperTYPO3',
'comment' => '',
],
[
'label' => 'input_10 eval=is_in is_in=abc123',
'label' => 'input_10',
'inputValue' => 'abcd1234',
'expectedValue' => 'abc123',
'expectedInternalValue' => 'abc123',
'expectedValueAfterSave' => 'abc123',
'comment' => '',
],
[
'label' => 'input_10 eval=is_in is_in=abc123',
'label' => 'input_10',
'inputValue' => 'Kasper TYPO3',
'expectedValue' => 'a3',
'expectedInternalValue' => 'a3',
'expectedValueAfterSave' => 'a3',
'comment' => '',
],
[
'label' => 'input_11 eval=lower',
'label' => 'input_11',
'inputValue' => 'Kasper TYPO3!',
'expectedValue' => 'kasper typo3!',
'expectedInternalValue' => 'kasper typo3!',
'expectedValueAfterSave' => 'kasper typo3!',
'comment' => '',
],
[
'label' => 'input_13 eval=nospace',
'label' => 'input_13',
'inputValue' => ' Kasper TYPO3! ',
'expectedValue' => 'KasperTYPO3!',
'expectedInternalValue' => 'KasperTYPO3!',
'expectedValueAfterSave' => 'KasperTYPO3!',
'comment' => '',
],
[
'label' => 'input_16 eval=password',
'label' => 'input_16',
'inputValue' => 'Kasper',
'expectedValue' => '********',
'expectedInternalValue' => 'Kasper',
'expectedValueAfterSave' => 'Kasper',
'comment' => '',
],
[
'label' => 'input_19 eval=trim',
'label' => 'input_19',
'inputValue' => ' Kasper ',
'expectedValue' => 'Kasper',
'expectedInternalValue' => 'Kasper',
'expectedValueAfterSave' => 'Kasper',
'comment' => '',
],
[
'label' => 'input_19 eval=trim',
'label' => 'input_19',
'inputValue' => ' Kasper TYPO3 ',
'expectedValue' => 'Kasper TYPO3',
'expectedInternalValue' => 'Kasper TYPO3',
'expectedValueAfterSave' => 'Kasper TYPO3',
'comment' => '',
],
[
'label' => 'input_23 eval=upper',
'label' => 'input_23',
'inputValue' => 'Kasper TYPO3!',
'expectedValue' => 'KASPER TYPO3!',
'expectedInternalValue' => 'KASPER TYPO3!',
'expectedValueAfterSave' => 'KASPER TYPO3!',
'comment' => '',
],
[
'label' => 'input_24 eval=year',
'label' => 'input_24',
'inputValue' => '2016',
'expectedValue' => '2016',
'expectedInternalValue' => '2016',
'expectedValueAfterSave' => '2016',
'comment' => '',
],
[
'label' => 'input_24 eval=year',
'label' => 'input_24',
'inputValue' => '12',
'expectedValue' => '12',
'expectedInternalValue' => '12',
'expectedValueAfterSave' => '12',
'comment' => '',
],
[
'label' => 'input_24 eval=year',
'label' => 'input_24',
'inputValue' => 'Kasper',
'expectedValue' => date('Y'),
'expectedInternalValue' => date('Y'),
Expand Down

0 comments on commit 121812e

Please sign in to comment.