Skip to content

Commit

Permalink
Merge branch '2.4-develop' into paypalflowpro-graphql
Browse files Browse the repository at this point in the history
  • Loading branch information
avattam06 committed Jul 10, 2020
2 parents f714e12 + f8f1e5e commit 009a3ba
Show file tree
Hide file tree
Showing 68 changed files with 2,086 additions and 647 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@
</actionGroup>

<!--Navigate to Product attribute page-->
<amOnPage url="{{ProductAttributePage.url}}" stepKey="navigateToNewProductAttributePage"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
<actionGroup ref="AdminNavigateToNewProductAttributePageActionGroup" stepKey="navigateToNewProductAttributePage"/>
<fillField userInput="test_label" selector="{{AttributePropertiesSection.DefaultLabel}}" stepKey="fillDefaultLabel"/>
<selectOption selector="{{AttributePropertiesSection.InputType}}" userInput="Text Swatch" stepKey="selectInputType"/>
<click selector="{{AttributePropertiesSection.addSwatch}}" stepKey="clickAddSwatch"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,14 +368,20 @@ protected function _reindexRows($changedIds = [])
$productsTypes = $this->getProductsTypes($changedIds);
$parentProductsTypes = $this->getParentProductsTypes($changedIds);

$changedIds = array_merge($changedIds, ...array_values($parentProductsTypes));
$changedIds = array_unique(array_merge($changedIds, ...array_values($parentProductsTypes)));
$productsTypes = array_merge_recursive($productsTypes, $parentProductsTypes);

