From 68708fc6ad04f2c65daf427aadab2bc73f7aed75 Mon Sep 17 00:00:00 2001 From: Amine Ben hammou Date: Mon, 29 Apr 2019 14:10:53 +0200 Subject: [PATCH] Rollback acceptance test changes --- .../EditSignUpConfirmationEmailCest.php | 8 ++------ ...EnableAndDisableSignupConfirmationCest.php | 1 - .../SubscribeToMultipleListsCest.php | 2 -- tests/acceptance/SubscriptionFormCest.php | 20 ------------------- 4 files changed, 2 insertions(+), 29 deletions(-) diff --git a/tests/acceptance/EditSignUpConfirmationEmailCest.php b/tests/acceptance/EditSignUpConfirmationEmailCest.php index 03ccc718b2..8d1db49909 100644 --- a/tests/acceptance/EditSignUpConfirmationEmailCest.php +++ b/tests/acceptance/EditSignUpConfirmationEmailCest.php @@ -4,10 +4,8 @@ namespace MailPoet\Test\Acceptance; use Codeception\Util\Locator; use MailPoet\Test\DataFactories\Settings; -use MailPoet\Test\DataFactories\Form; require_once __DIR__ . '/../DataFactories/Settings.php'; -require_once __DIR__ . '/../DataFactories/Form.php'; class EditSignUpConfirmationEmailCest { @@ -16,10 +14,8 @@ class EditSignUpConfirmationEmailCest { // make sure sign up confirmation is enabled $settings = new Settings(); - $settings->withConfirmationEmailEnabled(); - - $forms = new Form(); - $forms->withDefaultSuccessMessage(); + $settings + ->withConfirmationEmailEnabled(); $I->login(); $I->amOnMailPoetPage('Settings'); diff --git a/tests/acceptance/EnableAndDisableSignupConfirmationCest.php b/tests/acceptance/EnableAndDisableSignupConfirmationCest.php index 7c9c5dadd0..0d3a272e7c 100644 --- a/tests/acceptance/EnableAndDisableSignupConfirmationCest.php +++ b/tests/acceptance/EnableAndDisableSignupConfirmationCest.php @@ -50,6 +50,5 @@ class EnableAndDisableSignupConfirmationCest { $I->click($choice_selector); $I->acceptPopup(); $I->click('[data-automation-id="settings-submit-button"]'); - $I->waitForText('Settings saved'); } } diff --git a/tests/acceptance/SubscribeToMultipleListsCest.php b/tests/acceptance/SubscribeToMultipleListsCest.php index 94d9363266..5fcf692d85 100644 --- a/tests/acceptance/SubscribeToMultipleListsCest.php +++ b/tests/acceptance/SubscribeToMultipleListsCest.php @@ -37,8 +37,6 @@ class SubscribeToMultipleListsCest { ->withConfirmationEmailBody() ->withConfirmationEmailSubject('Subscribe to multiple test subject'); - $form_factory->withDefaultSuccessMessage(); - //Add this form to a widget $I->createFormAndSubscribe($form); //Subscribe via that form diff --git a/tests/acceptance/SubscriptionFormCest.php b/tests/acceptance/SubscriptionFormCest.php index e63bff6c42..5817c6faac 100644 --- a/tests/acceptance/SubscriptionFormCest.php +++ b/tests/acceptance/SubscriptionFormCest.php @@ -88,26 +88,6 @@ class SubscriptionFormCest { $I->see('Subscribed', Locator::contains('tr', $this->subscriber_email)); } - function subscriptionAfterDisablingConfirmation(\AcceptanceTester $I) { - $I->wantTo('Disable sign-up confirmation then subscribe and see a different message'); - $I->login(); - - $I->amOnMailPoetPage('Settings'); - $I->click('[data-automation-id="signup_settings_tab"]'); - $I->waitForText('Enable sign-up confirmation'); - $I->click('[data-automation-id="disable_signup_confirmation"]'); - $I->acceptPopup(); - $I->click('[data-automation-id="settings-submit-button"]'); - $I->waitForText('Settings saved'); - - $I->amOnPage('/form-test'); - $I->switchToIframe('mailpoet_form_iframe'); - $I->fillField('[data-automation-id="form_email"]', $this->subscriber_email); - $I->click('.mailpoet_submit'); - $I->waitForText("You’ve been successfully subscribed to our newsletter!", self::CONFIRMATION_MESSAGE_TIMEOUT, '.mailpoet_validate_success'); - $I->seeNoJSErrors(); - } - function _after(\AcceptanceTester $I) { $I->cli('db query "TRUNCATE TABLE mp_mailpoet_subscriber_ips" --allow-root'); }