Add acceptance test for new form cancel

[MAILPOET-3662]
This commit is contained in:
Jan Lysý
2021-09-20 12:47:25 +02:00
committed by Veljko V
parent 74441ba881
commit cb48009d87

View File

@@ -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();
}
}