Skip to content

Commit

Permalink
Merge branch '2.4-develop' into ASI-1789
Browse files Browse the repository at this point in the history
  • Loading branch information
sivaschenko committed Sep 3, 2020
2 parents 04a9f44 + 40f9a4b commit 47b5eea
Show file tree
Hide file tree
Showing 155 changed files with 4,607 additions and 1,103 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminOpenConfigGeneralAnalyticsPageActionGroup">
<annotations>
<description>Open Config General Analytics Page.</description>
</annotations>

<amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/>
<waitForPageLoad stepKey="waitPageLoad"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AssertAdminAdvancedReportingPageUrlActionGroup">
<annotations>
<description>Assert admin advanced reporting page url.</description>
</annotations>

<switchToNextTab stepKey="switchToNewTab"/>
<waitForPageLoad stepKey="waitForAdvancedReportingPageLoad"/>
<seeInCurrentUrl url="advancedreporting.rjmetrics.com/report" stepKey="seeAssertAdvancedReportingPageUrl"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
<amOnPage url="{{AdminDashboardPage.url}}" stepKey="amOnDashboardPage"/>
<waitForPageLoad stepKey="waitForDashboardPageLoad"/>
<click selector="{{AdminAdvancedReportingSection.goToAdvancedReporting}}" stepKey="clickGoToAdvancedReporting"/>
<switchToNextTab stepKey="switchToNewTab"/>
<seeInCurrentUrl url="advancedreporting.rjmetrics.com/report" stepKey="seeAssertAdvancedReportingPageUrl"/>
<actionGroup ref="AssertAdminAdvancedReportingPageUrlActionGroup" stepKey="assertAdvancedReportingPageUrl"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
<argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/>
<argument name="submenuUiId" value="{{AdminMenuReportsBusinessIntelligenceAdvancedReporting.dataUiId}}"/>
</actionGroup>
<switchToNextTab stepKey="switchToNewTab"/>
<waitForPageLoad stepKey="waitForAdvancedReportingPageLoad"/>
<seeInCurrentUrl url="advancedreporting.rjmetrics.com/report" stepKey="seeAssertAdvancedReportingPageUrl"/>
<actionGroup ref="AssertAdminAdvancedReportingPageUrlActionGroup" stepKey="assertAdvancedReportingPageUrl"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@
<testCaseId value="MAGETWO-63981"/>
<group value="analytics"/>
</annotations>
<before>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
</before>
<after>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/>
</after>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
<amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/>
<actionGroup ref="AdminOpenConfigGeneralAnalyticsPageActionGroup" stepKey="amOnAdminConfig"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Enable" stepKey="selectAdvancedReportingServiceEnabled"/>
<see selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustryLabel}}" userInput="Industry" stepKey="seeAdvancedReportingIndustryLabel"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustry}}" userInput="--Please Select--" stepKey="selectAdvancedReportingIndustry"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@
<testCaseId value="MAGETWO-66465"/>
<group value="analytics"/>
</annotations>
<before>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
</before>
<after>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/>
</after>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
<amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/>
<actionGroup ref="AdminOpenConfigGeneralAnalyticsPageActionGroup" stepKey="amOnAdminConfig"/>
<see selector="{{AdminConfigAdvancedReportingSection.advancedReportingServiceLabel}}" userInput="Advanced Reporting Service" stepKey="seeAdvancedReportingServiceLabelEnabled"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Enable" stepKey="selectAdvancedReportingServiceEnabled"/>
<see selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustryLabel}}" userInput="Industry" stepKey="seeAdvancedReportingIndustryLabel"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@
<testCaseId value="MAGETWO-63898"/>
<group value="analytics"/>
</annotations>

<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
<amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/>
<before>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
</before>
<after>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/>
</after>
<actionGroup ref="AdminOpenConfigGeneralAnalyticsPageActionGroup" stepKey="amOnAdminConfig"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Enable" stepKey="selectAdvancedReportingServiceEnabled"/>
<see selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustryLabel}}" userInput="Industry" stepKey="seeAdvancedReportingIndustryLabel"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustry}}" userInput="Apps and Games" stepKey="selectAdvancedReportingIndustry"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@
<testCaseId value="MAGETWO-66464"/>
<group value="analytics"/>
</annotations>
<before>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
</before>
<after>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/>
</after>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
<amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/>
<actionGroup ref="AdminOpenConfigGeneralAnalyticsPageActionGroup" stepKey="amOnAdminConfig"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Enable" stepKey="selectAdvancedReportingServiceEnabled"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustry}}" userInput="Apps and Games" stepKey="selectAdvancedReportingIndustry"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingHour}}" userInput="23" stepKey="selectAdvancedReportingHour"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
<deleteData createDataKey="category3" stepKey="deleteCategory3"/>
<deleteData createDataKey="category2" stepKey="deleteCategory2"/>
<deleteData createDataKey="category1" stepKey="deleteCategory1"/>
<actionGroup ref="CliCacheFlushActionGroup" stepKey="cleanInvalidatedCaches">
<argument name="tags" value="full_page"/>
</actionGroup>
</after>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="amOnStorefrontPage"/>
<moveMouseOver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@
<argument name="categoryName" value="$$categoryN.name$$, $$categoryM.name$$"/>
</actionGroup>

