Skip to content

Commit

Permalink
Merge branch '2.4-develop' into issue-7213
Browse files Browse the repository at this point in the history
  • Loading branch information
slavvka committed Jul 7, 2020
2 parents 4f20656 + 735579d commit 192bc7e
Show file tree
Hide file tree
Showing 816 changed files with 33,484 additions and 5,819 deletions.
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/story.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: GraphQL Story
about: User story for GraphQL project
labels: 'Project: GraphQL'

---

*As a ___ I want to ___ so that ___.*

### AC
* a
* b
### Approved Schema
* a

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?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="CliCacheCleanActionGroup">
<annotations>
<description>Run cache:clean by CLI with specified cache tags (space separated).</description>
</annotations>
<arguments>
<argument name="tags" type="string"/>
</arguments>

<magentoCLI command="cache:clean" arguments="{{tags}}" stepKey="cleanSpecifiedCache"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?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="CliCacheFlushActionGroup">
<annotations>
<description>Run cache:flush by CLI with specified cache tags (space separated).</description>
</annotations>
<arguments>
<argument name="tags" type="string"/>
</arguments>

<magentoCLI command="cache:flush" arguments="{{tags}}" stepKey="flushSpecifiedCache"/>
</actionGroup>
</actionGroups>
10 changes: 5 additions & 5 deletions app/code/Magento/Backend/Test/Mftf/Section/AdminMenuSection.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<element name="widgets" type="button" selector="#nav li[data-ui-id='menu-magento-widget-cms-widget-instance']"/>
<element name="stores" type="button" selector="#menu-magento-backend-stores"/>
<element name="configuration" type="button" selector="#nav li[data-ui-id='menu-magento-config-system-config']"/>
<element name="dashboard" type="button" selector="//li[@id='menu-magento-backend-dashboard']"/>
<element name="sales" type="button" selector="//li[@id='menu-magento-sales-sales']"/>
<element name="marketing" type="button" selector="//li[@id='menu-magento-backend-marketing']"/>
<element name="system" type="button" selector="//li[@id='menu-magento-backend-system']"/>
<element name="findPartners" type="button" selector="//li[@id='menu-magento-marketplace-partners']"/>
<element name="dashboard" type="button" selector="#menu-magento-backend-dashboard"/>
<element name="sales" type="button" selector="#menu-magento-sales-sales"/>
<element name="marketing" type="button" selector="#menu-magento-backend-marketing"/>
<element name="system" type="button" selector="#menu-magento-backend-system"/>
<element name="findPartners" type="button" selector="#menu-magento-marketplace-partners"/>

<!-- Navigate menu selectors -->
<element name="menuItem" type="button" selector="li[data-ui-id='menu-{{dataUiId}}']" parameterized="true" timeout="30"/>
Expand Down
20 changes: 7 additions & 13 deletions app/code/Magento/Bundle/Model/ResourceModel/Indexer/Price.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,7 @@ private function prepareBundlePriceByType($priceType, array $dimensions, $entity
]
);

$query = $select->insertFromSelect($this->getBundlePriceTable());
$connection->query($query);
$this->tableMaintainer->insertFromSelect($select, $this->getBundlePriceTable(), []);
}

