diff --git a/composer.lock b/composer.lock index 1ef387a872d9b8fb1e8f64e964501211c87d5119..dd238ea430b87b3fe0625310f4f7e07ffccb05cd 100644 --- a/composer.lock +++ b/composer.lock @@ -1404,16 +1404,16 @@ "packages-dev": [ { "name": "7elix/styleguide", - "version": "8.0.5", + "version": "8.0.6", "source": { "type": "git", "url": "https://github.com/7elix/TYPO3.CMS.Styleguide.git", - "reference": "b6f4459e1ce268b17b46b68a804840440fe8f4f0" + "reference": "b210d185103226da0ce385835a8cc07024345e41" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/7elix/TYPO3.CMS.Styleguide/zipball/b6f4459e1ce268b17b46b68a804840440fe8f4f0", - "reference": "b6f4459e1ce268b17b46b68a804840440fe8f4f0", + "url": "https://api.github.com/repos/7elix/TYPO3.CMS.Styleguide/zipball/b210d185103226da0ce385835a8cc07024345e41", + "reference": "b210d185103226da0ce385835a8cc07024345e41", "shasum": "" }, "type": "typo3-cms-extension", @@ -1440,7 +1440,7 @@ "style guide", "typo3" ], - "time": "2016-11-02T01:46:43+00:00" + "time": "2017-02-22T16:37:44+00:00" }, { "name": "behat/gherkin", diff --git a/typo3/sysext/core/Tests/Acceptance/Backend/Formhandler/AbstractElementsBasicCest.php b/typo3/sysext/core/Tests/Acceptance/Backend/Formhandler/AbstractElementsBasicCest.php index 85333be845ed842a4cb5aadd7f63f266382ca55a..ba5e73ffb6f03e244a8c3067fefd573f7c314587 100644 --- a/typo3/sysext/core/Tests/Acceptance/Backend/Formhandler/AbstractElementsBasicCest.php +++ b/typo3/sysext/core/Tests/Acceptance/Backend/Formhandler/AbstractElementsBasicCest.php @@ -18,38 +18,12 @@ use Facebook\WebDriver\Remote\RemoteWebDriver; use Facebook\WebDriver\Remote\RemoteWebElement; use Facebook\WebDriver\WebDriverKeys; use TYPO3\TestingFramework\Core\Acceptance\Step\Backend\Admin; -use TYPO3\TestingFramework\Core\Acceptance\Support\Page\PageTree; /** * Abstract class for "elements_basic" tests of styleguide */ abstract class AbstractElementsBasicCest { - /** - * Set up selects styleguide elements basic page and opens record in FormEngine - * - * @param Admin $I - * @param PageTree $pageTree - */ - public function _before(Admin $I, PageTree $pageTree) - { - $I->useExistingSession(); - // Ensure main content frame is fully loaded, otherwise there are load-race-conditions - $I->switchToIFrame('list_frame'); - $I->waitForText('Web Content Management System'); - $I->switchToIFrame(); - - $I->click('List'); - $pageTree->openPath(['styleguide TCA demo', 'elements basic']); - $I->switchToIFrame('list_frame'); - - // Open record and wait until form is ready - $editRecordLinkCssPath = '#recordlist-tx_styleguide_elements_basic a[data-original-title="Edit record"]'; - $I->waitForElement($editRecordLinkCssPath, 30); - $I->click($editRecordLinkCssPath); - $I->waitForText('Edit Form', 3, 'h1'); - } - /** * Execute given test sets. * Incoming array operates on fields of ext:styleguide, each field can have multiple test tests. diff --git a/typo3/sysext/core/Tests/Acceptance/Backend/Formhandler/ElementsBasicInputCest.php b/typo3/sysext/core/Tests/Acceptance/Backend/Formhandler/ElementsBasicInputCest.php index 7890b6b4fa84c1124c2435106c15a85fcfb9ca05..95f31a01f90ada9133cebdf6960ee227e49c5627 100644 --- a/typo3/sysext/core/Tests/Acceptance/Backend/Formhandler/ElementsBasicInputCest.php +++ b/typo3/sysext/core/Tests/Acceptance/Backend/Formhandler/ElementsBasicInputCest.php @@ -15,12 +15,38 @@ namespace TYPO3\CMS\Core\Tests\Acceptance\Backend\Formhandler; */ use TYPO3\TestingFramework\Core\Acceptance\Step\Backend\Admin; +use TYPO3\TestingFramework\Core\Acceptance\Support\Page\PageTree; /** * Tests for "elements_basic" simple input fields of ext:styleguide */ class ElementsBasicInputCest extends AbstractElementsBasicCest { + /** + * Set up selects styleguide elements basic page and opens record in FormEngine + * + * @param Admin $I + * @param PageTree $pageTree + */ + public function _before(Admin $I, PageTree $pageTree) + { + $I->useExistingSession(); + // Ensure main content frame is fully loaded, otherwise there are load-race-conditions + $I->switchToIFrame('list_frame'); + $I->waitForText('Web Content Management System'); + $I->switchToIFrame(); + + $I->click('List'); + $pageTree->openPath(['styleguide TCA demo', 'elements basic']); + $I->switchToIFrame('list_frame'); + + // Open record and wait until form is ready + $editRecordLinkCssPath = '#recordlist-tx_styleguide_elements_basic a[data-original-title="Edit record"]'; + $I->waitForElement($editRecordLinkCssPath, 30); + $I->click($editRecordLinkCssPath); + $I->waitForText('Edit Form', 3, 'h1'); + } + /** * @param Admin $I */ @@ -147,6 +173,29 @@ class ElementsBasicInputCest extends AbstractElementsBasicCest 'comment' => '', ], ], + 'input_24 eval=year' => [ + [ + 'inputValue' => '2016', + 'expectedValue' => '2016', + 'expectedInternalValue' => '2016', + 'expectedValueAfterSave' => '2016', + 'comment' => '', + ], + [ + 'inputValue' => '12', + 'expectedValue' => '2012', + 'expectedInternalValue' => '2012', + 'expectedValueAfterSave' => '2012', + 'comment' => '', + ], + [ + 'inputValue' => 'Kasper', + 'expectedValue' => date('Y'), + 'expectedInternalValue' => date('Y'), + 'expectedValueAfterSave' => date('Y'), + 'comment' => 'Invalid character is converted to current year', + ], + ] ]; $this->runTests($I, $dataSets); } diff --git a/typo3/sysext/core/Tests/Acceptance/Backend/Formhandler/ElementsBasicInputDateCest.php b/typo3/sysext/core/Tests/Acceptance/Backend/Formhandler/ElementsBasicInputDateCest.php index 8d0f72b08da0bfffa83cbf86778475727fb15253..ecd424c12632f868d765d938d73b3a58581fcc3d 100644 --- a/typo3/sysext/core/Tests/Acceptance/Backend/Formhandler/ElementsBasicInputDateCest.php +++ b/typo3/sysext/core/Tests/Acceptance/Backend/Formhandler/ElementsBasicInputDateCest.php @@ -15,6 +15,7 @@ namespace TYPO3\CMS\Core\Tests\Acceptance\Backend\Formhandler; */ use TYPO3\TestingFramework\Core\Acceptance\Step\Backend\Admin; +use TYPO3\TestingFramework\Core\Acceptance\Support\Page\PageTree; /** * Tests for "elements_basic" date and time related input fields of ext:styleguide @@ -22,36 +23,30 @@ use TYPO3\TestingFramework\Core\Acceptance\Step\Backend\Admin; class ElementsBasicInputDateCest extends AbstractElementsBasicCest { /** + * Set up selects styleguide elements basic page and opens record in FormEngine + * * @param Admin $I + * @param PageTree $pageTree */ - public function checkThatValidationWorks_evalYear(Admin $I) + public function _before(Admin $I, PageTree $pageTree) { - $dataSets = [ - 'input_24 eval=year' => [ - [ - 'inputValue' => '2016', - 'expectedValue' => '2016', - 'expectedInternalValue' => '2016', - 'expectedValueAfterSave' => '2016', - 'comment' => '', - ], - [ - 'inputValue' => '12', - 'expectedValue' => '2012', - 'expectedInternalValue' => '2012', - 'expectedValueAfterSave' => '2012', - 'comment' => '', - ], - [ - 'inputValue' => 'Kasper', - 'expectedValue' => date('Y'), - 'expectedInternalValue' => date('Y'), - 'expectedValueAfterSave' => date('Y'), - 'comment' => 'Invalid character is converted to current year', - ], - ] - ]; - $this->runTests($I, $dataSets); + $I->useExistingSession(); + // Ensure main content frame is fully loaded, otherwise there are load-race-conditions + $I->switchToIFrame('list_frame'); + $I->waitForText('Web Content Management System'); + $I->switchToIFrame(); + + $I->click('List'); + $pageTree->openPath(['styleguide TCA demo', 'elements basic']); + $I->switchToIFrame('list_frame'); + + // Open record and wait until form is ready + $editRecordLinkCssPath = '#recordlist-tx_styleguide_elements_basic a[data-original-title="Edit record"]'; + $I->waitForElement($editRecordLinkCssPath, 30); + $I->click($editRecordLinkCssPath); + $I->waitForText('Edit Form', 3, 'h1'); + $I->click('inputDateTime'); + $I->waitForText('inputDateTime', 3); } /** @@ -60,7 +55,7 @@ class ElementsBasicInputDateCest extends AbstractElementsBasicCest public function checkThatValidationWorks_EvalDate_TypeDate(Admin $I) { $dataSets = [ - 'input_36 dbType=date eval=date' => [ + 'inputdatetime_2 dbType=date eval=date' => [ [ 'inputValue' => '29-01-2016', 'expectedValue' => '29-01-2016', @@ -100,7 +95,7 @@ class ElementsBasicInputDateCest extends AbstractElementsBasicCest public function checkThatValidationWorks_EvalDateTime(Admin $I) { $dataSets = [ - 'input_7 eval=datetime' => [ + 'inputdatetime_3 eval=datetime' => [ [ 'inputValue' => '05:23 29-01-2016', 'expectedValue' => '05:23 29-01-2016', @@ -140,7 +135,7 @@ class ElementsBasicInputDateCest extends AbstractElementsBasicCest public function checkThatValidationWorks_evalTime(Admin $I) { $dataSets = [ - 'input_17 eval=time' => [ + 'inputdatetime_5' => [ [ 'inputValue' => '13:30', 'expectedValue' => '13:30', diff --git a/typo3/sysext/core/Tests/Acceptance/Backend/Formhandler/Inline1nCest.php b/typo3/sysext/core/Tests/Acceptance/Backend/Formhandler/Inline1nCest.php index 6fe23598980d7663fa47fcde46503b016b4476e3..59e8745e63b7b684880e74e6863e65815e55492e 100644 --- a/typo3/sysext/core/Tests/Acceptance/Backend/Formhandler/Inline1nCest.php +++ b/typo3/sysext/core/Tests/Acceptance/Backend/Formhandler/Inline1nCest.php @@ -48,13 +48,13 @@ class Inline1nCest public function checkIfExpandsAndCollapseShowInput(Admin $I) { $I->wantTo('Expands the inline Elemnet'); - $I->click('div[data-toggle="formengine-inline"]', '#data-12-tx_styleguide_inline_1n-1-inline_1-tx_styleguide_inline_1n_child-1_div'); + $I->click('div[data-toggle="formengine-inline"]', '#data-11-tx_styleguide_inline_1n-1-inline_1-tx_styleguide_inline_1n_child-1_div'); $I->waitForElement('input[data-formengine-input-name="data[tx_styleguide_inline_1n_child][1][input_1]"]'); $I->wantTo('check is the value in input'); $I->seeInField('input[data-formengine-input-name="data[tx_styleguide_inline_1n_child][1][input_1]"]', 'lipsum'); $I->wantTo('Collapse the inline Elemnet'); - $I->click('div[data-toggle="formengine-inline"]', '#data-12-tx_styleguide_inline_1n-1-inline_1-tx_styleguide_inline_1n_child-1_div'); - $I->waitForElementNotVisible('#data-12-tx_styleguide_inline_1n-1-inline_1-tx_styleguide_inline_1n_child-1_fields.panel-collapse'); + $I->click('div[data-toggle="formengine-inline"]', '#data-11-tx_styleguide_inline_1n-1-inline_1-tx_styleguide_inline_1n_child-1_div'); + $I->waitForElementNotVisible('#data-11-tx_styleguide_inline_1n-1-inline_1-tx_styleguide_inline_1n_child-1_fields.panel-collapse'); } /** @@ -63,11 +63,11 @@ class Inline1nCest public function hideAndUnhideInline1nInlineElement(Admin $I) { $I->wantTo('Can hide a Inline Element'); - $I->click('a span[data-identifier="actions-edit-hide"]', '#data-12-tx_styleguide_inline_1n-1-inline_1-tx_styleguide_inline_1n_child-1_div'); - $I->waitForElement('#data-12-tx_styleguide_inline_1n-1-inline_1_records .t3-form-field-container-inline-hidden'); + $I->click('a span[data-identifier="actions-edit-hide"]', '#data-11-tx_styleguide_inline_1n-1-inline_1-tx_styleguide_inline_1n_child-1_div'); + $I->waitForElement('#data-11-tx_styleguide_inline_1n-1-inline_1_records .t3-form-field-container-inline-hidden'); $I->wantTo('Can unhide a Inline Element'); - $I->click('a span[data-identifier="actions-edit-unhide"]', '#data-12-tx_styleguide_inline_1n-1-inline_1-tx_styleguide_inline_1n_child-1_div'); - $I->waitForElementNotVisible('#data-12-tx_styleguide_inline_1n-1-inline_1_records .t3-form-field-container-inline-hidden', 2); + $I->click('a span[data-identifier="actions-edit-unhide"]', '#data-11-tx_styleguide_inline_1n-1-inline_1-tx_styleguide_inline_1n_child-1_div'); + $I->waitForElementNotVisible('#data-11-tx_styleguide_inline_1n-1-inline_1_records .t3-form-field-container-inline-hidden', 2); } /** @@ -98,7 +98,7 @@ class Inline1nCest public function checkIfCanSortingInlineElement(Admin $I) { $I->wantTo('Can sort an Inline Element'); - $I->click('a span[data-identifier="actions-move-down"]', '#data-12-tx_styleguide_inline_1n-1-inline_1-tx_styleguide_inline_1n_child-1_div'); + $I->click('a span[data-identifier="actions-move-down"]', '#data-11-tx_styleguide_inline_1n-1-inline_1-tx_styleguide_inline_1n_child-1_div'); $I->click('button[name="_savedok"]'); $I->wait(3); $I->click('a[title="Close"]'); @@ -114,7 +114,7 @@ class Inline1nCest */ public function changeInline1nInlineInput(Admin $I) { - $I->click('div[data-toggle="formengine-inline"]', '#data-12-tx_styleguide_inline_1n-1-inline_1-tx_styleguide_inline_1n_child-1_div'); + $I->click('div[data-toggle="formengine-inline"]', '#data-11-tx_styleguide_inline_1n-1-inline_1-tx_styleguide_inline_1n_child-1_div'); $I->waitForElement('input[data-formengine-input-name="data[tx_styleguide_inline_1n_child][1][input_1]"]'); $I->fillField('input[data-formengine-input-name="data[tx_styleguide_inline_1n_child][1][input_1]"]', 'hello world'); $I->click('button[name="_savedok"]'); @@ -130,7 +130,7 @@ class Inline1nCest */ public function deleteInline1nInlineElement(Admin $I, ModalDialog $modalDialog) { - $inlineElmentToDelete = '#data-12-tx_styleguide_inline_1n-1-inline_1-tx_styleguide_inline_1n_child-1_div'; + $inlineElmentToDelete = '#data-11-tx_styleguide_inline_1n-1-inline_1-tx_styleguide_inline_1n_child-1_div'; $I->wantTo('Cancel the delete dialog'); $I->click('a span[data-identifier="actions-edit-delete"]', $inlineElmentToDelete); $modalDialog->clickButtonInDialog('button[name="no"]');