[MQ-109] tests text block can be added to editor
This commit is contained in:
@ -80,6 +80,7 @@ Module.TextBlockSettingsView = base.BlockSettingsView.extend({
|
||||
});
|
||||
|
||||
Module.TextWidgetView = base.WidgetView.extend({
|
||||
id: 'automation_editor_block_text',
|
||||
getTemplate: function getTemplate() { return window.templates.textInsertion; },
|
||||
behaviors: {
|
||||
DraggableBehavior: {
|
||||
|
29
tests/acceptance/EditorTextBlockCest.php
Normal file
29
tests/acceptance/EditorTextBlockCest.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace MailPoet\Test\Acceptance;
|
||||
|
||||
use MailPoet\Test\DataFactories\Newsletter;
|
||||
|
||||
require_once __DIR__ . '/../DataFactories/Newsletter.php';
|
||||
|
||||
class EditorTextBlockCest {
|
||||
function addText(\AcceptanceTester $I) {
|
||||
$I->wantTo('add Text block to newsletter');
|
||||
$newsletterTitle = 'Text Block Newsletter';
|
||||
$textInEditor = ('[data-automation-id="text_block_in_editor"]');
|
||||
(new Newsletter())
|
||||
->withSubject($newsletterTitle)
|
||||
->loadBodyFrom('newsletterWithText.json')
|
||||
->create();
|
||||
$I->login();
|
||||
$I->amOnMailpoetPage('Emails');
|
||||
$I->waitForText($newsletterTitle);
|
||||
$I->clickItemRowActionByItemName($newsletterTitle, 'Edit');
|
||||
// Create Text block
|
||||
$I->waitForText('Text');
|
||||
$I->wait(1); // just to be sure
|
||||
$I->dragAndDrop('#automation_editor_block_text', '#mce_1');
|
||||
$I->waitForText('Edit this to insert text.');
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
<div class="mailpoet_tools"></div>
|
||||
<div class="mailpoet_content mailpoet_text_content">
|
||||
<div class="mailpoet_content mailpoet_text_content" data-automation-id="text_block_in_editor">
|
||||
{{{ model.text }}}
|
||||
</div>
|
||||
<div class="mailpoet_block_highlight"></div>
|
||||
|
Reference in New Issue
Block a user