diff --git a/tests/acceptance/FormEditorAddNamesCest.php b/tests/acceptance/FormEditorAddNamesCest.php new file mode 100644 index 0000000000..3d7bb7279a --- /dev/null +++ b/tests/acceptance/FormEditorAddNamesCest.php @@ -0,0 +1,42 @@ +withName($segment_name)->create(); + $form_name = 'My fancy form'; + $form = new Form(); + $form->withName($form_name)->withSegments([$segment])->create(); + $features = new Features(); + $features->withFeatureEnabled(FeaturesController::NEW_FORM_EDITOR); + $I->wantTo('Add first and last name to the editor'); + $I->login(); + $I->amOnMailPoetPage('Forms'); + $I->waitForText($form_name); + $I->clickItemRowActionByItemName($form_name, 'Edit'); + $I->waitForElement('[data-automation-id="form_title_input"]'); + + $I->click('.block-list-appender button');// CLICK the big button that adds new blocks + $I->waitForElement('.editor-inserter__results .components-panel__body-toggle'); + $I->click('.editor-inserter__results .components-panel__body-toggle'); // toggle fields + $I->click('.editor-block-list-item-mailpoet-form-first-name-input'); // add first name block to the editor + $I->click('.block-list-appender button');// CLICK the big button that adds new blocks + $I->waitForElement('.editor-inserter__results .components-panel__body-toggle'); + $I->click('.editor-inserter__results div:nth-child(2) .components-panel__body-toggle'); // toggle fields, get the second field, first one is now "Most Used" + $I->click('.editor-block-list-item-mailpoet-form-last-name-input'); // add last name block to the editor + + $I->click('[data-automation-id="form_save_button"]'); + $I->waitForText('Form saved', 10, '.automation-dismissible-notices'); + $I->seeNoJSErrors(); + } + +} diff --git a/tests/acceptance/FormsCreationCest.php b/tests/acceptance/FormsCreationCest.php index 9ba754d072..d6f4a6ed39 100644 --- a/tests/acceptance/FormsCreationCest.php +++ b/tests/acceptance/FormsCreationCest.php @@ -3,7 +3,6 @@ namespace MailPoet\Test\Acceptance; class FormsCreationCest { - function createForm(\AcceptanceTester $I) { $I->wantTo('Create a new Form');