diff --git a/app/code/Magento/Catalog/Model/Product/Option/Type/File.php b/app/code/Magento/Catalog/Model/Product/Option/Type/File.php
index d974174ef7088e4a14a9e031e7e266d827ceb13d..70c20a4e314903ce9defb0e40f50c912a83d7307 100644
--- a/app/code/Magento/Catalog/Model/Product/Option/Type/File.php
+++ b/app/code/Magento/Catalog/Model/Product/Option/Type/File.php
@@ -5,6 +5,7 @@
  */
 namespace Magento\Catalog\Model\Product\Option\Type;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Filesystem;
 use Magento\Framework\Exception\LocalizedException;
 use Magento\Catalog\Model\Product\Exception as ProductException;
@@ -69,17 +70,23 @@ class File extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
      */
     protected $validatorFile;
 
+    /**
+     * @var Filesystem
+     */
+    private $filesystem;
+
     /**
      * @param \Magento\Checkout\Model\Session $checkoutSession
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
      * @param \Magento\Quote\Model\Quote\Item\OptionFactory $itemOptionFactory
-     * @param \Magento\Catalog\Model\Product\Option\UrlBuilder $urlBuilder
-     * @param \Magento\Framework\Escaper $escaper
      * @param \Magento\MediaStorage\Helper\File\Storage\Database $coreFileStorageDatabase
      * @param File\ValidatorInfo $validatorInfo
      * @param File\ValidatorFile $validatorFile
+     * @param \Magento\Catalog\Model\Product\Option\UrlBuilder $urlBuilder
+     * @param \Magento\Framework\Escaper $escaper
      * @param array $data
-     * @throws \Magento\Framework\Exception\FileSystemException
+     * @param Filesystem $filesystem
+     * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
         \Magento\Checkout\Model\Session $checkoutSession,
@@ -90,12 +97,15 @@ class File extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
         \Magento\Catalog\Model\Product\Option\Type\File\ValidatorFile $validatorFile,
         \Magento\Catalog\Model\Product\Option\UrlBuilder $urlBuilder,
         \Magento\Framework\Escaper $escaper,
-        array $data = []
+        array $data = [],
+        Filesystem $filesystem = null
     ) {
         $this->_itemOptionFactory = $itemOptionFactory;
         $this->_urlBuilder = $urlBuilder;
         $this->_escaper = $escaper;
         $this->_coreFileStorageDatabase = $coreFileStorageDatabase;
+        $this->filesystem = $filesystem ?: \Magento\Framework\App\ObjectManager::getInstance()->get(Filesystem::class);
+        $this->_rootDirectory = $this->filesystem->getDirectoryRead(DirectoryList::MEDIA);
         $this->validatorInfo = $validatorInfo;
         $this->validatorFile = $validatorFile;
         parent::__construct($checkoutSession, $scopeConfig, $data);
diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/Option/Type/FileTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/Option/Type/FileTest.php
index 9b41651863fdb21112d422dd7bda8ee6a97aa09b..6682b295476325f2df099faa183d5edb451cadb5 100644
--- a/app/code/Magento/Catalog/Test/Unit/Model/Product/Option/Type/FileTest.php
+++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/Option/Type/FileTest.php
@@ -5,6 +5,12 @@
  */
 namespace Magento\Catalog\Test\Unit\Model\Product\Option\Type;
 
+use Magento\Catalog\Model\Product\Configuration\Item\Option\OptionInterface;
+use Magento\Framework\App\Filesystem\DirectoryList;
+use Magento\Framework\Filesystem;
+use Magento\Framework\Filesystem\Directory\ReadInterface;
+use Magento\Framework\Filesystem\DriverPool;
+
 class FileTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -13,7 +19,7 @@ class FileTest extends \PHPUnit_Framework_TestCase
     protected $objectManager;
 
     /**
-     * @var \Magento\Framework\Filesystem\Directory\ReadInterface|\PHPUnit_Framework_MockObject_MockObject
+     * @var ReadInterface|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $rootDirectory;
 
@@ -22,14 +28,26 @@ class FileTest extends \PHPUnit_Framework_TestCase
      */
     protected $coreFileStorageDatabase;
 
