Update SaveNotificationAsDraftCest.php

This commit is contained in:
Michelle Shull
2018-09-10 13:38:04 -04:00
committed by GitHub
parent 08dd759e70
commit 659ea14f4b

View File

@ -8,7 +8,6 @@ require_once __DIR__ . '/../DataFactories/Newsletter.php';
class SavePostNotificationEmailAsDraftCest { class SavePostNotificationEmailAsDraftCest {
function saveNotificationAsDraft(\AcceptanceTester $I) { function saveNotificationAsDraft(\AcceptanceTester $I) {
// step 1 - Prepare post notification data // step 1 - Prepare post notification data
$I->wantTo('Save post notification email as draft'); $I->wantTo('Save post notification email as draft');
$newsletter_title = 'Draft Test Post Notification'; $newsletter_title = 'Draft Test Post Notification';
@ -17,12 +16,10 @@ class SavePostNotificationEmailAsDraftCest {
->withType('notification') ->withType('notification')
->withPostNoticationOptions() ->withPostNoticationOptions()
->create(); ->create();
// step 2 - Go to editor // step 2 - Go to editor
$I->login(); $I->login();
$I->amEditingNewsletter($newsletter->id); $I->amEditingNewsletter($newsletter->id);
$I->click('Next'); $I->click('Next');
//Save Notification As Draft //Save Notification As Draft
$send_form_element = '[data-automation-id="newsletter_send_form"]'; $send_form_element = '[data-automation-id="newsletter_send_form"]';
$I->waitForElement($send_form_element); $I->waitForElement($send_form_element);
@ -35,4 +32,4 @@ class SavePostNotificationEmailAsDraftCest {
$I->seeInCurrentUrl('/wp-admin/admin.php?page=mailpoet-newsletters#/notification'); $I->seeInCurrentUrl('/wp-admin/admin.php?page=mailpoet-newsletters#/notification');
$I->waitForText('Draft Test Post Notification'); $I->waitForText('Draft Test Post Notification');
} }
} }