Update testcase to be more concise [MAILPOET-3309]
[MAILPOET-3309]
This commit is contained in:
@@ -39,7 +39,6 @@ const SegmentSelectEdit = ({ attributes, setAttributes }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ParagraphEdit className={attributes.className}>
|
<ParagraphEdit className={attributes.className}>
|
||||||
<div data-automation-id="mailpoet_list_selection_block">
|
|
||||||
<Settings
|
<Settings
|
||||||
label={attributes.label}
|
label={attributes.label}
|
||||||
onLabelChanged={(label) => (setAttributes({ label }))}
|
onLabelChanged={(label) => (setAttributes({ label }))}
|
||||||
@@ -52,11 +51,10 @@ const SegmentSelectEdit = ({ attributes, setAttributes }) => {
|
|||||||
]),
|
]),
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
<span className="mailpoet_segment_label">
|
<span className="mailpoet_segment_label" data-automation-id="mailpoet_list_selection_block">
|
||||||
{attributes.label}
|
{attributes.label}
|
||||||
</span>
|
</span>
|
||||||
{renderValues()}
|
{renderValues()}
|
||||||
</div>
|
|
||||||
</ParagraphEdit>
|
</ParagraphEdit>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@@ -43,7 +43,10 @@ class FormEditorAddListSelectionCest {
|
|||||||
|
|
||||||
// Reload the page and check that data were saved
|
// Reload the page and check that data were saved
|
||||||
$i->reloadPage();
|
$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
|
// Go back to the forms list and verify the attached list
|
||||||
$i->amOnMailpoetPage('Forms');
|
$i->amOnMailpoetPage('Forms');
|
||||||
@@ -51,11 +54,4 @@ class FormEditorAddListSelectionCest {
|
|||||||
$i->waitForText('User choice:');
|
$i->waitForText('User choice:');
|
||||||
$i->waitForText($secondSegmentName);
|
$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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user