<wait stepKey="waitBeforeRunCronIndex" time="30"/>
<wait stepKey="waitBeforeRunCronIndex" time="60"/>
<magentoCLI stepKey="runCronIndex" command="cron:run --group=index"/>
<wait stepKey="waitAfterRunCronIndex" time="60"/>
<wait stepKey="waitAfterRunCronIndex" time="120"/>
</before>
<after>
<!-- Change "Category Products" and "Product Categories" indexers to "Update on Save" mode -->
Expand Down Expand Up @@ -108,6 +108,8 @@
<argument name="categoryName" value="$$categoryK.name$$"/>
</actionGroup>

<wait stepKey="waitAfterAssignCategoryK" time="60"/>

<!-- Unassign category M from Product B -->
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="amOnEditCategoryPageB">
<argument name="productId" value="$$productB.id$$"/>
Expand Down Expand Up @@ -147,8 +149,9 @@
<see userInput="$$productC.name$$" selector="{{StorefrontCategoryMainSection.productName}}" stepKey="seeProductInCategoryN"/>

<!-- Run cron -->
<wait stepKey="waitBeforeRunMagentoCron" time="30"/>
<wait stepKey="waitBeforeRunMagentoCron" time="60"/>
<magentoCLI stepKey="runMagentoCron" command="cron:run --group=index"/>

<wait stepKey="waitAfterRunMagentoCron" time="90"/>

<!-- Open categories K, L, M, N on Storefront in order to make sure that new assigments are applied -->
Expand Down Expand Up @@ -213,8 +216,9 @@
<see userInput="$$productC.name$$" selector="{{StorefrontCategoryMainSection.productName}}" stepKey="productCOnCategoryN"/>

<!-- Run Cron once to reindex product changes -->
<wait stepKey="waitBeforeRunCronIndexAfterProductAssignToCategory" time="30"/>
<wait stepKey="waitBeforeRunCronIndexAfterProductAssignToCategory" time="60"/>
<magentoCLI stepKey="runCronIndexAfterProductAssignToCategory" command="cron:run --group=index"/>

<wait stepKey="waitAfterRunCronIndexAfterProductAssignToCategory" time="90"/>

<!-- Open categories K, L, M, N on Storefront in order to make sure that new assigments are applied -->
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Catalog/etc/db_schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
default="0" comment="Store ID"/>
<column xsi:type="int" name="entity_id" unsigned="true" nullable="false" identity="false"
default="0" comment="Entity ID"/>
<column xsi:type="text" name="value" nullable="true" comment="Value"/>
<column xsi:type="mediumtext" name="value" nullable="true" comment="Value"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="value_id"/>
</constraint>
Expand Down Expand Up @@ -408,7 +408,7 @@
default="0" comment="Store ID"/>
<column xsi:type="int" name="entity_id" unsigned="true" nullable="false" identity="false"
default="0" comment="Entity ID"/>
<column xsi:type="text" name="value" nullable="true" comment="Value"/>
<column xsi:type="mediumtext" name="value" nullable="true" comment="Value"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="value_id"/>
</constraint>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* See COPYING.txt for license details.
*/

