[MQ-176] delete unneeded assertions from acceptance tests
This commit is contained in:
committed by
Pavel Dohnal
parent
958296c0b7
commit
ff1b079131
@@ -14,20 +14,17 @@ class ConfirmNewsletterAutosaveCest {
|
||||
$I->click('[data-automation-id="new_email"]');
|
||||
|
||||
// step 1 - select notification type
|
||||
$I->seeInCurrentUrl('#/new');
|
||||
$I->click('[data-automation-id="create_standard"]');
|
||||
|
||||
// step 2 - select template
|
||||
$standard_template = '[data-automation-id="select_template_0"]';
|
||||
$I->waitForElement($standard_template);
|
||||
$I->see('Newsletters', ['css' => 'a.current']);
|
||||
$I->seeInCurrentUrl('#/template');
|
||||
$I->click($standard_template);
|
||||
|
||||
// step 3 - Add subject, wait for Autosave
|
||||
$title_element = '[data-automation-id="newsletter_title"]';
|
||||
$I->waitForElement($title_element);
|
||||
$I->seeInCurrentUrl('mailpoet-newsletter-editor');
|
||||
$I->fillField($title_element, $newsletter_title);
|
||||
$I->waitForText('Autosaved');
|
||||
$I->seeNoJSErrors();
|
||||
|
@@ -22,7 +22,6 @@ class ConfirmNotificationAutosaveCest {
|
||||
// step 3 - Add subject, wait for Autosave
|
||||
$title_element = '[data-automation-id="newsletter_title"]';
|
||||
$I->waitForElement($title_element);
|
||||
$I->seeInCurrentUrl('mailpoet-newsletter-editor');
|
||||
$I->fillField($title_element, $newsletter_title);
|
||||
$I->waitForText('Autosaved');
|
||||
}
|
||||
|
@@ -9,27 +9,21 @@ class CreateWelcomeEmailCest {
|
||||
$I->login();
|
||||
$I->amOnMailpoetPage('Emails');
|
||||
$I->click('[data-automation-id="new_email"]');
|
||||
$I->seeInCurrentUrl('#/new');
|
||||
$I->click('[data-automation-id="create_welcome"]');
|
||||
$I->waitForText('Welcome Email');
|
||||
$I->seeInCurrentUrl('mailpoet-newsletters#/new/welcome');
|
||||
$I->click('Next');
|
||||
$welcome_template = '[data-automation-id="select_template_0"]';
|
||||
$I->waitForElement($welcome_template);
|
||||
$I->see('Welcome Emails', ['css' => 'a.current']);
|
||||
$I->seeInCurrentUrl('#/template');
|
||||
$I->click($welcome_template);
|
||||
$title_element = '[data-automation-id="newsletter_title"]';
|
||||
$I->waitForElement($title_element);
|
||||
$I->seeInCurrentUrl('mailpoet-newsletter-editor');
|
||||
$I->fillField($title_element, $newsletter_title);
|
||||
$I->click('Next');
|
||||
$I->waitForText('Send this Welcome Email when');
|
||||
$I->click('Activate');
|
||||
$I->waitForElement('[data-automation-id="newsletters_listing_tabs"]');
|
||||
$I->seeInCurrentUrl('mailpoet-newsletters');
|
||||
$I->click('Welcome Emails');
|
||||
$I->seeInCurrentUrl('mailpoet-newsletters#/welcome');
|
||||
$I->searchFor($newsletter_title, 2);
|
||||
$I->waitForText($newsletter_title);
|
||||
$I->seeNoJSErrors();
|
||||
|
@@ -33,13 +33,11 @@ class EditExistingPostNotificationEmailCest {
|
||||
// step 4 - Edit subject
|
||||
$title_element = '[data-automation-id="newsletter_title"]';
|
||||
$I->waitForElement($title_element);
|
||||
$I->seeInCurrentUrl('mailpoet-newsletter-editor');
|
||||
$I->fillField($title_element, $newsletter_edited_title);
|
||||
|
||||
// step 5 - Change schedule, list and activate
|
||||
$I->click('Next');
|
||||
$I->waitForElement('input.select2-search__field');
|
||||
$I->seeInCurrentUrl('#/send');
|
||||
$I->selectOption('[data-automation-id="newsletter_interval_type"]', 'Weekly on...');
|
||||
$I->selectOptionInSelect2('WordPress Users');
|
||||
$newsletter_listing_element = '[data-automation-id="listing_item_' . basename($I->getCurrentUrl()) . '"]';
|
||||
|
@@ -20,32 +20,27 @@ class ManageSubscriptionLinkCest {
|
||||
|
||||
function sendEmail(\AcceptanceTester $I) {
|
||||
$I->wantTo('Create and send new email to WordPress Users list');
|
||||
|
||||
$I->login();
|
||||
$I->amOnMailpoetPage('Emails');
|
||||
$I->click('[data-automation-id="new_email"]');
|
||||
|
||||
// step 1 - select type
|
||||
$I->seeInCurrentUrl('#/new');
|
||||
$I->click('[data-automation-id="create_standard"]');
|
||||
|
||||
// step 2 - select template
|
||||
$first_template_element = '[data-automation-id="select_template_0"]';
|
||||
$I->waitForElement($first_template_element);
|
||||
$I->seeInCurrentUrl('#/template');
|
||||
$I->click($first_template_element);
|
||||
|
||||
// step 3 - design newsletter (update subject)
|
||||
$title_element ='[data-automation-id="newsletter_title"]';
|
||||
$I->waitForElement($title_element);
|
||||
$I->seeInCurrentUrl('mailpoet-newsletter-editor');
|
||||
$I->fillField($title_element, $this->newsletter_title);
|
||||
$I->click('Next');
|
||||
|
||||
// step 4 - send
|
||||
$search_field_element = 'input.select2-search__field';
|
||||
$I->waitForElement($search_field_element);
|
||||
$I->seeInCurrentUrl('#/send');
|
||||
$I->selectOptionInSelect2('WordPress Users');
|
||||
$I->click('Send');
|
||||
$I->waitForText('Sent to 1 of 1');
|
||||
@@ -53,7 +48,6 @@ class ManageSubscriptionLinkCest {
|
||||
|
||||
function manageSubscriptionLink(\AcceptanceTester $I) {
|
||||
$I->wantTo('Verify that "manage subscription" link works and subscriber status can be updated');
|
||||
|
||||
$I->amOnMailboxAppPage();
|
||||
$I->click(Locator::contains('span.subject', $this->newsletter_title));
|
||||
$I->switchToIframe('preview-html');
|
||||
|
@@ -14,12 +14,10 @@ class NewsletterCreationCest {
|
||||
$I->click('[data-automation-id="new_email"]');
|
||||
|
||||
// step 1 - select notification type
|
||||
$I->seeInCurrentUrl('#/new');
|
||||
$I->click('[data-automation-id="create_notification"]');
|
||||
|
||||
// step 2 - configure schedule
|
||||
$I->waitForText('Latest Post Notifications');
|
||||
$I->seeInCurrentUrl('#/new/notification');
|
||||
$I->selectOption('select[name=intervalType]', 'immediately');
|
||||
$I->click('Next');
|
||||
|
||||
@@ -27,20 +25,17 @@ class NewsletterCreationCest {
|
||||
$post_notification_template = '[data-automation-id="select_template_0"]';
|
||||
$I->waitForElement($post_notification_template);
|
||||
$I->see('Post Notifications', ['css' => 'a.current']);
|
||||
$I->seeInCurrentUrl('#/template');
|
||||
$I->click($post_notification_template);
|
||||
|
||||
// step 4 - design newsletter (update subject)
|
||||
$title_element = '[data-automation-id="newsletter_title"]';
|
||||
$I->waitForElement($title_element);
|
||||
$I->seeInCurrentUrl('mailpoet-newsletter-editor');
|
||||
$I->fillField($title_element, $newsletter_title);
|
||||
$I->click('Next');
|
||||
|
||||
// step 5 - activate
|
||||
$search_field_element = 'input.select2-search__field';
|
||||
$I->waitForElement($search_field_element);
|
||||
$I->seeInCurrentUrl('#/send');
|
||||
$I->see('Select a frequency');
|
||||
$newsletter_listing_element = '[data-automation-id="listing_item_' . basename($I->getCurrentUrl()) . '"]';
|
||||
$I->selectOptionInSelect2('WordPress Users');
|
||||
@@ -60,27 +55,23 @@ class NewsletterCreationCest {
|
||||
$I->click('[data-automation-id="new_email"]');
|
||||
|
||||
// step 1 - select notification type
|
||||
$I->seeInCurrentUrl('#/new');
|
||||
$I->click('[data-automation-id="create_standard"]');
|
||||
|
||||
// step 2 - select template
|
||||
$standard_template = '[data-automation-id="select_template_0"]';
|
||||
$I->waitForElement($standard_template);
|
||||
$I->see('Newsletters', ['css' => 'a.current']);
|
||||
$I->seeInCurrentUrl('#/template');
|
||||
$I->click($standard_template);
|
||||
|
||||
// step 3 - design newsletter (update subject)
|
||||
$title_element = '[data-automation-id="newsletter_title"]';
|
||||
$I->waitForElement($title_element);
|
||||
$I->seeInCurrentUrl('mailpoet-newsletter-editor');
|
||||
$I->fillField($title_element, $newsletter_title);
|
||||
$I->click('Next');
|
||||
|
||||
// step 4 - Choose list and send
|
||||
$send_form_element = '[data-automation-id="newsletter_send_form"]';
|
||||
$I->waitForElement($send_form_element);
|
||||
$I->seeInCurrentUrl('mailpoet-newsletters#/send/');
|
||||
$I->selectOptionInSelect2('WordPress Users');
|
||||
$I->click('Send');
|
||||
}
|
||||
|
@@ -19,19 +19,15 @@ class ReceiveStandardEmailCest {
|
||||
$I->login();
|
||||
$I->amOnMailpoetPage('Emails');
|
||||
$I->click('[data-automation-id=\'new_email\']');
|
||||
$I->seeInCurrentUrl('#/new');
|
||||
$I->click('[data-automation-id=\'create_standard\']');
|
||||
$I->waitForElement($standard_template);
|
||||
$I->see('Newsletters', ['css' => 'a.current']);
|
||||
$I->seeInCurrentUrl('#/template');
|
||||
$I->click($standard_template);
|
||||
$I->waitForElement($title_element);
|
||||
$I->seeInCurrentUrl('mailpoet-newsletter-editor');
|
||||
$I->fillField($title_element, $newsletter_title);
|
||||
$I->click('Next');
|
||||
//Choose list and send
|
||||
$I->waitForElement($send_form_element);
|
||||
$I->seeInCurrentUrl('mailpoet-newsletters#/send/');
|
||||
$I->selectOptionInSelect2('WordPress Users');
|
||||
$I->click('Send');
|
||||
$I->waitForElement('.mailpoet_progress_label', 90);
|
||||
|
@@ -14,29 +14,24 @@ class SaveNewsletterAsDraftCest {
|
||||
$I->click('[data-automation-id="new_email"]');
|
||||
|
||||
// step 1 - select notification type
|
||||
$I->seeInCurrentUrl('#/new');
|
||||
$I->click('[data-automation-id="create_standard"]');
|
||||
|
||||
// step 2 - select template
|
||||
$standard_template = '[data-automation-id="select_template_0"]';
|
||||
$I->waitForElement($standard_template);
|
||||
$I->see('Newsletters', ['css' => 'a.current']);
|
||||
$I->seeInCurrentUrl('#/template');
|
||||
$I->click($standard_template);
|
||||
|
||||
// step 3 - design newsletter (update subject)
|
||||
$title_element = '[data-automation-id="newsletter_title"]';
|
||||
$I->waitForElement($title_element);
|
||||
$I->seeInCurrentUrl('mailpoet-newsletter-editor');
|
||||
$I->fillField($title_element, $newsletter_title);
|
||||
$I->click('Next');
|
||||
|
||||
// step 4 - Choose list and send
|
||||
$send_form_element = '[data-automation-id="newsletter_send_form"]';
|
||||
$I->waitForElement($send_form_element);
|
||||
$I->seeInCurrentUrl('mailpoet-newsletters#/send/');
|
||||
$I->selectOptionInSelect2('WordPress Users');
|
||||
|
||||
$I->click('Save as draft and close');
|
||||
$I->waitForText($newsletter_title);
|
||||
}
|
||||
|
@@ -34,16 +34,13 @@ class SaveNewsletterAsTemplateCest {
|
||||
//step 4 - confirm template can be used
|
||||
$I->amOnMailpoetPage('Emails');
|
||||
$I->click('[data-automation-id="new_email"]');
|
||||
$I->seeInCurrentUrl('#/new');
|
||||
$I->click('[data-automation-id="create_standard"]');
|
||||
$I->waitForText('Newsletters');
|
||||
$I->seeInCurrentUrl('#/template');
|
||||
|
||||
$I->waitForElement('[data-automation-id="select_template_0"]');
|
||||
$I->see('Magical Unicorn Test Template');
|
||||
$I->click(['xpath' => '//*[text()="' . $template_name . '"]//ancestor::*[@data-automation-id="select_template_box"]//*[starts-with(@data-automation-id,"select_template_")]']);
|
||||
$I->waitForElement('[data-automation-id="newsletter_title"]');
|
||||
$I->seeInCurrentUrl('mailpoet-newsletter-editor');
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -23,11 +23,9 @@ class SaveNotificationAsDraftCest {
|
||||
//Save Notification As Draft
|
||||
$send_form_element = '[data-automation-id="newsletter_send_form"]';
|
||||
$I->waitForElement($send_form_element);
|
||||
$I->seeInCurrentUrl('mailpoet-newsletters#/send/');
|
||||
$I->selectOptionInSelect2('WordPress Users');
|
||||
$I->click('Save as draft and close');
|
||||
$I->waitForElement('[data-automation-id="newsletters_listing_tabs"]');
|
||||
$I->seeInCurrentUrl('/wp-admin/admin.php?page=mailpoet-newsletters#/notification');
|
||||
$I->waitForText('Draft Test Post Notification');
|
||||
}
|
||||
|
||||
|
@@ -40,16 +40,13 @@ class SavePostNotificationEmailAsTemplateCest {
|
||||
// step 4 - Use the new template
|
||||
$I->amOnMailpoetPage('Emails');
|
||||
$I->click('[data-automation-id="new_email"]');
|
||||
$I->seeInCurrentUrl('#/new');
|
||||
$I->click('[data-automation-id="create_notification"]');
|
||||
$I->waitForText('Latest Post Notifications');
|
||||
$I->seeInCurrentUrl('#/new/notification');
|
||||
$I->click('Next');
|
||||
$I->waitForElement('[data-automation-id="select_template_0"]');
|
||||
$I->see('Template Test Post Notification Title');
|
||||
$I->click(['xpath' => '//*[text()="' . $template_title . '"]//ancestor::*[@data-automation-id="select_template_box"]//*[starts-with(@data-automation-id,"select_template_")]']);
|
||||
$I->waitForElement('[data-automation-id="newsletter_title"]');
|
||||
$I->seeInCurrentUrl('mailpoet-newsletter-editor');
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -23,14 +23,12 @@ class ScheduleNewsletterCest {
|
||||
|
||||
// step 4 - Choose list and schedule
|
||||
$I->waitForElement('[data-automation-id="newsletter_send_form"]');
|
||||
$I->seeInCurrentUrl('mailpoet-newsletters#/send/');
|
||||
$I->selectOptionInSelect2('WordPress Users');
|
||||
$I->checkOption('isScheduled');
|
||||
$I->click('select[name=time]');
|
||||
$I->selectOption('form select[name=time]', '6:00');
|
||||
$I->click('Schedule');
|
||||
$I->waitForElement('[data-automation-id="newsletters_listing_tabs"]');
|
||||
$I->seeInCurrentUrl('mailpoet-newsletters');
|
||||
|
||||
}
|
||||
|
||||
|
@@ -31,7 +31,6 @@ class SettingsPageBasicsCest {
|
||||
$I->wantTo('Confirm default sender information can be edited');
|
||||
$I->login();
|
||||
$I->amOnMailPoetPage('Settings');
|
||||
$I->seeInCurrentUrl('page=mailpoet-settings');
|
||||
$I->fillField(['name' => 'sender[name]'], 'Sender');
|
||||
$I->fillField(['name' => 'sender[address]'], 'sender@fake.fake');
|
||||
$I->fillField(['name' => 'reply_to[name]'], 'Reply Name');
|
||||
@@ -45,7 +44,6 @@ class SettingsPageBasicsCest {
|
||||
$post_title = 'Hello world!';
|
||||
$I->login();
|
||||
$I->amOnMailPoetPage('Settings');
|
||||
$I->seeInCurrentUrl('page=mailpoet-settings');
|
||||
$I->checkOption('#settings[subscribe_on_comment]');
|
||||
$I->selectOptionInSelect2('My First List');
|
||||
//save settings
|
||||
@@ -57,7 +55,6 @@ class SettingsPageBasicsCest {
|
||||
$I->waitForElement(['css'=>'.comment-form-mailpoet']);
|
||||
//clear checkbox to hide Select2 from next test
|
||||
$I->amOnMailPoetPage('Settings');
|
||||
$I->seeInCurrentUrl('page=mailpoet-settings');
|
||||
$I->uncheckOption('#settings[subscribe_on_comment]');
|
||||
//save settings
|
||||
$I->click('[data-automation-id="settings-submit-button"]');
|
||||
|
@@ -10,7 +10,6 @@ class SettingsUnsubscribePageCest {
|
||||
$I->click('[data-automation-id="unsubscribe_page_preview_link"]');
|
||||
$I->switchToNextTab();
|
||||
$I->waitForElement(['css'=>'.entry-title']);
|
||||
$I->seeInCurrentUrl('&action=unsubscribe');
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -26,7 +26,6 @@ class SubscriberManageImportExportCest {
|
||||
$I->waitForText('Import again');
|
||||
//confirm subscribers from import list were added
|
||||
$I->amOnMailPoetPage ('Subscribers');
|
||||
$I->seeInCurrentUrl('mailpoet-subscribers#');
|
||||
$I->searchFor('aaa@example.com', 2);
|
||||
$I->waitForText('aaa@example.com');
|
||||
$I->searchFor('bbb@example.com');
|
||||
|
@@ -55,7 +55,6 @@ class SubscriberManagementCest {
|
||||
$I->login();
|
||||
$I->amOnMailPoetPage ('Subscribers');
|
||||
$I->click(['xpath'=>'//*[@id="subscribers_container"]/div/h1/a[1]']);
|
||||
$I->seeInCurrentUrl('/wp-admin/admin.php?page=mailpoet-subscribers#/new');
|
||||
$I->fillField(['name' => 'email'], 'newglobaluser99@fakemail.fake');
|
||||
$I->fillField(['name' => 'first_name'], 'New');
|
||||
$I->fillField(['name' => 'last_name'], 'GlobalUser');
|
||||
@@ -94,7 +93,6 @@ class SubscriberManagementCest {
|
||||
$I->waitForListingItemsToLoad();
|
||||
$I->clickItemRowActionByItemName($new_subscriber_email, 'Edit');
|
||||
$I->waitForText('Subscriber');
|
||||
$I->seeInCurrentUrl('mailpoet-subscribers#/edit/');
|
||||
$I->waitForElementNotVisible('.mailpoet_form_loading');
|
||||
$I->selectOptionInSelect2('Cooking');
|
||||
$I->click('[data-automation-id="subscriber_edit_form"] input[type="submit"]');
|
||||
@@ -110,7 +108,6 @@ class SubscriberManagementCest {
|
||||
$I->waitForListingItemsToLoad();
|
||||
$I->clickItemRowActionByItemName($new_subscriber_email, 'Edit');
|
||||
$I->waitForText('Subscriber');
|
||||
$I->seeInCurrentUrl('mailpoet-subscribers#/edit/');
|
||||
$I->waitForElementNotVisible('.mailpoet_form_loading');
|
||||
$I->selectOptionInSelect2('Cooking');
|
||||
$I->click('.select2-selection__choice__remove');
|
||||
@@ -127,7 +124,6 @@ class SubscriberManagementCest {
|
||||
$I->waitForListingItemsToLoad();
|
||||
$I->clickItemRowActionByItemName($new_subscriber_email, 'Edit');
|
||||
$I->waitForText('Subscriber');
|
||||
$I->seeInCurrentUrl('mailpoet-subscribers#/edit/');
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -23,7 +23,6 @@ class SubscriptionFormEditCest {
|
||||
$I->clickItemRowActionByItemName($form_name, 'Edit');
|
||||
$title_element = '[data-automation-id="mailpoet_form_name_input"]';
|
||||
$I->waitForElement($title_element);
|
||||
$I->seeInCurrentUrl('mailpoet-form-editor');
|
||||
$I->fillField($title_element, $form_edited_name);
|
||||
$I->selectOptionInSelect2('My First List');
|
||||
$I->click('[data-automation-id="save_form"]');
|
||||
|
Reference in New Issue
Block a user