[MQ-105] tests adding social block to editor
This commit is contained in:
@@ -270,6 +270,7 @@ SocialBlockSettingsStylesView = Marionette.View.extend({
|
||||
});
|
||||
|
||||
Module.SocialWidgetView = base.WidgetView.extend({
|
||||
id: 'automation_editor_block_social',
|
||||
getTemplate: function () { return window.templates.socialInsertion; },
|
||||
behaviors: {
|
||||
DraggableBehavior: {
|
||||
|
34
tests/acceptance/EditorSocialBlockCest.php
Normal file
34
tests/acceptance/EditorSocialBlockCest.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace MailPoet\Test\Acceptance;
|
||||
|
||||
use MailPoet\Test\DataFactories\Newsletter;
|
||||
|
||||
require_once __DIR__ . '/../DataFactories/Newsletter.php';
|
||||
|
||||
class EditorSocialBlockCest {
|
||||
function addSocialBlock(\AcceptanceTester $I) {
|
||||
$I->wantTo('add social block to newsletter');
|
||||
$newsletterTitle = 'Social Block Newsletter';
|
||||
$socialBlockInEditor = ('[data-automation-id="socialBlock"]');
|
||||
$socialBlockSettingsAssertion = ('[data-automation-id="social_select_another_network"]');
|
||||
(new Newsletter())
|
||||
->withSubject($newsletterTitle)
|
||||
->loadBodyFrom('newsletterWithText.json')
|
||||
->create();
|
||||
$I->login();
|
||||
$I->amOnMailpoetPage('Emails');
|
||||
$I->waitForText($newsletterTitle);
|
||||
$I->clickItemRowActionByItemName($newsletterTitle, 'Edit');
|
||||
// Create social block
|
||||
$I->waitForText('Social');
|
||||
$I->wait(1); // just to be sure
|
||||
$I->dragAndDrop('#automation_editor_block_social', '#mce_1');
|
||||
//Open settings by clicking on block
|
||||
$I->moveMouseOver($socialBlockInEditor, 3, 2);
|
||||
$I->click($socialBlockInEditor);
|
||||
$I->waitForElementVisible($socialBlockSettingsAssertion);
|
||||
$I->click('Done');
|
||||
}
|
||||
|
||||
}
|
@@ -1,6 +1,7 @@
|
||||
<div class="mailpoet_tools"></div>
|
||||
<div
|
||||
class="mailpoet_content mailpoet_social"
|
||||
data-automation-id="socialBlock"
|
||||
style="text-align: {{model.styles.block.textAlign}}"
|
||||
>
|
||||
</div>
|
||||
|
@@ -1,2 +1,2 @@
|
||||
<div id="mailpoet_social_icon_selector_contents"></div>
|
||||
<input type="button" class="button button-secondary mailpoet_button_full mailpoet_add_social_icon" value="<%= __('Add another social network') %>" />
|
||||
<input type="button" class="button button-secondary mailpoet_button_full mailpoet_add_social_icon" data-automation-id='social_select_another_network' value="<%= __('Add another social network') %>" />
|
||||
|
Reference in New Issue
Block a user