From 1c300ccdef67625c0bed4782a56c4c4057e01d9c Mon Sep 17 00:00:00 2001 From: Veljko V Date: Wed, 18 Nov 2020 11:43:40 +0100 Subject: [PATCH] Update testcase to be more concise [MAILPOET-3309] [MAILPOET-3309] --- .../src/form_editor/blocks/segment_select/edit.jsx | 4 +--- tests/acceptance/FormEditorAddListSelectionCest.php | 12 ++++-------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/assets/js/src/form_editor/blocks/segment_select/edit.jsx b/assets/js/src/form_editor/blocks/segment_select/edit.jsx index bb18f39fb9..823f2d3eee 100644 --- a/assets/js/src/form_editor/blocks/segment_select/edit.jsx +++ b/assets/js/src/form_editor/blocks/segment_select/edit.jsx @@ -39,7 +39,6 @@ const SegmentSelectEdit = ({ attributes, setAttributes }) => { return ( -
(setAttributes({ label }))} @@ -52,11 +51,10 @@ const SegmentSelectEdit = ({ attributes, setAttributes }) => { ]), })} /> - + {attributes.label} {renderValues()} -
); }; diff --git a/tests/acceptance/FormEditorAddListSelectionCest.php b/tests/acceptance/FormEditorAddListSelectionCest.php index 3ddbade632..c9358958ee 100644 --- a/tests/acceptance/FormEditorAddListSelectionCest.php +++ b/tests/acceptance/FormEditorAddListSelectionCest.php @@ -43,7 +43,10 @@ class FormEditorAddListSelectionCest { // Reload the page and check that data were saved $i->reloadPage(); - $this->checkListSelectionInForm($i); + $i->waitForElement('[data-automation-id="mailpoet_list_selection_block"]'); + $i->click('[data-automation-id="mailpoet_list_selection_block"]'); + $i->seeInField('[data-automation-id="settings_first_name_label_input"]', 'Choose your list:'); + $i->waitForText($secondSegmentName); // Go back to the forms list and verify the attached list $i->amOnMailpoetPage('Forms'); @@ -51,11 +54,4 @@ class FormEditorAddListSelectionCest { $i->waitForText('User choice:'); $i->waitForText($secondSegmentName); } - - private function checkListSelectionInForm($i) { - $i->waitForElement('[data-automation-id="mailpoet_list_selection_block"]'); - $i->click('[data-automation-id="mailpoet_list_selection_block"]'); - $i->seeInField('[data-automation-id="settings_first_name_label_input"]', 'Choose your list:'); - $i->seeOptionIsSelected('[data-automation-id="select_list_selections_list"]', $secondSegmentName); - } }