Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into jquery-upgrade
  • Loading branch information
jcuerdo committed May 12, 2021
2 parents 855489f + 5f05166 commit 53c0b2f
Show file tree
Hide file tree
Showing 387 changed files with 960 additions and 102,459 deletions.
5 changes: 0 additions & 5 deletions app/code/Magento/Cms/Test/Mftf/Data/WysiwygConfigData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
<data key="scope_id">0</data>
<data key="value">disabled</data>
</entity>
<entity name="WysiwygTinyMCE3Enable" deprecated="Use WysiwygTinyMCE4Enable instead">
<data key="path">cms/wysiwyg/editor</data>
<data key="scope_id">0</data>
<data key="value">Magento_Tinymce3/tinymce3Adapter</data>
</entity>
<entity name="WysiwygTinyMCE4Enable">
<data key="path">cms/wysiwyg/editor</data>
<data key="scope_id">0</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<element name="imageSelected" type="text" selector="//small[text()='{{var1}}']/parent::*[@class='filecnt selected']" parameterized="true"/>
<element name="ImageSource" type="input" selector=".mce-combobox.mce-abs-layout-item.mce-last.mce-has-open"/>
<element name="ImageDescription" type="input" selector=".mce-textbox.mce-abs-layout-item.mce-last"/>
<element name="ImageDescriptionTinyMCE3" type="input" selector="#alt" deprecated="Deprecated New element was introduced. Please use 'ImageDescriptionTinyMCE4'"/>
<element name="ImageDescriptionTinyMCE4" type="input" selector="#alt" />
<element name="Height" type="input" selector=".mce-textbox.mce-abs-layout-item.mce-first"/>
<element name="UploadImage" type="file" selector=".fileupload"/>
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,33 @@

namespace Magento\MediaGalleryIntegration\Test\Integration\Model;

use Magento\Cms\Model\Wysiwyg\Config;
use Magento\Cms\Model\Wysiwyg\Gallery\DefaultConfigProvider;
use Magento\Cms\Helper\Wysiwyg\Images;
use Magento\Framework\DataObject;
use Magento\Framework\ObjectManagerInterface;
use Magento\Framework\UrlInterface;
use Magento\TestFramework\Helper\Bootstrap;
use Magento\Tinymce3\Model\Config\Gallery\Config;
use PHPUnit\Framework\TestCase;

/**
* Provide integration tests cover update open dialog url functionality for media editor.
* @magentoAppArea adminhtml
*/
class TinyMceOpenDialogUrlTest extends TestCase
class GalleryConfigProviderOpenDialogUrlTest extends TestCase
{
private const FILES_BROWSER_WINDOW_URL = 'files_browser_window_url';
private const MEDIA_GALLERY_URL = 'media_gallery/index/index';

/**
* @var ObjectManagerInterface
*/
private $objectManger;

/**
* @var Config
* @var DefaultConfigProvider
*/
private $tinyMce3Config;
private $galleryConfigProvider;

/**
* @var DataObject
Expand All @@ -49,11 +52,17 @@ class TinyMceOpenDialogUrlTest extends TestCase
protected function setUp(): void
{
$this->objectManger = Bootstrap::getObjectManager();
$this->tinyMce3Config = $this->objectManger->create(Config::class);
$this->galleryConfigProvider = $this->objectManger->create(DefaultConfigProvider::class);
$this->configDataObject = $this->objectManger->create(DataObject::class);

$url = $this->objectManger->create(UrlInterface::class);
$this->fileBrowserWindowUrl = $url->getUrl('media_gallery/index/index');

$this->fileBrowserWindowUrl = $url->getUrl(
self::MEDIA_GALLERY_URL,
[
'current_tree_path' => $this->objectManger->get(Images::class)->idEncode(Config::IMAGE_DIRECTORY),
]
);
}

/**
Expand All @@ -62,7 +71,7 @@ protected function setUp(): void
*/
public function testWithEnhancedMediaGalleryDisabled(): void
{
$config = $this->tinyMce3Config->getConfig($this->configDataObject);
$config = $this->galleryConfigProvider->getConfig($this->configDataObject);
self::assertNotEquals($this->fileBrowserWindowUrl, $config->getData(self::FILES_BROWSER_WINDOW_URL));
}

Expand All @@ -72,7 +81,7 @@ public function testWithEnhancedMediaGalleryDisabled(): void
*/
public function testWithEnhancedMediaGalleryEnabled(): void
{
$config = $this->tinyMce3Config->getConfig($this->configDataObject);
$config = $this->galleryConfigProvider->getConfig($this->configDataObject);
self::assertEquals($this->fileBrowserWindowUrl, $config->getData(self::FILES_BROWSER_WINDOW_URL));
}
}
Loading

0 comments on commit 53c0b2f

Please sign in to comment.