+    /**
+     * @var Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $filesystemMock;
+
     protected function setUp()
     {
         $this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
 
-        $this->rootDirectory = $this->getMockBuilder(\Magento\Framework\Filesystem\Directory\ReadInterface::class)
+        $this->filesystemMock = $this->getMockBuilder(Filesystem::class)
             ->disableOriginalConstructor()
-            ->setMethods(['isFile', 'isReadable', 'getAbsolutePath'])
-            ->getMockForAbstractClass();
+            ->getMock();
+
+        $this->rootDirectory = $this->getMockBuilder(ReadInterface::class)
+            ->getMock();
+
+        $this->filesystemMock->expects($this->once())
+            ->method('getDirectoryRead')
+            ->with(DirectoryList::MEDIA, DriverPool::FILE)
+            ->willReturn($this->rootDirectory);
 
         $this->coreFileStorageDatabase = $this->getMock(
             \Magento\MediaStorage\Helper\File\Storage\Database::class,
@@ -48,26 +66,27 @@ class FileTest extends \PHPUnit_Framework_TestCase
         return $this->objectManager->getObject(
             \Magento\Catalog\Model\Product\Option\Type\File::class,
             [
-                'saleableItem' => $this->rootDirectory,
-                'priceCurrency' => $this->coreFileStorageDatabase
+                'filesystem' => $this->filesystemMock,
+                'coreFileStorageDatabase' => $this->coreFileStorageDatabase
             ]
         );
     }
 
     public function testCopyQuoteToOrder()
     {
-        $optionMock = $this->getMockBuilder(
-            \Magento\Catalog\Model\Product\Configuration\Item\Option\OptionInterface::class
-        )->disableOriginalConstructor()->setMethods(['getValue'])->getMockForAbstractClass();
+        $optionMock = $this->getMockBuilder(OptionInterface::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['getValue'])
+            ->getMockForAbstractClass();
 
         $quotePath = '/quote/path/path/uploaded.file';
         $orderPath = '/order/path/path/uploaded.file';
 
         $optionMock->expects($this->any())
             ->method('getValue')
-            ->will($this->returnValue(['quote_path' => $quotePath, 'order_path' => $orderPath]));
+            ->will($this->returnValue(serialize(['quote_path' => $quotePath, 'order_path' => $orderPath])));
 
-        $this->rootDirectory->expects($this->any())
+        $this->rootDirectory->expects($this->once())
             ->method('isFile')
             ->with($this->equalTo($quotePath))
             ->will($this->returnValue(true));
diff --git a/app/code/Magento/Catalog/etc/di.xml b/app/code/Magento/Catalog/etc/di.xml
index b355dd2601c3da3a62ad21c0ccf0267e0c2ef809..d191f0332f5f28d28f22e981f8ebc74f0c0c8b98 100644
--- a/app/code/Magento/Catalog/etc/di.xml
+++ b/app/code/Magento/Catalog/etc/di.xml
@@ -834,4 +834,7 @@
             <argument name="collectionProcessor" xsi:type="object">Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor</argument>
         </arguments>
     </type>
+    <type name="Magento\Quote\Model\Quote\Item\ToOrderItem">
+        <plugin name="copy_quote_files_to_order" type="Magento\Catalog\Model\Plugin\QuoteItemProductOption"/>
+    </type>
 </config>
diff --git a/app/code/Magento/Catalog/etc/frontend/di.xml b/app/code/Magento/Catalog/etc/frontend/di.xml
index 9b99bd4a781402d662fa6e9c7a17d925c28e6460..ac8c3693e8f3056611a9152e7f259a7e547c4311 100644
--- a/app/code/Magento/Catalog/etc/frontend/di.xml
+++ b/app/code/Magento/Catalog/etc/frontend/di.xml
@@ -18,9 +18,6 @@
             <argument name="fetchStrategy" xsi:type="object">Magento\Catalog\Model\ResourceModel\Category\Collection\FetchStrategy</argument>
         </arguments>
     </type>
-    <type name="Magento\Quote\Model\Quote\Item\ToOrderItem">
-        <plugin name="copy_quote_files_to_order" type="Magento\Catalog\Model\Plugin\QuoteItemProductOption"/>
-    </type>
     <type name="Magento\Catalog\Model\Indexer\AbstractFlatState">
         <arguments>
             <argument name="isAvailable" xsi:type="boolean">true</argument>
diff --git a/app/code/Magento/Email/Model/Mail/TransportInterfacePlugin.php b/app/code/Magento/Email/Model/Mail/TransportInterfacePlugin.php
new file mode 100644
index 0000000000000000000000000000000000000000..02c1fee1b0745efbdee91e025f7b7c4d9b6f03b4
--- /dev/null
+++ b/app/code/Magento/Email/Model/Mail/TransportInterfacePlugin.php
@@ -0,0 +1,51 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Email\Model\Mail;
+
+use Magento\Framework\App\Config\ScopeConfigInterface;
+use Magento\Framework\Exception\MailException;
+use Magento\Framework\Mail\TransportInterface;
+use Magento\Store\Model\ScopeInterface;
+
+class TransportInterfacePlugin
+{
+    /**
+     * Config path to mail sending setting that shows if email communications are disabled
+     */
+    const XML_PATH_SYSTEM_SMTP_DISABLE = 'system/smtp/disable';
+
+    /**
+     * @var ScopeConfigInterface
+     */
+    private $scopeConfig;
+
+    /**
+     * @param ScopeConfigInterface $scopeConfig
+     */
+    public function __construct(
+        ScopeConfigInterface $scopeConfig
+    ) {
+        $this->scopeConfig = $scopeConfig;
+    }
+
+    /**
+     * Omit email sending if disabled
+     *
+     * @param TransportInterface $subject
+     * @param \Closure $proceed
+     * @return void
+     * @throws MailException
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+     */
+    public function aroundSendMessage(
+        TransportInterface $subject,
+        \Closure $proceed
+    ) {
+        if (!$this->scopeConfig->isSetFlag(self::XML_PATH_SYSTEM_SMTP_DISABLE, ScopeInterface::SCOPE_STORE)) {
+            $proceed();
+        }
+    }
+}
diff --git a/app/code/Magento/Email/Model/Template.php b/app/code/Magento/Email/Model/Template.php
index c281a08ab97b6bd153b77a0803b7d2c21792cc50..c42c4088793d7c429bf246bd3090731751e4ddff 100644
--- a/app/code/Magento/Email/Model/Template.php
+++ b/app/code/Magento/Email/Model/Template.php
@@ -5,26 +5,11 @@
  */
 namespace Magento\Email\Model;
 
