Do not wait for template to confirm being saved on send page

[MAILPOET-1797]
This commit is contained in:
Rostislav Wolny
2019-03-05 14:25:12 +01:00
committed by M. Shull
parent 66ae3edf78
commit a657554f66
3 changed files with 4 additions and 3 deletions

View File

@ -115,12 +115,12 @@ const NewsletterSend = createReactClass({ // eslint-disable-line react/prefer-es
body: JSON.stringify(response.data.body), body: JSON.stringify(response.data.body),
categories: '["recent"]', categories: '["recent"]',
}, },
}).then(done).fail((err) => { }).fail((err) => {
this.showError(err); this.showError(err);
this.setState({ loading: false }); this.setState({ loading: false });
MailPoet.Modal.loading(false); MailPoet.Modal.loading(false);
done();
}); });
done();
}) })
.catch((err) => { .catch((err) => {
this.showError({ errors: [err] }); this.showError({ errors: [err] });

View File

@ -43,6 +43,7 @@ class NewsletterTemplates extends APIEndpoint {
} }
function save($data = array()) { function save($data = array()) {
ignore_user_abort(true);
if (!empty($data['newsletter_id'])) { if (!empty($data['newsletter_id'])) {
$template = NewsletterTemplate::whereEqual('newsletter_id', $data['newsletter_id'])->findOne(); $template = NewsletterTemplate::whereEqual('newsletter_id', $data['newsletter_id'])->findOne();
if (!empty($template)) { if (!empty($template)) {

View File

@ -43,7 +43,7 @@ class ManageSubscriptionLinkCest {
$I->waitForElement($search_field_element); $I->waitForElement($search_field_element);
$I->selectOptionInSelect2('WordPress Users'); $I->selectOptionInSelect2('WordPress Users');
$I->click('Send'); $I->click('Send');
$I->waitForText('Sent to 1 of 1'); $I->waitForText('Sent to 1 of 1', 60);
} }
function manageSubscriptionLink(\AcceptanceTester $I) { function manageSubscriptionLink(\AcceptanceTester $I) {