Files
piratepoet/tests/acceptance/SaveNotificationAsDraftCest.php
Jan Jakeš b39dac75d6 Autofix number of newlines between methods
[MAILPOET-2715]
2020-02-19 19:12:53 +00:00

30 lines
1.0 KiB
PHP

<?php
namespace MailPoet\Test\Acceptance;
use MailPoet\Test\DataFactories\Newsletter;
class SaveNotificationAsDraftCest {
public function saveNotificationAsDraft(\AcceptanceTester $i) {
// step 1 - Prepare post notification data
$i->wantTo('Save post notification email as draft');
$newsletterTitle = 'Draft Test Post Notification';
$newsletterFactory = new Newsletter();
$newsletter = $newsletterFactory->withSubject($newsletterTitle)
->withPostNotificationsType()
->create();
$segmentName = $i->createListWithSubscriber();
// step 2 - Go to editor
$i->login();
$i->amEditingNewsletter($newsletter->id);
$i->click('Next');
//Save Notification As Draft
$sendFormElement = '[data-automation-id="newsletter_send_form"]';
$i->waitForElement($sendFormElement);
$i->selectOptionInSelect2($segmentName);
$i->click('Save as draft and close');
$i->waitForElement('[data-automation-id="newsletters_listing_tabs"]');
$i->waitForText('Draft Test Post Notification');
}
}