fix public.js not included when only shortcode is used
This commit is contained in:
committed by
Pavel Dohnal
parent
6f20a402f6
commit
d70c6ce453
@ -89,7 +89,7 @@ class Widget extends \WP_Widget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setupDependencies() {
|
function setupDependencies() {
|
||||||
if(!is_active_widget(false, false, $this->id_base, true)) return;
|
if(wp_script_is('mailpoet_public', 'enqueued')) return;
|
||||||
|
|
||||||
wp_enqueue_style(
|
wp_enqueue_style(
|
||||||
'mailpoet_public',
|
'mailpoet_public',
|
||||||
|
@ -25,6 +25,17 @@ class SubscriptionFormCest {
|
|||||||
$I->cli('widget reset sidebar-1 --allow-root');
|
$I->cli('widget reset sidebar-1 --allow-root');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function subscriptionFormShortcode(\AcceptanceTester $I) {
|
||||||
|
$I->wantTo('Subscribe using form shortcode');
|
||||||
|
|
||||||
|
$I->amOnPage('/form-test');
|
||||||
|
$I->fillField('[data-automation-id=\'form_email\']', $this->subscriber_email);
|
||||||
|
$I->click('.mailpoet_submit');
|
||||||
|
$I->waitForText('Check your inbox or spam folder to confirm your subscription.', self::CONFIRMATION_MESSAGE_TIMEOUT, '.mailpoet_validate_success');
|
||||||
|
$I->seeNoJSErrors();
|
||||||
|
$I->seeCurrentUrlEquals('/form-test');
|
||||||
|
}
|
||||||
|
|
||||||
function subscriptionFormIframe(\AcceptanceTester $I) {
|
function subscriptionFormIframe(\AcceptanceTester $I) {
|
||||||
$I->wantTo('Subscribe using iframe form');
|
$I->wantTo('Subscribe using iframe form');
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user