if ($changedIds) {
$this->deleteIndexData($changedIds);
}
foreach ($productsTypes as $productType => $entityIds) {
$indexer = $this->_getIndexer($productType);

$typeIndexers = $this->getTypeIndexers();
foreach ($typeIndexers as $productType => $indexer) {
$entityIds = $productsTypes[$productType] ?? [];
if (empty($entityIds)) {
continue;
}

if ($indexer instanceof DimensionalIndexerInterface) {
foreach ($this->dimensionCollectionFactory->create() as $dimensions) {
$this->tableMaintainer->createMainTmpTable($dimensions);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?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="AdminCreateCategoryWithInactiveIncludeInMenuActionGroup" extends="CreateCategoryActionGroup">
<annotations>
<description>EXTENDS: CreateCategory. Add "disableIncludeInMenuOption" step.</description>
</annotations>
<arguments>
<argument name="categoryEntity" defaultValue="_defaultCategory"/>
</arguments>

<click selector="{{AdminCategoryBasicFieldSection.includeInMenuLabel}}" stepKey="disableIncludeInMenuOption"
after="seeCategoryPageTitle"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?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="AdminCreateInactiveCategoryActionGroup" extends="CreateCategoryActionGroup">
<annotations>
<description>EXTENDS: CreateCategory. Add "disableCategory" step.</description>
</annotations>
<arguments>
<argument name="categoryEntity" defaultValue="_defaultCategory"/>
</arguments>

<click selector="{{AdminCategoryBasicFieldSection.enableCategoryLabel}}" stepKey="disableCategory"
after="seeCategoryPageTitle"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?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="AssertAdminCategoryIsInactiveActionGroup">
<annotations>
<description>Verify the category is disabled</description>
</annotations>

<dontSeeCheckboxIsChecked selector="{{AdminCategoryBasicFieldSection.EnableCategory}}" stepKey="seeCategoryIsDisabled"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
<element name="shortDescriptionTextArea" type="textarea" selector="#product_form_short_description"/>
<element name="sectionHeaderIfNotShowing" type="button" selector="//div[@data-index='content']//div[contains(@class, '_hide')]"/>
<element name="pageHeader" type="textarea" selector="//*[@class='page-header row']"/>
<element name="attributeInput" type="input" selector="input[name='product[{{attributeCode}}]']" parameterized="true"/>
</section>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminChangeProductAttributeGroupTest">
<annotations>
<title value="Preserving attribute value after attribute group is changed"/>
<description value="Attribute value should be preserved after changing attribute group"/>
<severity value="CRITICAL"/>
<testCaseId value="MC-35612"/>
<useCaseId value="MC-31892"/>
<group value="catalog"/>
</annotations>
<before>
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
<createData entity="_defaultProduct" stepKey="createSimpleProduct">
<requiredEntity createDataKey="createCategory"/>
</createData>

<createData entity="productAttributeText" stepKey="createProductAttribute"/>
<createData entity="CatalogAttributeSet" stepKey="createAttributeSet"/>
<createData entity="CatalogAttributeSet" stepKey="createSecondAttributeSet"/>

<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
<amOnPage url="{{AdminProductAttributeSetEditPage.url}}/$createAttributeSet.attribute_set_id$/"
stepKey="onAttributeSetEdit"/>
<actionGroup ref="AssignAttributeToGroupActionGroup" stepKey="assignAttributeToGroup">
<argument name="group" value="Product Details"/>
<argument name="attribute" value="$createProductAttribute.attribute_code$"/>
</actionGroup>
<actionGroup ref="SaveAttributeSetActionGroup" stepKey="saveAttributeSet"/>
<amOnPage url="{{AdminProductAttributeSetEditPage.url}}/$createSecondAttributeSet.attribute_set_id$/"
stepKey="onSecondAttributeSetEdit"/>
<actionGroup ref="AssignAttributeToGroupActionGroup" stepKey="assignAttributeToContentGroup">
<argument name="group" value="Content"/>
<argument name="attribute" value="$createProductAttribute.attribute_code$"/>
</actionGroup>
<actionGroup ref="SaveAttributeSetActionGroup" stepKey="saveSecondAttributeSet"/>
</before>
<after>
<deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/>
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
<deleteData createDataKey="createProductAttribute" stepKey="deleteProductAttribute"/>
<deleteData createDataKey="createAttributeSet" stepKey="deleteAttributeSet"/>
<deleteData createDataKey="createSecondAttributeSet" stepKey="deleteSecondAttributeSet"/>
<actionGroup ref="ClearProductsFilterActionGroup" stepKey="clearProductsFilter"/>

<!-- Reindex invalidated indices after product attribute has been created/deleted -->
<magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>

<actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForSimpleProduct">
<argument name="product" value="$createSimpleProduct$"/>
</actionGroup>

<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct1">
<argument name="product" value="$createSimpleProduct$"/>
</actionGroup>

<actionGroup ref="AdminProductPageSelectAttributeSetActionGroup" stepKey="selectAttributeSet">
<argument name="attributeSetName" value="$createAttributeSet.attribute_set_name$"/>
</actionGroup>
<waitForText userInput="$createProductAttribute.default_frontend_label$" stepKey="seeAttributeInForm"/>
<fillField selector="{{AdminProductFormSection.attributeRequiredInput($createProductAttribute.attribute_code$)}}"
userInput="test"
stepKey="fillProductAttributeValue"/>
<actionGroup ref="AdminProductPageSelectAttributeSetActionGroup" stepKey="selectSecondAttributeSet">
<argument name="attributeSetName" value="$createSecondAttributeSet.attribute_set_name$"/>
</actionGroup>
<actionGroup ref="ExpandAdminProductSectionActionGroup" stepKey="expandContentSection"/>
<waitForText userInput="$createProductAttribute.default_frontend_label$" stepKey="seeAttributeInSection"/>
<grabValueFrom selector="{{AdminProductContentSection.attributeInput($createProductAttribute.attribute_code$)}}"
stepKey="attributeValue"/>
<assertEquals stepKey="assertAttributeValue">
<expectedResult type="string">test</expectedResult>
<actualResult type="variable">attributeValue</actualResult>
</assertEquals>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,12 @@
</after>
<!-- Create In active Category -->
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openAdminCategoryIndexPage"/>
<click selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="clickOnAddSubCategoryButton"/>
<click selector="{{AdminCategoryBasicFieldSection.enableCategoryLabel}}" stepKey="disableCategory"/>
<checkOption selector="{{AdminCategoryBasicFieldSection.IncludeInMenu}}" stepKey="enableIncludeInMenu"/>
<fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="{{_defaultCategory.name}}" stepKey="fillCategoryName"/>
<click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="clickSaveButton"/>
<waitForPageLoad stepKey="waitForCategorySaved"/>
<actionGroup ref="AssertAdminCategorySaveSuccessMessageActionGroup" stepKey="assertSuccessMessage"/>
<see selector="{{AdminCategoryContentSection.categoryPageTitle}}" userInput="{{_defaultCategory.name}}" stepKey="seePageTitle" />
<dontSeeCheckboxIsChecked selector="{{AdminCategoryBasicFieldSection.EnableCategory}}" stepKey="dontCategoryIsChecked"/>
<!--Verify InActive Category is created-->
<seeElement selector="{{AdminCategoryContentSection.categoryInTree(_defaultCategory.name)}}" stepKey="seeCategoryInTree" />
<actionGroup ref="AdminCreateInactiveCategoryActionGroup" stepKey="createInactiveCategory"/>
<actionGroup ref="AssertAdminCategoryIsInactiveActionGroup" stepKey="seeDisabledCategory"/>
<!--Verify Category is not listed store front page-->
<amOnPage url="{{StorefrontCategoryPage.url(_defaultCategory.name)}}" stepKey="amOnCategoryPage"/>
<waitForPageLoad stepKey="waitForPageToBeLoaded"/>
<dontSeeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName(_defaultCategory.name)}}" stepKey="dontSeeCategoryOnStoreFrontPage"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFront"/>
<actionGroup ref="StorefrontAssertCategoryNameIsNotShownInMenuActionGroup" stepKey="doNotSeeCategoryNameInMenu">
<argument name="categoryName" value="{{_defaultCategory.name}}"/>
</actionGroup>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,11 @@
</after>
<!--Create Category with not included in menu Subcategory -->
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openAdminCategoryIndexPage"/>
<click selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="clickOnAddSubCategoryButton"/>
<checkOption selector="{{AdminCategoryBasicFieldSection.EnableCategory}}" stepKey="enableCategory"/>
<click selector="{{AdminCategoryBasicFieldSection.includeInMenuLabel}}" stepKey="disableIncludeInMenu"/>
<fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="{{_defaultCategory.name}}" stepKey="fillCategoryName"/>
<click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="clickSaveButton"/>
<waitForPageLoad stepKey="waitForCategorySaved"/>
<actionGroup ref="AssertAdminCategorySaveSuccessMessageActionGroup" stepKey="assertSuccessMessage"/>
<waitForPageLoad stepKey="waitForPageSaved"/>
<see selector="{{AdminCategoryContentSection.categoryPageTitle}}" userInput="{{_defaultCategory.name}}" stepKey="seePageTitle" />
<!--Verify Category is created/>-->
<seeElement selector="{{AdminCategoryContentSection.activeCategoryInTree(_defaultCategory.name)}}" stepKey="seeCategoryInTree" />
<actionGroup ref="AdminCreateCategoryWithInactiveIncludeInMenuActionGroup" stepKey="createNotIncludedInMenuCategory"/>
<!--Verify Category in store front page menu/>-->
<amOnPage url="{{StorefrontCategoryPage.url(_defaultCategory.name)}}" stepKey="amOnCategoryPage"/>
<waitForPageLoad stepKey="waitForPageToBeLoaded"/>
<see selector="{{StorefrontCategoryMainSection.CategoryTitle}}" userInput="{{_defaultCategory.name}}" stepKey="seeCategoryPageTitle"/>
<dontSeeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName(_defaultCategory.name)}}" stepKey="dontSeeCategoryOnNavigation"/>
<actionGroup ref="CheckCategoryOnStorefrontActionGroup" stepKey="CheckCategoryOnStorefront"/>
<actionGroup ref="StorefrontAssertCategoryNameIsNotShownInMenuActionGroup" stepKey="doNotSeeCategoryOnNavigation">
<argument name="categoryName" value="{{_defaultCategory.name}}"/>
</actionGroup>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>