/**
Expand Down Expand Up @@ -418,8 +417,7 @@ private function calculateBundleOptionPrice($priceTable, $dimensions)
]
);

$query = $select->insertFromSelect($this->getBundleOptionTable());
$connection->query($query);
$this->tableMaintainer->insertFromSelect($select, $this->getBundleOptionTable(), []);

$this->getConnection()->delete($priceTable->getTableName());
$this->applyBundlePrice($priceTable);
Expand Down Expand Up @@ -575,8 +573,7 @@ private function calculateFixedBundleSelectionPrice()
'tier_price' => $tierExpr,
]
);
$query = $select->insertFromSelect($this->getBundleSelectionTable());
$connection->query($query);
$this->tableMaintainer->insertFromSelect($select, $this->getBundleSelectionTable(), []);

$this->applyFixedBundleSelectionPrice();
}
Expand Down Expand Up @@ -627,8 +624,7 @@ private function calculateDynamicBundleSelectionPrice($dimensions)
'tier_price' => $tierExpr,
]
);
$query = $select->insertFromSelect($this->getBundleSelectionTable());
$connection->query($query);
$this->tableMaintainer->insertFromSelect($select, $this->getBundleSelectionTable(), []);
}

/**
Expand Down Expand Up @@ -697,8 +693,7 @@ private function prepareTierPriceIndex($dimensions, $entityIds)
$select->where($this->dimensionToFieldMapper[$dimension->getName()] . ' = ?', $dimension->getValue());
}

$query = $select->insertFromSelect($this->getTable('catalog_product_index_tier_price'));
$connection->query($query);
$this->tableMaintainer->insertFromSelect($select, $this->getTable('catalog_product_index_tier_price'), []);
}

/**
Expand All @@ -725,8 +720,7 @@ private function applyBundlePrice($priceTable): void
]
);

$query = $select->insertFromSelect($priceTable->getTableName());
$this->getConnection()->query($query);
$this->tableMaintainer->insertFromSelect($select, $priceTable->getTableName(), []);
}

/**
Expand Down Expand Up @@ -785,7 +779,7 @@ private function getMainTable($dimensions)
if ($this->fullReindexAction) {
return $this->tableMaintainer->getMainReplicaTable($dimensions);
}
return $this->tableMaintainer->getMainTable($dimensions);
return $this->tableMaintainer->getMainTableByDimensions($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="AssertStorefrontBundleValidationMessageActionGroup">
<annotations>
<description>Check error message in validation message box</description>
</annotations>
<arguments>
<argument name="message" type="string"/>
</arguments>

<waitForPageLoad stepKey="waitForPageLoad"/>
<see selector="{{StorefrontBundledSection.validationMessageBox}}" userInput="{{message}}" stepKey="seeErrorHoldMessage"/>
</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="AssertStorefrontBundleValidationMessagesCountActionGroup">
<annotations>
<description>Check if there's a validation message box on page and asserts the validation messages number</description>
</annotations>

<waitForPageLoad stepKey="waitForPageLoad"/>
<seeElement selector="{{StorefrontBundledSection.validationMessageBox}}" stepKey="seeErrorBox"/>
<seeNumberOfElements selector="{{StorefrontBundledSection.validationMessageBox}}" userInput="1" stepKey="seeOneErrorBox"/>
</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="StorefrontAddToTheCartButtonActionGroup">
<annotations>
<description>Clicks 'Add to Cart' on a Storefront Bundled Product page.</description>
</annotations>

<waitForPageLoad stepKey="waitForPageLoad"/>
<waitForElementVisible selector="{{StorefrontBundleProductActionSection.addToCartButton}}" stepKey="waitForAddToCartButton"/>
<click selector="{{StorefrontBundleProductActionSection.addToCartButton}}" stepKey="clickOnAddToCartButton"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<element name="bundleOptionSelection" type="checkbox" selector="//div[@class='nested options-list']/div[{{optionNumber}}]/label[@class='label']" parameterized="true"/>
<!--Description-->
<!--CE exclusively-->
<element name="longDescriptionText" type="text" selector="//*[@id='description']/div/div" timeout="30"/>
<element name="shortDescriptionText" type="text" selector="//div[@class='product attribute overview']" timeout="30"/>
<element name="longDescriptionText" type="text" selector="#description>div>div" timeout="30"/>
<element name="shortDescriptionText" type="text" selector="div.product.attribute.overview" timeout="30"/>
<!--NameOfProductOnProductPage-->
<element name="bundleProductName" type="text" selector="//*[@id='maincontent']//span[@itemprop='name']"/>
<!--PageNotFoundErrorMessage-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<element name="updateCart" type="button" selector="#product-updatecart-button" timeout="30"/>
<element name="configuredPrice" type="block" selector=".price-configured_price .price"/>
<element name="fixedPricing" type="text" selector="//div[@class='price-box price-final_price']//span[@id]//..//span[contains(text(),'{{var1}}')]" parameterized="true"/>
<element name="customizeProduct" type="button" selector="//*[@id='bundle-slide']"/>
<element name="customizeProduct" type="button" selector="#bundle-slide"/>
<element name="customizableBundleItemOption" type="text" selector="//div[@class='field choice'][1]//input[@type='checkbox']"/>
<element name="customizableBundleItemOption2" type="text" selector="//div[@class='field choice'][2]//input[@type='checkbox']"/>
<element name="nthOptionDiv" type="block" selector="#product-options-wrapper div.field.option:nth-of-type({{var}})" parameterized="true"/>
Expand All @@ -38,5 +38,6 @@
<element name="currencyTrigger" type="select" selector="#switcher-currency-trigger" timeout="30"/>
<element name="currency" type="select" selector="//a[text()='{{arg}}']" parameterized="true"/>
<element name="multiSelectOption" type="select" selector="//div[@class='field option required']//select"/>
<element name="validationMessageBox" type="block" selector="#validation-message-box"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<requiredEntity createDataKey="createBundleOption"/>
<requiredEntity createDataKey="createSimpleProduct"/>
</createData>
<magentoCron stepKey="runCronIndex" groups="index"/>
<magentoCLI stepKey="runCronIndex" command="cron:run --group=index"/>
</before>
<after>
<!-- Delete Simple Product -->
Expand All @@ -56,9 +56,11 @@
<actionGroup ref="AdminUpdateProductNameAndDescriptionAttributes" stepKey="updateProductAttribute">
<argument name="product" value="UpdateAttributeNameAndDescription"/>
</actionGroup>
<!--Run cron twice-->
<magentoCLI command="cron:run" stepKey="cronRun"/>
<magentoCLI command="cron:run" stepKey="cronRunTwice"/>
<!-- Start message queue for product attribute consumer -->
<actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue">
<argument name="consumerName" value="{{AdminProductAttributeUpdateMessageConsumerData.consumerName}}"/>
<argument name="maxMessages" value="{{AdminProductAttributeUpdateMessageConsumerData.messageLimit}}"/>
</actionGroup>
<!-- Search for a product with a new name and Open Product -->
<actionGroup ref="FilterProductGridByNameActionGroup" stepKey="searchWithNewProductName">
<argument name="product" value="UpdateAttributeNameAndDescription"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?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="StorefrontBundleCheckBoxOptionValidationTest">
<annotations>
<features value="Bundle"/>
<stories value="Bundle product validation before add to cart"/>
<title value="Customer should be able to see only one validation message for checkbox option group"/>
<description value="Customer should be able to see only one validation message for checkbox option group"/>
<testCaseId value="MC-35133"/>
<severity value="MINOR"/>
<group value="Bundle"/>
</annotations>
<before>
<createData entity="ApiProductWithDescription" stepKey="simpleProduct1" before="bundleProduct"/>
<createData entity="ApiProductWithDescription" stepKey="simpleProduct2" after="simpleProduct1"/>
<createData entity="ApiBundleProduct" stepKey="bundleProduct"/>
<createData entity="CheckboxOption" stepKey="checkboxBundleOption">
<requiredEntity createDataKey="bundleProduct"/>
</createData>
<createData entity="ApiBundleLink" stepKey="createBundleLink1">
<requiredEntity createDataKey="bundleProduct"/>
<requiredEntity createDataKey="checkboxBundleOption"/>
<requiredEntity createDataKey="simpleProduct1"/>
<field key="qty">2</field>
</createData>
<createData entity="ApiBundleLink" stepKey="createBundleLink2">
<requiredEntity createDataKey="bundleProduct"/>
<requiredEntity createDataKey="checkboxBundleOption"/>
<requiredEntity createDataKey="simpleProduct2"/>
<field key="qty">4</field>
</createData>
<magentoCron stepKey="runCronIndex" groups="index"/>
</before>
<after>
<deleteData createDataKey="bundleProduct" stepKey="deleteBundleProduct"/>
<deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
<deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/>
</after>
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductStorefront">
<argument name="productUrl" value="$$bundleProduct.custom_attributes[url_key]$$"/>
</actionGroup>
<actionGroup ref="StorefrontSelectCustomizeAndAddToTheCartButtonActionGroup" stepKey="customizeBundleProduct"/>
<actionGroup ref="StorefrontAddToTheCartButtonActionGroup" stepKey="addToCartBundleProduct"/>
<actionGroup ref="AssertStorefrontBundleValidationMessagesCountActionGroup" stepKey="assertBundleValidationCount"/>
<actionGroup ref="AssertStorefrontBundleValidationMessageActionGroup" stepKey="assertBundleValidationMessage">
<argument name="message" value="Please select one of the options."/>
</actionGroup>
</test>
</tests>
Loading

0 comments on commit 192bc7e

Please sign in to comment.