-use Magento\Store\Model\ScopeInterface;
 use Magento\Store\Model\StoreManagerInterface;
 
 /**
  * Template model
  *
- * Example:
- *
- * // Loading of template
- * \Magento\Email\Model\TemplateFactory $templateFactory
- * $templateFactory->create()->load($this->_scopeConfig->getValue(
- *  'path_to_email_template_id_config',
- *  \Magento\Store\Model\ScopeInterface::SCOPE_STORE
- *  ));
- * $variables = array(
- *    'someObject' => $this->_coreResourceEmailTemplate
- *    'someString' => 'Some string value'
- * );
- * $emailTemplate->send('some@domain.com', 'Name Of User', $variables);
- *
  * @method \Magento\Email\Model\ResourceModel\Template _getResource()
  * @method \Magento\Email\Model\ResourceModel\Template getResource()
  * @method string getTemplateCode()
@@ -63,6 +48,8 @@ class Template extends AbstractTemplate implements \Magento\Framework\Mail\Templ
 
     /**
      * Config path to mail sending setting that shows if email communications are disabled
+     * @deprecated
+     * @see \Magento\Email\Model\Mail\TransportInterfacePlugin::XML_PATH_SYSTEM_SMTP_DISABLE
      */
     const XML_PATH_SYSTEM_SMTP_DISABLE = 'system/smtp/disable';
 
@@ -196,8 +183,7 @@ class Template extends AbstractTemplate implements \Magento\Framework\Mail\Templ
      */
     public function isValidForSend()
     {
-        return !$this->scopeConfig->isSetFlag(Template::XML_PATH_SYSTEM_SMTP_DISABLE, ScopeInterface::SCOPE_STORE)
-            && $this->getSenderName() && $this->getSenderEmail() && $this->getTemplateSubject();
+        return $this->getSenderName() && $this->getSenderEmail() && $this->getTemplateSubject();
     }
 
     /**
@@ -344,7 +330,8 @@ class Template extends AbstractTemplate implements \Magento\Framework\Mail\Templ
         if ($this->_getResource()->checkCodeUsage($this)) {
             throw new \Magento\Framework\Exception\MailException(__('Duplicate Of Template Name'));
         }
-        return parent::beforeSave();
+        parent::beforeSave();
+        return $this;
     }
 
     /**
diff --git a/app/code/Magento/Email/Test/Unit/Model/TemplateTest.php b/app/code/Magento/Email/Test/Unit/Model/TemplateTest.php
index f2195a64220e25effc00550af98c93d21e5e0145..3ee95954c0a3af7d122d62631e77f94d54ad5dda 100644
--- a/app/code/Magento/Email/Test/Unit/Model/TemplateTest.php
+++ b/app/code/Magento/Email/Test/Unit/Model/TemplateTest.php
@@ -5,7 +5,6 @@
  */
 namespace Magento\Email\Test\Unit\Model;
 