<amOnPage url="{{ProductAttributePage.url}}" stepKey="navigateToNewProductAttributePage"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
<actionGroup ref="AdminNavigateToNewProductAttributePageActionGroup" stepKey="navigateToNewProductAttributePage"/>

<!-- Set attribute properties -->
<fillField selector="{{AttributePropertiesSection.DefaultLabel}}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,18 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Customer\Setup\Patch\Data;

use Magento\Customer\Model\Customer;
use Magento\Customer\Setup\CustomerSetupFactory;
use Magento\Framework\App\ResourceConnection;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Framework\Setup\Patch\DataPatchInterface;
use Magento\Framework\Setup\Patch\PatchVersionInterface;

/**
* Class AddCustomerUpdatedAtAttribute
* @package Magento\Customer\Setup\Patch
* Class add customer updated attribute to customer
*/
class AddCustomerUpdatedAtAttribute implements DataPatchInterface, PatchVersionInterface
{
Expand All @@ -30,7 +29,6 @@ class AddCustomerUpdatedAtAttribute implements DataPatchInterface, PatchVersionI
private $customerSetupFactory;

/**
* AddCustomerUpdatedAtAttribute constructor.
* @param ModuleDataSetupInterface $moduleDataSetup
* @param CustomerSetupFactory $customerSetupFactory
*/
Expand All @@ -43,7 +41,7 @@ public function __construct(
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function apply()
{
Expand All @@ -61,10 +59,12 @@ public function apply()
'system' => false,
]
);

return $this;
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public static function getDependencies()
{
Expand All @@ -74,15 +74,15 @@ public static function getDependencies()
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public static function getVersion()
{
return '2.0.4';
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function getAliases()
{
Expand Down
Loading

0 comments on commit 009a3ba

Please sign in to comment.