Rollback acceptance test changes
This commit is contained in:
committed by
M. Shull
parent
937b0229e5
commit
68708fc6ad
@ -4,10 +4,8 @@ namespace MailPoet\Test\Acceptance;
|
|||||||
|
|
||||||
use Codeception\Util\Locator;
|
use Codeception\Util\Locator;
|
||||||
use MailPoet\Test\DataFactories\Settings;
|
use MailPoet\Test\DataFactories\Settings;
|
||||||
use MailPoet\Test\DataFactories\Form;
|
|
||||||
|
|
||||||
require_once __DIR__ . '/../DataFactories/Settings.php';
|
require_once __DIR__ . '/../DataFactories/Settings.php';
|
||||||
require_once __DIR__ . '/../DataFactories/Form.php';
|
|
||||||
|
|
||||||
class EditSignUpConfirmationEmailCest {
|
class EditSignUpConfirmationEmailCest {
|
||||||
|
|
||||||
@ -16,10 +14,8 @@ class EditSignUpConfirmationEmailCest {
|
|||||||
|
|
||||||
// make sure sign up confirmation is enabled
|
// make sure sign up confirmation is enabled
|
||||||
$settings = new Settings();
|
$settings = new Settings();
|
||||||
$settings->withConfirmationEmailEnabled();
|
$settings
|
||||||
|
->withConfirmationEmailEnabled();
|
||||||
$forms = new Form();
|
|
||||||
$forms->withDefaultSuccessMessage();
|
|
||||||
|
|
||||||
$I->login();
|
$I->login();
|
||||||
$I->amOnMailPoetPage('Settings');
|
$I->amOnMailPoetPage('Settings');
|
||||||
|
@ -50,6 +50,5 @@ class EnableAndDisableSignupConfirmationCest {
|
|||||||
$I->click($choice_selector);
|
$I->click($choice_selector);
|
||||||
$I->acceptPopup();
|
$I->acceptPopup();
|
||||||
$I->click('[data-automation-id="settings-submit-button"]');
|
$I->click('[data-automation-id="settings-submit-button"]');
|
||||||
$I->waitForText('Settings saved');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,8 +37,6 @@ class SubscribeToMultipleListsCest {
|
|||||||
->withConfirmationEmailBody()
|
->withConfirmationEmailBody()
|
||||||
->withConfirmationEmailSubject('Subscribe to multiple test subject');
|
->withConfirmationEmailSubject('Subscribe to multiple test subject');
|
||||||
|
|
||||||
$form_factory->withDefaultSuccessMessage();
|
|
||||||
|
|
||||||
//Add this form to a widget
|
//Add this form to a widget
|
||||||
$I->createFormAndSubscribe($form);
|
$I->createFormAndSubscribe($form);
|
||||||
//Subscribe via that form
|
//Subscribe via that form
|
||||||
|
@ -88,26 +88,6 @@ class SubscriptionFormCest {
|
|||||||
$I->see('Subscribed', Locator::contains('tr', $this->subscriber_email));
|
$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) {
|
function _after(\AcceptanceTester $I) {
|
||||||
$I->cli('db query "TRUNCATE TABLE mp_mailpoet_subscriber_ips" --allow-root');
|
$I->cli('db query "TRUNCATE TABLE mp_mailpoet_subscriber_ips" --allow-root');
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user