-use Magento\Email\Model\Template\Filter;
 use Magento\Framework\App\Area;
 use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\App\TemplateTypesInterface;
@@ -426,18 +425,13 @@ class TemplateTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @param $isSMTPDisabled bool
      * @param $senderName string
      * @param $senderEmail string
      * @param $templateSubject string
      * @dataProvider isValidForSendDataProvider
      */
-    public function testIsValidForSend($isSMTPDisabled, $senderName, $senderEmail, $templateSubject, $expectedValue)
+    public function testIsValidForSend($senderName, $senderEmail, $templateSubject, $expectedValue)
     {
-        $this->scopeConfig->expects($this->once())
-            ->method('isSetFlag')
-            ->with('system/smtp/disable', ScopeInterface::SCOPE_STORE)
-            ->will($this->returnValue($isSMTPDisabled));
         $model = $this->getModelMock(['getSenderName', 'getSenderEmail', 'getTemplateSubject']);
         $model->expects($this->any())
             ->method('getSenderName')
@@ -455,35 +449,24 @@ class TemplateTest extends \PHPUnit_Framework_TestCase
     {
         return [
             'should be valid' => [
-                'isSMTPDisabled' => false,
                 'senderName' => 'sender name',
                 'senderEmail' => 'email@example.com',
                 'templateSubject' => 'template subject',
                 'expectedValue' => true
             ],
-            'no smtp so not valid' => [
-                'isSMTPDisabled' => true,
-                'senderName' => 'sender name',
-                'senderEmail' => 'email@example.com',
-                'templateSubject' => 'template subject',
-                'expectedValue' => false
-            ],
             'no sender name so not valid' => [
-                'isSMTPDisabled' => false,
                 'senderName' => '',
                 'senderEmail' => 'email@example.com',
                 'templateSubject' => 'template subject',
                 'expectedValue' => false
             ],
             'no sender email so not valid' => [
-                'isSMTPDisabled' => false,
                 'senderName' => 'sender name',
                 'senderEmail' => '',
                 'templateSubject' => 'template subject',
                 'expectedValue' => false
             ],
             'no subject so not valid' => [
-                'isSMTPDisabled' => false,
                 'senderName' => 'sender name',
                 'senderEmail' => 'email@example.com',
                 'templateSubject' => '',
diff --git a/app/code/Magento/Email/etc/di.xml b/app/code/Magento/Email/etc/di.xml
index d1477d470abd1d35416e4ba40d246ecd90148c26..380e5e6248fb3f3b6a42108f91a2a4f49b08e263 100644
--- a/app/code/Magento/Email/etc/di.xml
+++ b/app/code/Magento/Email/etc/di.xml
@@ -59,5 +59,6 @@
     </type>
     <type name="Magento\Framework\Mail\TransportInterface">
         <plugin name="WindowsSmtpConfig" type="Magento\Email\Model\Plugin\WindowsSmtpConfig" />
+        <plugin name="disableSending" type="Magento\Email\Model\Mail\TransportInterfacePlugin" />
     </type>
 </config>
diff --git a/app/code/Magento/Newsletter/Model/Template.php b/app/code/Magento/Newsletter/Model/Template.php
index 7b454921b0ddc490a139aa35402d987b6cbdeda9..09ea825c612af13a08636a6d4d302ec65cad9a4f 100644
--- a/app/code/Magento/Newsletter/Model/Template.php
+++ b/app/code/Magento/Newsletter/Model/Template.php
@@ -174,7 +174,8 @@ class Template extends \Magento\Email\Model\AbstractTemplate
     public function beforeSave()
     {
         $this->validate();
-        return parent::beforeSave();
+        parent::beforeSave();
+        return $this;
     }
 
     /**
@@ -238,9 +239,6 @@ class Template extends \Magento\Email\Model\AbstractTemplate
      */
     public function isValidForSend()
     {
-        return !$this->scopeConfig->isSetFlag(
-            \Magento\Email\Model\Template::XML_PATH_SYSTEM_SMTP_DISABLE,
-            \Magento\Store\Model\ScopeInterface::SCOPE_STORE
-        ) && $this->getTemplateSenderName() && $this->getTemplateSenderEmail() && $this->getTemplateSubject();
+        return $this->getTemplateSenderName() && $this->getTemplateSenderEmail() && $this->getTemplateSubject();
     }
 }
diff --git a/app/code/Magento/Newsletter/Test/Unit/Model/TemplateTest.php b/app/code/Magento/Newsletter/Test/Unit/Model/TemplateTest.php
index e51d5e0fdb3a75f6abcf79cd6289b398ec0e9391..c8599230652425348ce1b8eea8d0679defa9df16 100644
--- a/app/code/Magento/Newsletter/Test/Unit/Model/TemplateTest.php
+++ b/app/code/Magento/Newsletter/Test/Unit/Model/TemplateTest.php
@@ -379,4 +379,55 @@ class TemplateTest extends \PHPUnit_Framework_TestCase
             ],
         ];
     }
