Merge pull request #1690 from mailpoet/tests-fixes
Fix acceptance tests that failed locally [MAILPOET-1694]
This commit is contained in:
@@ -186,6 +186,7 @@ class SubscriberForm extends React.Component { // eslint-disable-line react/pref
|
||||
</h1>
|
||||
|
||||
<Form
|
||||
automationId="subscriber_edit_form"
|
||||
endpoint="subscribers"
|
||||
fields={fields}
|
||||
params={this.props.match.params}
|
||||
|
@@ -25,7 +25,7 @@ class StatisticsClicks extends Model {
|
||||
return $statistics->save();
|
||||
}
|
||||
|
||||
static function getAllForSubsciber(Subscriber $subscriber) {
|
||||
static function getAllForSubscriber(Subscriber $subscriber) {
|
||||
return static::table_alias('clicks')
|
||||
->select('clicks.id', 'id')
|
||||
->select('newsletter_rendered_subject')
|
||||
|
@@ -30,7 +30,7 @@ class StatisticsNewsletters extends Model {
|
||||
);
|
||||
}
|
||||
|
||||
static function getAllForSubsciber(Subscriber $subscriber) {
|
||||
static function getAllForSubscriber(Subscriber $subscriber) {
|
||||
return static::table_alias('statistics')
|
||||
->select('statistics.newsletter_id', 'newsletter_id')
|
||||
->select('newsletter_rendered_subject')
|
||||
|
@@ -22,7 +22,7 @@ class NewsletterClicksExporter {
|
||||
|
||||
$result = array();
|
||||
|
||||
$statistics = StatisticsClicks::getAllForSubsciber($subscriber)
|
||||
$statistics = StatisticsClicks::getAllForSubscriber($subscriber)
|
||||
->limit(self::LIMIT)
|
||||
->offset(self::LIMIT * ($page - 1))
|
||||
->findArray();
|
||||
|
@@ -24,7 +24,7 @@ class NewslettersExporter {
|
||||
|
||||
$result = array();
|
||||
|
||||
$statistics = StatisticsNewsletters::getAllForSubsciber($subscriber)
|
||||
$statistics = StatisticsNewsletters::getAllForSubscriber($subscriber)
|
||||
->limit(self::LIMIT)
|
||||
->offset(self::LIMIT * ($page - 1))
|
||||
->findArray();
|
||||
@@ -99,4 +99,4 @@ class NewslettersExporter {
|
||||
return $result;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -84,17 +84,17 @@ class Pages {
|
||||
|
||||
if($this->subscriber->getErrors() === false) {
|
||||
// send welcome notification
|
||||
$subsciber_segments = $this->subscriber->segments()->findMany();
|
||||
if($subsciber_segments) {
|
||||
$subscriber_segments = $this->subscriber->segments()->findMany();
|
||||
if($subscriber_segments) {
|
||||
Scheduler::scheduleSubscriberWelcomeNotification(
|
||||
$this->subscriber->id,
|
||||
array_map(function ($segment) {
|
||||
return $segment->get('id');
|
||||
}, $subsciber_segments)
|
||||
}, $subscriber_segments)
|
||||
);
|
||||
}
|
||||
|
||||
$this->new_subscriber_notification_sender->send($this->subscriber, $subsciber_segments);
|
||||
$this->new_subscriber_notification_sender->send($this->subscriber, $subscriber_segments);
|
||||
|
||||
// update subscriber from stored data after confirmation
|
||||
if(!empty($subscriber_data)) {
|
||||
|
@@ -66,6 +66,16 @@ class AcceptanceTester extends \Codeception\Actor {
|
||||
$I->waitForText($page, 5);
|
||||
}
|
||||
|
||||
/**
|
||||
* Navigate to Mailhog page and wait for angular to load
|
||||
*/
|
||||
public function amOnMailboxAppPage() {
|
||||
$I = $this;
|
||||
$I->amOnUrl(self::MAIL_URL);
|
||||
// ensure that angular is loaded by checking angular specific class
|
||||
$I->waitForElement('.messages.ng-scope');
|
||||
}
|
||||
|
||||
public function clickItemRowActionByItemName($item_name, $link) {
|
||||
$I = $this;
|
||||
$I->moveMouseOver(['xpath' => '//*[text()="' . $item_name . '"]//ancestor::tr']);
|
||||
@@ -80,6 +90,7 @@ class AcceptanceTester extends \Codeception\Actor {
|
||||
*/
|
||||
public function selectOptionInSelect2($value, $element = 'input.select2-search__field') {
|
||||
$I = $this;
|
||||
$I->waitForElement($element);
|
||||
$I->fillField($element, $value);
|
||||
$I->pressKey($element, \WebDriverKeys::ENTER);
|
||||
}
|
||||
@@ -106,11 +117,26 @@ class AcceptanceTester extends \Codeception\Actor {
|
||||
$I->cli('widget add mailpoet_form sidebar-1 2 --form=' . $form->id . ' --title="Subscribe to Our Newsletter" --allow-root');
|
||||
|
||||
// subscribe
|
||||
$I->amOnUrl(\AcceptanceTester::WP_URL);
|
||||
$I->amOnUrl(self::WP_URL);
|
||||
$I->fillField('[data-automation-id="form_email"]', 'subscriber@example.com');
|
||||
$I->click('[data-automation-id="subscribe-submit-button"]');
|
||||
$I->waitForText('Check your inbox or spam folder to confirm your subscription.', 30, '.mailpoet_validate_success');
|
||||
$I->seeNoJSErrors();
|
||||
}
|
||||
|
||||
public function waitForListingItemsToLoad() {
|
||||
$I = $this;
|
||||
$I->waitForElementNotVisible('.mailpoet_listing_loading');
|
||||
}
|
||||
|
||||
public function searchFor($query, $delay = 0, $element = '#search_input', $button = 'Search') {
|
||||
$I = $this;
|
||||
$I->waitForElement($element);
|
||||
if ($delay) {
|
||||
$I->wait($delay);
|
||||
}
|
||||
$I->fillField($element, $query);
|
||||
$I->click($button);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -30,8 +30,7 @@ class CreateWelcomeEmailCest {
|
||||
$I->seeInCurrentUrl('mailpoet-newsletters');
|
||||
$I->click('Welcome Emails');
|
||||
$I->seeInCurrentUrl('mailpoet-newsletters#/welcome');
|
||||
$I->fillField('#search_input', $newsletter_title);
|
||||
$I->click('Search');
|
||||
$I->searchFor($newsletter_title, 2);
|
||||
$I->waitForText($newsletter_title, 10);
|
||||
$I->seeNoJSErrors();
|
||||
}
|
||||
|
@@ -27,6 +27,7 @@ class DuplicatePostNotificationCest {
|
||||
$I->waitForText($newsletter_title, 10);
|
||||
$I->clickItemRowActionByItemName($newsletter_title, 'Duplicate');
|
||||
$I->waitForText('Copy of ' . $newsletter_title);
|
||||
$I->waitForListingItemsToLoad();
|
||||
|
||||
// step 5 - Open Editor
|
||||
$I->clickItemRowActionByItemName('Copy of ' . $newsletter_title, 'Edit');
|
||||
|
@@ -29,7 +29,7 @@ class EditSignUpConfirmationEmailCest {
|
||||
$I->createFormAndSubscribe();
|
||||
|
||||
// check the received email
|
||||
$I->amOnUrl(\AcceptanceTester::MAIL_URL);
|
||||
$I->amOnMailboxAppPage();
|
||||
$I->waitForText('Confirmation email subject');
|
||||
$I->click(Locator::contains('span.subject', 'Confirmation email subject'));
|
||||
|
||||
|
@@ -6,6 +6,19 @@ use AcceptanceTester;
|
||||
use Codeception\Util\Locator;
|
||||
|
||||
class EnableAndDisableSignupConfirmationCest {
|
||||
|
||||
function removeAllEmails(AcceptanceTester $I) {
|
||||
// Remove all mails, because when there is more mails than paging allows it causes
|
||||
// problems with counting ones, which would be moved to other page after adding more mails
|
||||
$I->amOnMailboxAppPage();
|
||||
$I->waitForElement(Locator::contains('a', 'Delete all messages'), 10);
|
||||
$I->click(Locator::contains('a', 'Delete all messages'));
|
||||
$I->waitForElement('.modal-footer');
|
||||
$I->wait(2); // Wait for modal fade-in animation to finish
|
||||
$I->click(Locator::contains('.btn', 'Delete all messages'));
|
||||
$I->waitForElementNotVisible('.modal');
|
||||
}
|
||||
|
||||
function disableSignupConfirmation(AcceptanceTester $I) {
|
||||
$I->wantTo('Disable signup confirmation');
|
||||
$I->login();
|
||||
@@ -13,6 +26,7 @@ class EnableAndDisableSignupConfirmationCest {
|
||||
$confirmation_emails_count = $this->countConfirmationEmails($I);
|
||||
$I->createFormAndSubscribe();
|
||||
$this->seeConfirmationEmailsCountIs($I, $confirmation_emails_count);
|
||||
$I->cli('widget reset sidebar-1 --allow-root');
|
||||
}
|
||||
|
||||
function enableSignupConfirmation(AcceptanceTester $I) {
|
||||
@@ -22,9 +36,6 @@ class EnableAndDisableSignupConfirmationCest {
|
||||
$confirmation_emails_count = $this->countConfirmationEmails($I);
|
||||
$I->createFormAndSubscribe();
|
||||
$this->seeConfirmationEmailsCountIs($I, $confirmation_emails_count + 1);
|
||||
}
|
||||
|
||||
function _after(AcceptanceTester $I) {
|
||||
$I->cli('widget reset sidebar-1 --allow-root');
|
||||
}
|
||||
|
||||
@@ -41,16 +52,13 @@ class EnableAndDisableSignupConfirmationCest {
|
||||
}
|
||||
|
||||
private function countConfirmationEmails(AcceptanceTester $I) {
|
||||
$I->amOnUrl(AcceptanceTester::MAIL_URL);
|
||||
$subjects = $I->grabMultiple('span.subject');
|
||||
$confirmation_emails = array_filter($subjects, function($subject) {
|
||||
return strpos($subject, 'Confirm your subscription') !== false;
|
||||
});
|
||||
$I->amOnMailboxAppPage();
|
||||
$confirmation_emails = $I->grabMultiple(Locator::contains('span.subject', 'Confirm your subscription'));
|
||||
return count($confirmation_emails);
|
||||
}
|
||||
|
||||
private function seeConfirmationEmailsCountIs(AcceptanceTester $I, $n) {
|
||||
$I->amOnUrl(AcceptanceTester::MAIL_URL);
|
||||
$I->amOnMailboxAppPage();
|
||||
$I->seeNumberOfElements(Locator::contains('span.subject', 'Confirm your subscription'), $n);
|
||||
}
|
||||
}
|
||||
|
@@ -9,9 +9,6 @@ require_once __DIR__ . '/../DataFactories/Segment.php';
|
||||
require_once __DIR__ . '/../DataFactories/Subscriber.php';
|
||||
|
||||
class ExportSubscribersCest {
|
||||
function __construct() {
|
||||
$this->search_field_element = 'input.select2-search__field';
|
||||
}
|
||||
function exportSubscribers(\AcceptanceTester $I) {
|
||||
$segment_factory = new Segment();
|
||||
$segment_name = 'Hobbyists';
|
||||
@@ -32,4 +29,4 @@ class ExportSubscribersCest {
|
||||
$I->waitForText('3 subscribers were exported. Get the exported file here.', 20);
|
||||
$I->seeNoJSErrors();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -46,7 +46,7 @@ class ManageSubscriptionLinkCest {
|
||||
function manageSubscriptionLink(\AcceptanceTester $I) {
|
||||
$I->wantTo('Verify that "manage subscription" link works and subscriber status can be updated');
|
||||
|
||||
$I->amOnUrl(\AcceptanceTester::MAIL_URL);
|
||||
$I->amOnMailboxAppPage();
|
||||
$I->click(Locator::contains('span.subject', $this->newsletter_title));
|
||||
$I->switchToIframe('preview-html');
|
||||
$I->waitForElementChange(
|
||||
@@ -79,7 +79,7 @@ class ManageSubscriptionLinkCest {
|
||||
|
||||
$form_status_element = '[data-automation-id="form_status"]';
|
||||
|
||||
$I->amOnUrl(\AcceptanceTester::MAIL_URL);
|
||||
$I->amOnMailboxAppPage();
|
||||
$I->click(Locator::contains('span.subject', $this->newsletter_title));
|
||||
$I->switchToIframe('preview-html');
|
||||
$I->waitForElementChange(
|
||||
|
@@ -111,12 +111,10 @@ class ManageWelcomeEmailCest {
|
||||
$I->amOnMailpoetPage('Emails');
|
||||
$I->click('Welcome Emails', '[data-automation-id="newsletters_listing_tabs"]');
|
||||
$I->waitForText($newsletter_title, 20);
|
||||
$I->fillField('#search_input', $failure_condition_newsletter);
|
||||
$I->click('Search');
|
||||
$I->searchFor($failure_condition_newsletter, 2);
|
||||
$I->wait(5);
|
||||
$I->waitForElement('tr.no-items', 10);
|
||||
$I->fillField('#search_input', $newsletter_title);
|
||||
$I->click('Search');
|
||||
$I->searchFor($newsletter_title);
|
||||
$I->waitForText($newsletter_title, 10);
|
||||
}
|
||||
|
||||
|
@@ -62,7 +62,7 @@ class ReceivePostNotificationCest {
|
||||
$I->waitForText('Sent to 1 of 1', 90);
|
||||
|
||||
// confirm newsletter is received
|
||||
$I->amOnUrl(\AcceptanceTester::MAIL_URL);
|
||||
$I->amOnMailboxAppPage();
|
||||
$I->waitForText($newsletter_subject, 90);
|
||||
$I->click(Locator::contains('span.subject', $newsletter_subject));
|
||||
$I->switchToIframe('preview-html');
|
||||
|
@@ -8,7 +8,6 @@ class ReceiveStandardEmailCest {
|
||||
|
||||
function receiveStandardEmail(\AcceptanceTester $I) {
|
||||
$newsletter_title = 'Receive Test';
|
||||
$search_field_element = 'input.select2-search__field';
|
||||
$standard_template = '[data-automation-id=\'select_template_0\']';
|
||||
$title_element = '[data-automation-id=\'newsletter_title\']';
|
||||
$send_form_element = '[data-automation-id="newsletter_send_form"]';
|
||||
@@ -33,13 +32,11 @@ class ReceiveStandardEmailCest {
|
||||
//Choose list and send
|
||||
$I->waitForElement($send_form_element, 30);
|
||||
$I->seeInCurrentUrl('mailpoet-newsletters#/send/');
|
||||
$I->waitForElement($search_field_element, 30);
|
||||
$I->fillField($search_field_element, 'WordPress Users');
|
||||
$I->pressKey($search_field_element, \WebDriverKeys::ENTER);
|
||||
$I->selectOptionInSelect2('WordPress Users');
|
||||
$I->click('Send');
|
||||
$I->waitForElement('.mailpoet_progress_label', 90);
|
||||
//confirm newsletter is received
|
||||
$I->amOnUrl(\AcceptanceTester::MAIL_URL);
|
||||
$I->amOnMailboxAppPage();
|
||||
$I->waitForText($newsletter_title, 90);
|
||||
$I->click(Locator::contains('span.subject', $newsletter_title));
|
||||
}
|
||||
|
@@ -24,9 +24,7 @@ class ScheduleNewsletterCest {
|
||||
// step 4 - Choose list and schedule
|
||||
$I->waitForElement('[data-automation-id="newsletter_send_form"]');
|
||||
$I->seeInCurrentUrl('mailpoet-newsletters#/send/');
|
||||
$search_field_element = 'input.select2-search__field';
|
||||
$I->fillField($search_field_element, 'WordPress Users');
|
||||
$I->pressKey($search_field_element, \WebDriverKeys::ENTER);
|
||||
$I->selectOptionInSelect2('WordPress Users');
|
||||
$I->checkOption('isScheduled');
|
||||
$I->click('select[name=time]');
|
||||
$I->selectOption('form select[name=time]', '6:00');
|
||||
|
@@ -22,12 +22,10 @@ class SearchForNotificationCest {
|
||||
$I->amOnMailpoetPage('Emails');
|
||||
$I->click('Post Notifications', '[data-automation-id="newsletters_listing_tabs"]');
|
||||
$I->waitForText('Post notification', 5);
|
||||
$I->fillField('#search_input', $failure_condition_newsletter);
|
||||
$I->click('Search');
|
||||
$I->searchFor($failure_condition_newsletter, 2);
|
||||
$I->wait(5);
|
||||
$I->waitForElement('tr.no-items', 10);
|
||||
$I->fillField('#search_input', $newsletter_title);
|
||||
$I->click('Search');
|
||||
$I->searchFor($newsletter_title);
|
||||
$I->waitForText($newsletter_title, 10);
|
||||
}
|
||||
|
||||
|
@@ -22,12 +22,10 @@ class SearchForStandardNewsletterCest {
|
||||
// step 2 - Search
|
||||
$I->login();
|
||||
$I->amOnMailpoetPage('Emails');
|
||||
$I->fillField('#search_input', $failure_condition_newsletter);
|
||||
$I->click('Search');
|
||||
$I->searchFor($failure_condition_newsletter, 2);
|
||||
$I->wait(5);
|
||||
$I->dontSee($newsletter_title);
|
||||
$I->fillField('#search_input', $newsletter_title);
|
||||
$I->click('Search');
|
||||
$I->searchFor($newsletter_title);
|
||||
$I->waitForText($newsletter_title, 20);
|
||||
}
|
||||
|
||||
|
@@ -30,7 +30,7 @@ class SubscribeToMultipleListsCest {
|
||||
//Add this form to a widget
|
||||
$I->createFormAndSubscribe($form);
|
||||
//Subscribe via that form
|
||||
$I->amOnUrl(\AcceptanceTester::MAIL_URL);
|
||||
$I->amOnMailboxAppPage();
|
||||
$I->click(Locator::contains('span.subject', 'Confirm your subscription'));
|
||||
$I->switchToIframe('preview-html');
|
||||
$I->click('Click here to confirm your subscription');
|
||||
|
@@ -5,10 +5,6 @@ namespace MailPoet\Test\Acceptance;
|
||||
require_once __DIR__ . '/../_data/MailPoetImportList.csv';
|
||||
|
||||
class SubscriberManageImportExportCest {
|
||||
function __construct() {
|
||||
$this->search_field_element = 'input.select2-search__field';
|
||||
}
|
||||
|
||||
function importUsersToSubscribersViaCSV(\AcceptanceTester $I) {
|
||||
$I->wantTo('Import a subscriber list from CSV');
|
||||
$I->login();
|
||||
@@ -21,7 +17,7 @@ class SubscriberManageImportExportCest {
|
||||
$I->attachFile(['css'=>'#file_local'], 'MailPoetImportList.csv');
|
||||
$I->click(['xpath'=>'//*[@id="method_file"]/div/table/tbody/tr[2]/th/a']);
|
||||
//click is to trigger dropdown to display selections
|
||||
$I->click($this->search_field_element);
|
||||
$I->click('input.select2-search__field');
|
||||
//choose My First List
|
||||
$I->click(['xpath'=>'//*[@id="select2-mailpoet_segments_select-results"]/li[2]']);
|
||||
//click next step
|
||||
@@ -30,33 +26,24 @@ class SubscriberManageImportExportCest {
|
||||
//confirm subscribers from import list were added
|
||||
$I->amOnMailPoetPage ('Subscribers');
|
||||
$I->seeInCurrentUrl('mailpoet-subscribers#');
|
||||
$I->fillField('#search_input', 'aaa@example.com');
|
||||
$I->click('Search');
|
||||
$I->searchFor('aaa@example.com', 2);
|
||||
$I->waitForText('aaa@example.com', 10);
|
||||
$I->fillField('#search_input', 'bbb@example.com');
|
||||
$I->click('Search');
|
||||
$I->searchFor('bbb@example.com');
|
||||
$I->waitForText('bbb@example.com', 10);
|
||||
$I->fillField('#search_input', 'ccc@example.com');
|
||||
$I->click('Search');
|
||||
$I->searchFor('ccc@example.com');
|
||||
$I->waitForText('ccc@example.com', 10);
|
||||
$I->fillField('#search_input', 'ddd@example.com');
|
||||
$I->click('Search');
|
||||
$I->searchFor('ddd@example.com');
|
||||
$I->waitForText('ddd@example.com', 10);
|
||||
$I->fillField('#search_input', 'eee@example.com');
|
||||
$I->click('Search');
|
||||
$I->searchFor('eee@example.com');
|
||||
$I->waitForText('eee@example.com', 10);
|
||||
$I->fillField('#search_input', 'fff@example.com');
|
||||
$I->click('Search');
|
||||
$I->searchFor('fff@example.com');
|
||||
$I->waitForText('fff@example.com', 10);
|
||||
$I->fillField('#search_input', 'ggg@example.com');
|
||||
$I->click('Search');
|
||||
$I->searchFor('ggg@example.com');
|
||||
$I->waitForText('ggg@example.com', 10);
|
||||
$I->fillField('#search_input', 'hhh@example.com');
|
||||
$I->click('Search');
|
||||
$I->searchFor('hhh@example.com');
|
||||
$I->waitForText('hhh@example.com', 10);
|
||||
$I->fillField('#search_input', 'iii@example.com');
|
||||
$I->click('Search');
|
||||
$I->searchFor('iii@example.com');
|
||||
$I->waitForText('iii@example.com', 10);
|
||||
$I->seeNoJSErrors();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -45,8 +45,7 @@ class SubscriberManagementCest {
|
||||
function viewSubscriberList(\AcceptanceTester $I) {
|
||||
$I->wantTo('View list of subscribers');
|
||||
$this->generateWPUsersList($I);
|
||||
$I->fillField('#search_input', 'Alec Saunders');
|
||||
$I->click('Search');
|
||||
$I->searchFor('Alec Saunders', 2);
|
||||
$I->waitForText('Alec Saunders', 10);
|
||||
$I->seeNoJSErrors();
|
||||
}
|
||||
@@ -61,10 +60,9 @@ class SubscriberManagementCest {
|
||||
$I->fillField(['name' => 'first_name'], 'New');
|
||||
$I->fillField(['name' => 'last_name'], 'GlobalUser');
|
||||
$I->selectOptionInSelect2($this->segment->get('name'));
|
||||
$I->click('Save');
|
||||
$I->click('[data-automation-id="subscriber_edit_form"] input[type="submit"]');
|
||||
$I->amOnMailPoetPage ('Subscribers');
|
||||
$I->fillField('#search_input', 'newglobaluser99@fakemail.fake');
|
||||
$I->click('Search');
|
||||
$I->searchFor('newglobaluser99@fakemail.fake', 2);
|
||||
$I->waitForText('newglobaluser99@fakemail.fake', 10);
|
||||
$I->seeNoJSErrors();
|
||||
}
|
||||
@@ -74,7 +72,8 @@ class SubscriberManagementCest {
|
||||
$new_subscriber_email = 'deleteglobaluser99@fakemail.fake';
|
||||
$this->generateSingleSubscriber('deleteglobaluser99@fakemail.fake', 'Delete', 'ThisGlobalUser');
|
||||
$I->login();
|
||||
$I->amOnMailPoetPage ('Subscribers');
|
||||
$I->amOnMailPoetPage('Subscribers');
|
||||
$I->waitForListingItemsToLoad();
|
||||
$I->clickItemRowActionByItemName($new_subscriber_email, 'Move to trash');
|
||||
$I->waitForElement('[data-automation-id="filters_trash"]');
|
||||
$I->click('[data-automation-id="filters_trash"]');
|
||||
@@ -86,17 +85,19 @@ class SubscriberManagementCest {
|
||||
}
|
||||
|
||||
function addSubscriberToList(\AcceptanceTester $I) {
|
||||
$I->wantTo('Add a subsciber to a list');
|
||||
$I->wantTo('Add a subscriber to a list');
|
||||
$new_subscriber_email = 'addtolistuser99@fakemail.fake';
|
||||
$this->generateMultipleLists();
|
||||
$this->generateSingleSubscriber('addtolistuser99@fakemail.fake', 'Add', 'ToAList');
|
||||
$I->login();
|
||||
$I->amOnMailPoetPage ('Subscribers');
|
||||
$I->waitForListingItemsToLoad();
|
||||
$I->clickItemRowActionByItemName($new_subscriber_email, 'Edit');
|
||||
$I->waitForText('Subscriber', 30);
|
||||
$I->seeInCurrentUrl('mailpoet-subscribers#/edit/');
|
||||
$I->waitForElementNotVisible('.mailpoet_form_loading');
|
||||
$I->selectOptionInSelect2('Cooking');
|
||||
$I->click('Save');
|
||||
$I->click('[data-automation-id="subscriber_edit_form"] input[type="submit"]');
|
||||
$I->seeNoJSErrors();
|
||||
}
|
||||
|
||||
@@ -106,12 +107,14 @@ class SubscriberManagementCest {
|
||||
$this->generateSingleSubscriber('deletefromlistuser99@fakemail.fake', 'Delete', 'FromAList');
|
||||
$I->login();
|
||||
$I->amOnMailPoetPage ('Subscribers');
|
||||
$I->waitForListingItemsToLoad();
|
||||
$I->clickItemRowActionByItemName($new_subscriber_email, 'Edit');
|
||||
$I->waitForText('Subscriber', 10);
|
||||
$I->seeInCurrentUrl('mailpoet-subscribers#/edit/');
|
||||
$I->waitForElementNotVisible('.mailpoet_form_loading');
|
||||
$I->selectOptionInSelect2('Cooking');
|
||||
$I->click('.select2-selection__choice__remove');
|
||||
$I->click('Save');
|
||||
$I->click('[data-automation-id="subscriber_edit_form"] input[type="submit"]');
|
||||
$I->waitForText('Subscriber was updated', 10);
|
||||
}
|
||||
|
||||
@@ -121,6 +124,7 @@ class SubscriberManagementCest {
|
||||
$this->generateSingleSubscriber('editglobaluser99@fakemail.fake', 'Edit', 'ThisGlobalUser');
|
||||
$I->login();
|
||||
$I->amOnMailPoetPage ('Subscribers');
|
||||
$I->waitForListingItemsToLoad();
|
||||
$I->clickItemRowActionByItemName($new_subscriber_email, 'Edit');
|
||||
$I->waitForText('Subscriber', 10);
|
||||
$I->seeInCurrentUrl('mailpoet-subscribers#/edit/');
|
||||
|
@@ -9,8 +9,7 @@ class SubscribersListingCest {
|
||||
|
||||
$I->login();
|
||||
$I->amOnMailpoetPage('Subscribers');
|
||||
$I->fillField('#search_input', 'wp@example.com');
|
||||
$I->click('Search');
|
||||
$I->searchFor('wp@example.com', 2);
|
||||
$I->waitForText('wp@example.com', 10);
|
||||
}
|
||||
|
||||
|
@@ -62,7 +62,7 @@ class SubscriptionFormCest {
|
||||
* @depends subscriptionFormWidget
|
||||
*/
|
||||
function subscriptionConfirmation(\AcceptanceTester $I) {
|
||||
$I->amOnUrl(\AcceptanceTester::MAIL_URL);
|
||||
$I->amOnMailboxAppPage();
|
||||
$I->click(Locator::contains('span.subject', 'Confirm your subscription'));
|
||||
$I->switchToIframe('preview-html');
|
||||
$I->click('Click here to confirm your subscription');
|
||||
|
@@ -122,7 +122,7 @@ class ImportExportFactoryTest extends \MailPoetTest {
|
||||
}
|
||||
}
|
||||
|
||||
function testItCanFormatSubsciberFields() {
|
||||
function testItCanFormatSubscriberFields() {
|
||||
$formattedSubscriberFields =
|
||||
$this->importFactory->formatSubscriberFields(
|
||||
$this->importFactory->getSubscriberFields()
|
||||
@@ -140,7 +140,7 @@ class ImportExportFactoryTest extends \MailPoetTest {
|
||||
expect($formattedSubscriberFields[0]['custom'])->false();
|
||||
}
|
||||
|
||||
function testItCanGetSubsciberCustomFields() {
|
||||
function testItCanGetSubscriberCustomFields() {
|
||||
$subscriberCustomFields =
|
||||
$this->importFactory
|
||||
->getSubscriberCustomFields();
|
||||
@@ -148,7 +148,7 @@ class ImportExportFactoryTest extends \MailPoetTest {
|
||||
->equals('date');
|
||||
}
|
||||
|
||||
function testItCanFormatSubsciberCustomFields() {
|
||||
function testItCanFormatSubscriberCustomFields() {
|
||||
$formattedSubscriberCustomFields =
|
||||
$this->importFactory->formatSubscriberCustomFields(
|
||||
$this->importFactory->getSubscriberCustomFields()
|
||||
|
Reference in New Issue
Block a user