/**
* @deprecated see Magento/Ui/view/base/web/js/grid/filters/elements/ui-select.js
*/
define([
'Magento_Ui/js/form/element/ui-select',
'jquery',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
<element name="billingNewAddressForm" type="text" selector="[data-form='billing-new-address']"/>
<element name="billingAddressNotSameCheckbox" type="checkbox" selector="#billing-address-same-as-shipping-checkmo"/>
<element name="editAddress" type="button" selector="button.action.action-edit-address"/>
<element name="addressDropdown" type="select" selector="[name=billing_address_id]"/>
<element name="addressDropdownSelected" type="select" selector="[name=billing_address_id] option:checked"/>
<element name="placeOrderDisabled" type="button" selector="#checkout-payment-method-load button.disabled"/>
<element name="update" type="button" selector=".payment-method._active .payment-method-billing-address .action.action-update"/>
<element name="guestFirstName" type="input" selector=".payment-method._active .billing-address-form input[name='firstname']"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</createData>

<!-- Create customer -->
<createData entity="Customer_US_UK_DE" stepKey="createCustomer"/>
<createData entity="Customer_DE_UK_US" stepKey="createCustomer"/>
</before>
<after>
<!-- Admin log out -->
Expand Down Expand Up @@ -70,7 +70,8 @@

<!-- Change the address -->
<click selector="{{CheckoutPaymentSection.editAddress}}" stepKey="editAddress"/>
<waitForElementVisible selector="{{CheckoutShippingSection.addressDropdown}}" stepKey="waitForDropDownToBeVisible"/>
<waitForElementVisible selector="{{CheckoutPaymentSection.addressDropdown}}" stepKey="waitForDropDownToBeVisible"/>
<see selector="{{CheckoutPaymentSection.addressDropdownSelected}}" userInput="{{US_Address_NY.street[0]}}" stepKey="seeDefaultBillingAddressStreet"/>
<selectOption selector="{{CheckoutShippingSection.addressDropdown}}" userInput="{{UK_Not_Default_Address.street[0]}}" stepKey="addAddress"/>

<!-- Check order summary in checkout -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ define([
},
addressOptions = addressList().filter(function (address) {
return address.getType() === 'customer-address';
}),
addressDefaultIndex = addressOptions.findIndex(function (address) {
return address.isDefaultBilling();
});

return Component.extend({
Expand Down Expand Up @@ -53,7 +56,8 @@ define([
this._super()
.observe('selectedAddress isNewAddressSelected')
.observe({
isNewAddressSelected: !customer.isLoggedIn() || !addressOptions.length
isNewAddressSelected: !customer.isLoggedIn() || !addressOptions.length,
selectedAddress: this.addressOptions[addressDefaultIndex]
});

return this;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,62 +1,63 @@
<?php
/**
*
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Cms\Controller\Adminhtml\Wysiwyg\Images;

class OnInsert extends \Magento\Cms\Controller\Adminhtml\Wysiwyg\Images
use Magento\Backend\App\Action\Context;
use Magento\Cms\Controller\Adminhtml\Wysiwyg\Images;
use Magento\Cms\Model\Wysiwyg\Images\GetInsertImageContent;
use Magento\Framework\App\Action\HttpPostActionInterface;
use Magento\Framework\Controller\Result\RawFactory;
use Magento\Framework\Controller\ResultInterface;
use Magento\Framework\Registry;

class OnInsert extends Images implements HttpPostActionInterface
{
/**
* @var \Magento\Framework\Controller\Result\RawFactory
* @var RawFactory
*/
protected $resultRawFactory;

/**
* @param \Magento\Backend\App\Action\Context $context
* @param \Magento\Framework\Registry $coreRegistry
* @param \Magento\Framework\Controller\Result\RawFactory $resultRawFactory
* @var GetInsertImageContent
*/
private $getInsertImageContent;

/**
* @param Context $context
* @param Registry $coreRegistry
* @param RawFactory $resultRawFactory
* @param GetInsertImageContent $getInsertImageContent
*/
public function __construct(
\Magento\Backend\App\Action\Context $context,
\Magento\Framework\Registry $coreRegistry,
\Magento\Framework\Controller\Result\RawFactory $resultRawFactory
Context $context,
Registry $coreRegistry,
RawFactory $resultRawFactory,
?GetInsertImageContent $getInsertImageContent = null
) {
$this->resultRawFactory = $resultRawFactory;
parent::__construct($context, $coreRegistry);
$this->getInsertImageContent = $getInsertImageContent ?: $this->_objectManager
->get(GetInsertImageContent::class);
}

/**
* Fire when select image
* Return a content (just a link or an html block) for inserting image to the content
*
* @return \Magento\Framework\Controller\ResultInterface
* @return ResultInterface
*/
public function execute()
{
$imagesHelper = $this->_objectManager->get(\Magento\Cms\Helper\Wysiwyg\Images::class);
$request = $this->getRequest();

$storeId = $request->getParam('store');

$filename = $request->getParam('filename');
$filename = $imagesHelper->idDecode($filename);

$asIs = $request->getParam('as_is');

$forceStaticPath = $request->getParam('force_static_path');

$this->_objectManager->get(\Magento\Catalog\Helper\Data::class)->setStoreId($storeId);
$imagesHelper->setStoreId($storeId);

if ($forceStaticPath) {
$image = parse_url($imagesHelper->getCurrentUrl() . $filename, PHP_URL_PATH);
} else {
$image = $imagesHelper->getImageHtmlDeclaration($filename, $asIs);
}

/** @var \Magento\Framework\Controller\Result\Raw $resultRaw */
$resultRaw = $this->resultRawFactory->create();
return $resultRaw->setContents($image);
$data = $this->getRequest()->getParams();
return $this->resultRawFactory->create()->setContents(
$this->getInsertImageContent->execute(
$data['filename'],
$data['force_static_path'],
$data['as_is'],
isset($data['store']) ? (int) $data['store'] : null
)
);
}
}
Loading

0 comments on commit 47b5eea

Please sign in to comment.