+
+    /**
+     * @param $senderName string
+     * @param $senderEmail string
+     * @param $templateSubject string
+     * @dataProvider isValidForSendDataProvider
+     */
+    public function testIsValidForSend($senderName, $senderEmail, $templateSubject, $expectedValue)
+    {
+        $model = $this->getModelMock(['getTemplateSenderName', 'getTemplateSenderEmail', 'getTemplateSubject']);
+        $model->expects($this->any())
+            ->method('getTemplateSenderName')
+            ->will($this->returnValue($senderName));
+        $model->expects($this->any())
+            ->method('getTemplateSenderEmail')
+            ->will($this->returnValue($senderEmail));
+        $model->expects($this->any())
+            ->method('getTemplateSubject')
+            ->will($this->returnValue($templateSubject));
+        $this->assertEquals($expectedValue, $model->isValidForSend());
+    }
+
+    public function isValidForSendDataProvider()
+    {
+        return [
+            'should be valid' => [
+                'senderName' => 'sender name',
+                'senderEmail' => 'email@example.com',
+                'templateSubject' => 'template subject',
+                'expectedValue' => true
+            ],
+            'no sender name so not valid' => [
+                'senderName' => '',
+                'senderEmail' => 'email@example.com',
+                'templateSubject' => 'template subject',
+                'expectedValue' => false
+            ],
+            'no sender email so not valid' => [
+                'senderName' => 'sender name',
+                'senderEmail' => '',
+                'templateSubject' => 'template subject',
+                'expectedValue' => false
+            ],
+            'no subject so not valid' => [
+                'senderName' => 'sender name',
+                'senderEmail' => 'email@example.com',
+                'templateSubject' => '',
+                'expectedValue' => false
+            ],
+        ];
+    }
 }
diff --git a/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Widget/Chooser.php b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Widget/Chooser.php
new file mode 100644
index 0000000000000000000000000000000000000000..b13ace25f020bfea737f6430916d957713ffa6f9
--- /dev/null
+++ b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Widget/Chooser.php
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\SalesRule\Controller\Adminhtml\Promo\Widget;
+
+class Chooser extends \Magento\CatalogRule\Controller\Adminhtml\Promo\Widget\Chooser
+{
+    /**
+     * Authorization level of a basic admin session
+     *
+     * @see _isAllowed()
+     */
+    const ADMIN_RESOURCE = 'Magento_SalesRule::quote';
+}
diff --git a/app/code/Magento/SalesRule/Model/Rule/Condition/Product.php b/app/code/Magento/SalesRule/Model/Rule/Condition/Product.php
index f85daffd3f9625b08520548c1d96697aad3e58cf..1670819588e6106c13226f6d19ab23edcad93bd0 100644
--- a/app/code/Magento/SalesRule/Model/Rule/Condition/Product.php
+++ b/app/code/Magento/SalesRule/Model/Rule/Condition/Product.php
@@ -51,4 +51,26 @@ class Product extends \Magento\Rule\Model\Condition\Product\AbstractProduct
 
         return parent::validate($product);
     }
+
+    /**
+     * Retrieve value element chooser URL
+     *
+     * @return string
+     */
+    public function getValueElementChooserUrl()
+    {
+        $url = false;
+        switch ($this->getAttribute()) {
+            case 'sku':
+            case 'category_ids':
+                $url = 'sales_rule/promo_widget/chooser/attribute/' . $this->getAttribute();
+                if ($this->getJsFormObject()) {
+                    $url .= '/form/' . $this->getJsFormObject();
+                }
+                break;
+            default:
+                break;
+        }
+        return $url !== false ? $this->_backendData->getUrl($url) : '';
+    }
 }
diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/Rule/Condition/ProductTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/Rule/Condition/ProductTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..a28ea216eda32ed78b368cf3a7b84c53659904dd
--- /dev/null
+++ b/app/code/Magento/SalesRule/Test/Unit/Model/Rule/Condition/ProductTest.php
@@ -0,0 +1,161 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\SalesRule\Test\Unit\Model\Rule\Condition;
+
+use \Magento\Rule\Model\Condition\Context;
+use \Magento\Backend\Helper\Data;
+use \Magento\Eav\Model\Config;
+use \Magento\Catalog\Model\ProductFactory;
+use \Magento\Catalog\Api\ProductRepositoryInterface;
+use \Magento\Eav\Model\Entity\AbstractEntity;
+use \Magento\Catalog\Model\ResourceModel\Product;
+use \Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\Collection;
+use \Magento\Framework\Locale\FormatInterface;
+use \Magento\Eav\Model\Entity\AttributeLoaderInterface;
+use \Magento\SalesRule\Model\Rule\Condition\Product as SalesRuleProduct;
+
+/**
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
+class ProductTest extends \PHPUnit_Framework_TestCase
+{
+    /** @var SalesRuleProduct */
+    protected $model;
+
+    /** @var Context|\PHPUnit_Framework_MockObject_MockObject */
+    protected $contextMock;
+
+    /** @var Data|\PHPUnit_Framework_MockObject_MockObject */
+    protected $backendHelperMock;
+
+    /** @var Config|\PHPUnit_Framework_MockObject_MockObject */
+    protected $configMock;
+
+    /** @var ProductFactory|\PHPUnit_Framework_MockObject_MockObject */
+    protected $productFactoryMock;
+
+    /** @var ProductRepositoryInterface|\PHPUnit_Framework_MockObject_MockObject */
+    protected $productRepositoryMock;
+
+    /** @var Product|\PHPUnit_Framework_MockObject_MockObject */
+    protected $productMock;
+
+    /** @var Collection|\PHPUnit_Framework_MockObject_MockObject */
+    protected $collectionMock;
+
+    /** @var FormatInterface|\PHPUnit_Framework_MockObject_MockObject */
+    protected $formatMock;
+
+    /** @var AttributeLoaderInterface|\PHPUnit_Framework_MockObject_MockObject */
+    protected $attributeLoaderInterfaceMock;
+
+    /**
+     * Setup the test
+     */
+    protected function setUp()
+    {
+        $this->contextMock = $this->getMockBuilder(Context::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->backendHelperMock = $this->getMockBuilder(Data::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->configMock = $this->getMockBuilder(Config::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->productFactoryMock = $this->getMockBuilder(ProductFactory::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->productRepositoryMock = $this->getMockBuilder(ProductRepositoryInterface::class)
+            ->getMockForAbstractClass();
+        $this->attributeLoaderInterfaceMock = $this->getMockBuilder(AbstractEntity::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['getAttributesByCode'])
+            ->getMock();
+        $this->attributeLoaderInterfaceMock
+            ->expects($this->any())
+            ->method('getAttributesByCode')
+            ->will($this->returnValue([]));
+        $this->productMock = $this->getMockBuilder(Product::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['loadAllAttributes'])
+            ->getMock();
+        $this->productMock
+            ->expects($this->any())
+            ->method('loadAllAttributes')
+            ->will($this->returnValue($this->attributeLoaderInterfaceMock));
+        $this->collectionMock = $this->getMockBuilder(Collection::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->formatMock = $this->getMockBuilder(FormatInterface::class)
+            ->getMockForAbstractClass();
+        $this->model = new SalesRuleProduct(
+            $this->contextMock,
+            $this->backendHelperMock,
+            $this->configMock,
+            $this->productFactoryMock,
+            $this->productRepositoryMock,
+            $this->productMock,
+            $this->collectionMock,
+            $this->formatMock
+        );
+    }
+
+    /**
+     * @return array
+     */
+    public function testGetValueElementChooserUrlDataProvider()
+    {
+        return [
+            'category_ids_without_js_object' => [
+                'category_ids',
+                'sales_rule/promo_widget/chooser/attribute/'
+            ],
+            'category_ids_with_js_object' => [
+                'category_ids',
+                'sales_rule/promo_widget/chooser/attribute/',
+                'jsobject'
+            ],
+            'sku_without_js_object' => [
+                'sku',
+                'sales_rule/promo_widget/chooser/attribute/',
+                'jsobject'
+            ],
+            'sku_without_with_js_object' => [
+                'sku',
+                'sales_rule/promo_widget/chooser/attribute/'
+            ],
+            'none' => [
+                '',
+                ''
+            ]
+        ];
+    }
+
+    /**
+     * test getValueElementChooserUrl
+     * @param string $attribute
+     * @param string $url
+     * @param string $jsObject
+     * @dataProvider testGetValueElementChooserUrlDataProvider
+     */
+    public function testGetValueElementChooserUrl($attribute, $url, $jsObject = '')
+    {
+        $this->model->setJsFormObject($jsObject);
+        $this->model->setAttribute($attribute);
+        $url .= $this->model->getAttribute();
+        $this->backendHelperMock
+            ->expects($this->any())
+            ->method('getUrl')
+            ->willReturnArgument(0);
+
+        if ($this->model->getJsFormObject()) {
+            $url .= '/form/' . $this->model->getJsFormObject();
+        }
+
+        $this->assertEquals($url, $this->model->getValueElementChooserUrl());
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Edit/CategoryForm.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Edit/CategoryForm.xml
index 63535106514f2c893b0f822daeb7350fd7d892a3..dff1a9fd71d865dd52fd6cdd0e05d3e3d000db94 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Edit/CategoryForm.xml
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Edit/CategoryForm.xml
@@ -130,8 +130,8 @@
     </design>
     <schedule_design_update>
         <class>\Magento\Ui\Test\Block\Adminhtml\Section</class>
-        <selector>//div[contains(@class,'admin__collapsible-block-wrapper')][descendant::input[@name='custom_design_to']]</selector>
-        <strategy>xpath</strategy>
+        <selector>[data-index="schedule_design_update"]</selector>
+        <strategy>css selector</strategy>
         <fields>
             <schedule_update_from>
                 <input>datepicker</input>
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/TopToolbar.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/TopToolbar.php
index 100930ad20aea7a40eff2fcf6b367c85db48a242..3d5e550560e857b8530037637b4f97f7763874e2 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/TopToolbar.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/TopToolbar.php
@@ -28,7 +28,9 @@ class TopToolbar extends Block
      */
     public function getSelectSortType()
     {
-        return $this->_rootElement->find("#sorter")->getElements('option[selected]')[0]->getText();
+        $selectedOption = $this->_rootElement->find($this->sorter)->getElements('option[selected]')[0]->getText();
+        preg_match('/\w+\s?\w+/', $selectedOption, $matches);
+        return $matches[0];
     }
 
     /**
@@ -38,7 +40,8 @@ class TopToolbar extends Block
      */
     public function getSortType()
     {
-        $content = str_replace("\r", '', $this->_rootElement->find($this->sorter)->getText());
-        return explode("\n", $content);
+        $content = $this->_rootElement->find($this->sorter)->getText();
+        preg_match_all('/\w+\s?\w+/', $content, $matches);
+        return $matches[0];
     }
 }
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Category.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Category.xml
index 30f870dea88f063a7278d7380f5d4fe24f508c9f..2fd8c04d1d80dfe643616ee7c550699da91aeece 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Category.xml
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Category.xml
@@ -67,7 +67,7 @@
             <field name="name" xsi:type="string">Category%isolation%</field>
             <field name="url_key" xsi:type="string">category-%isolation%</field>
             <field name="parent_id" xsi:type="array">
-                <item name="dataset" xsi:type="string">default_subcategory</item>
+                <item name="dataset" xsi:type="string">default</item>
             </field>
             <field name="is_active" xsi:type="string">Yes</field>
             <field name="include_in_menu" xsi:type="string">Yes</field>
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/CreateCategoryEntityTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/CreateCategoryEntityTest.xml
index 7e6f913dda6e7fd88c0723ccbd5e899ccbeeaafe..22cdab45ac875c6a6987892898e3c8dda3382944 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/CreateCategoryEntityTest.xml
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/CreateCategoryEntityTest.xml
@@ -39,8 +39,8 @@
             <data name="category/data/layout_update_xml" xsi:type="string">&#60;referenceContainer name=&quot;catalog.leftnav&quot; remove=&quot;true&quot;/&#62;</data>
             <data name="category/data/new_theme" xsi:type="string">Magento Luma</data>
             <data name="category/data/apply_design_to_products" xsi:type="string">Yes</data>
-            <data name="category/data/schedule_update_from" xsi:type="string">Jan 10, 2014</data>
-            <data name="category/data/schedule_update_to" xsi:type="string">Dec 31, 2024</data>
+            <data name="category/data/schedule_update_from" xsi:type="string">01/10/2014</data>
+            <data name="category/data/schedule_update_to" xsi:type="string">12/31/2024</data>
             <constraint name="Magento\Catalog\Test\Constraint\AssertCategorySaveMessage" />
             <constraint name="Magento\Catalog\Test\Constraint\AssertCategoryForm" />
         </variation>
@@ -82,8 +82,8 @@
             <data name="category/data/layout_update_xml" xsi:type="string">&#60;referenceContainer name=&quot;content.aside&quot; remove=&quot;true&quot;/&#62;</data>
             <data name="category/data/new_theme" xsi:type="string">Magento Luma</data>
             <data name="category/data/apply_design_to_products" xsi:type="string">Yes</data>
-            <data name="category/data/schedule_update_from" xsi:type="string">Jan 1, 2014</data>
-            <data name="category/data/schedule_update_to" xsi:type="string">Dec 31, 2024</data>
+            <data name="category/data/schedule_update_from" xsi:type="string">01/10/2014</data>
+            <data name="category/data/schedule_update_to" xsi:type="string">12/31/2024</data>
             <constraint name="Magento\Catalog\Test\Constraint\AssertCategorySaveMessage" />
             <constraint name="Magento\Catalog\Test\Constraint\AssertCategoryForm" />
             <constraint name="Magento\Catalog\Test\Constraint\AssertCategoryPage" />
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Session/SaveHandlerTest.php b/dev/tests/integration/testsuite/Magento/Framework/Session/SaveHandlerTest.php
index 7ba149d361f4fcd15c9d5989ff619d9f81b53cc2..40fafeceae44cb8342e03de9cb3a204675c52a88 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Session/SaveHandlerTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/Session/SaveHandlerTest.php
@@ -29,32 +29,20 @@ class SaveHandlerTest extends \PHPUnit_Framework_TestCase
      */
     public function testSetSaveHandler($deploymentConfigHandler, $iniHandler)
     {
-        $this->markTestSkipped('MAGETWO-56529');
-        // Set expected session.save_handler config
-        if ($deploymentConfigHandler) {
-            if ($deploymentConfigHandler !== 'files') {
-                $expected = 'user';
-            } else {
-                $expected = $deploymentConfigHandler;
-            }
-        } else if ($iniHandler) {
-            $expected = $iniHandler;
-        } else {
-            $expected = SaveHandlerInterface::DEFAULT_HANDLER;
-        }
+        $expected = $this->getExpectedSaveHandler($deploymentConfigHandler, $iniHandler);
 
         // Set ini configuration
         if ($iniHandler) {
             ini_set('session.save_handler', $iniHandler);
         }
-
+        $defaultHandler = ini_get('session.save_handler') ?: SaveHandlerInterface::DEFAULT_HANDLER;
         /** @var DeploymentConfig | \PHPUnit_Framework_MockObject_MockObject $deploymentConfigMock */
         $deploymentConfigMock = $this->getMockBuilder(DeploymentConfig::class)
             ->disableOriginalConstructor()
             ->getMock();
         $deploymentConfigMock->expects($this->once())
             ->method('get')
-            ->with(Config::PARAM_SESSION_SAVE_METHOD, SaveHandlerInterface::DEFAULT_HANDLER)
+            ->with(Config::PARAM_SESSION_SAVE_METHOD, $defaultHandler)
             ->willReturn($deploymentConfigHandler ?: SaveHandlerInterface::DEFAULT_HANDLER);
 
         new SaveHandler(
@@ -85,4 +73,31 @@ class SaveHandlerTest extends \PHPUnit_Framework_TestCase
             [false, false],
         ];
     }
+
+    /**
+     * Retrieve expected session.save_handler
+     *
+     * @param string $deploymentConfigHandler
+     * @param string $iniHandler
+     * @return string
+     */
+    private function getExpectedSaveHandler($deploymentConfigHandler, $iniHandler)
+    {
+        // Set expected session.save_handler config
+        if ($deploymentConfigHandler) {
+            if ($deploymentConfigHandler !== 'files') {
+                $expected = 'user';
+                return $expected;
+            } else {
+                $expected = $deploymentConfigHandler;
+                return $expected;
+            }
+        } elseif ($iniHandler) {
+            $expected = $iniHandler;
+            return $expected;
+        } else {
+            $expected = SaveHandlerInterface::DEFAULT_HANDLER;
+            return $expected;
+        }
+    }
 }