From cb48009d87e910d7ef8e78bc610365646f6e4d3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lys=C3=BD?= Date: Mon, 20 Sep 2021 12:47:25 +0200 Subject: [PATCH] Add acceptance test for new form cancel [MAILPOET-3662] --- .../Forms/CreateFormUsingTemplateCest.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/acceptance/Forms/CreateFormUsingTemplateCest.php b/tests/acceptance/Forms/CreateFormUsingTemplateCest.php index d75f064e49..6452ee8634 100644 --- a/tests/acceptance/Forms/CreateFormUsingTemplateCest.php +++ b/tests/acceptance/Forms/CreateFormUsingTemplateCest.php @@ -17,7 +17,7 @@ class CreateFormUsingTemplateCest { $i->waitForElement('[data-automation-id="template_selection_list"]'); $i->waitForElement('[data-automation-id="select_template_template_1_popup"]'); - $i->wantTo('Switch template category and crete a form'); + $i->wantTo('Switch template category and create a form'); $i->click('[data-title="Fixed bar"]'); $i->waitForElement('[data-automation-id="select_template_template_1_fixed_bar"]'); $i->click('[data-automation-id="select_template_template_1_fixed_bar"]'); @@ -27,4 +27,18 @@ class CreateFormUsingTemplateCest { $i->click('[data-automation-id="form_save_button"]'); $i->waitForText('Form saved', 10, '.automation-dismissible-notices'); } + + public function cancelFormCreationUsingTemplate(\AcceptanceTester $i) { + $i->wantTo('Create a new form'); + $i->login(); + $i->amOnMailPoetPage('Forms'); + $i->click('[data-automation-id="create_new_form"]'); + + $i->waitForElement('[data-automation-id="template_selection_list"]'); + $i->waitForElement('[data-automation-id="select_template_template_1_popup"]'); + $i->wantTo('Cancel a form creation'); + $i->amOnMailPoetPage('Forms'); + $i->waitForText('No forms were found. Why not create a new one?'); + $i->seeNoJSErrors(); + } }