Skip to content

Commit 999d5f2

Browse files
committed
MAGETWO-91697: [Magento Cloud] "Tier Pricing" of Products changes to "Price" (without discount) after Updated Items and Quantities
- Update automated test
1 parent f5b89ea commit 999d5f2

27 files changed

+348
-807
lines changed

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductActionGroup.xml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,42 @@
173173
<seeInField userInput="{{simpleProduct.urlKey}}" selector="{{AdminProductSEOSection.urlKeyInput}}" stepKey="assertFieldUrlKey"/>
174174
</actionGroup>
175175

176+
<actionGroup name="ProductSetWebsite">
177+
<arguments>
178+
<argument name="website" type="string"/>
179+
</arguments>
180+
<scrollTo selector="{{ProductInWebsitesSection.sectionHeader}}" stepKey="ScrollToWebsites"/>
181+
<click selector="{{ProductInWebsitesSection.sectionHeader}}" stepKey="ClickTpOpenProductInWebsite"/>
182+
<waitForPageLoad stepKey="waitForPageOpened"/>
183+
<click selector="{{ProductInWebsitesSection.website(website)}}" stepKey="SelectWebsite"/>
184+
<click selector="{{AdminProductFormAdvancedPricingSection.save}}" stepKey="clickSaveProduct"/>
185+
<waitForPageLoad stepKey="waitForPageOpened1"/>
186+
</actionGroup>
187+
188+
<actionGroup name="ProductSetAdvancedPricing">
189+
<arguments>
190+
<argument name="website" type="string" defaultValue=""/>
191+
<argument name="group" type="string" defaultValue="Retailer"/>
192+
<argument name="quantity" type="string" defaultValue="1"/>
193+
<argument name="price" type="string" defaultValue="Discount"/>
194+
<argument name="amount" type="string" defaultValue="45"/>
195+
</arguments>
196+
<click selector="{{AdminProductFormSection.advancedPricingLink}}" stepKey="clickOnAdvancedPricingButton"/>
197+
<maximizeWindow stepKey="maximizeWindow"/>
198+
<waitForElement selector="{{AdminProductFormAdvancedPricingSection.customerGroupPriceAddButton}}" stepKey="waitForCustomerGroupPriceAddButton"/>
199+
<click selector="{{AdminProductFormAdvancedPricingSection.customerGroupPriceAddButton}}" stepKey="addCustomerGroupAllGroupsQty1PriceDiscountAnd10percent"/>
200+
<selectOption selector="{{AdminProductFormAdvancedPricingSection.productTierPriceWebsiteSelect('0')}}" userInput="{{website}}" stepKey="selectProductWebsiteValue"/>
201+
<selectOption selector="{{AdminProductFormAdvancedPricingSection.productTierPriceCustGroupSelect('0')}}" userInput="{{group}}" stepKey="selectProductCustomGroupValue"/>
202+
<fillField selector="{{AdminProductFormAdvancedPricingSection.productTierPriceQtyInput('0')}}" userInput="{{quantity}}" stepKey="fillProductTierPriceQtyInput"/>
203+
<selectOption selector="{{AdminProductFormAdvancedPricingSection.productTierPriceValueTypeSelect('0')}}" userInput="{{price}}" stepKey="selectProductTierPriceValueType"/>
204+
<fillField selector="{{AdminProductFormAdvancedPricingSection.productTierPricePercentageValuePriceInput('0')}}" userInput="{{amount}}" stepKey="selectProductTierPricePriceInput"/>
205+
<click selector="{{AdminProductFormAdvancedPricingSection.doneButton}}" stepKey="clickDoneButton"/>
206+
<waitForPageLoad stepKey="WaitForProductSave"/>
207+
<click selector="{{AdminProductFormAdvancedPricingSection.save}}" stepKey="clickSaveProduct1"/>
208+
<waitForPageLoad stepKey="WaitForProductSave1"/>
209+
<see userInput="You saved the product." stepKey="seeSaveConfirmation"/>
210+
</actionGroup>
211+
176212
<!--Assert text in Related, Up-Sell or Cross-Sell section in Admin Product page-->
177213
<actionGroup name="AssertTextInAdminProductRelatedUpSellCrossSellSection">
178214
<arguments>
@@ -196,4 +232,30 @@
196232
<click selector="{{AdminProductFormAdvancedPricingSection.doneButton}}" stepKey="clickDone"/>
197233
<waitForElementNotVisible selector="{{AdminProductFormAdvancedPricingSection.specialPrice}}" stepKey="waitForCloseModalWindow"/>
198234
</actionGroup>
235+
236+
<!--Select Product In Websites-->
237+
<actionGroup name="SelectProductInWebsitesActionGroup">
238+
<arguments>
239+
<argument name="website" type="string"/>
240+
</arguments>
241+
<scrollTo selector="{{CreateProductSection.productInWebsite}}" stepKey="ScrollToWebsites"/>
242+
<click selector="{{CreateProductSection.productInWebsite}}" stepKey="ClickTpOpenProductInWebsite"/>
243+
<waitForPageLoad stepKey="waitForPageOpened"/>
244+
<click selector="{{CreateProductSection.isSelected(website)}}" stepKey="SelectWebsite"/>
245+
<click selector="{{CreateProductSection.saveButton}}" stepKey="clickSaveProduct"/>
246+
</actionGroup>
247+
248+
<!--Switch to New Store view-->
249+
<actionGroup name="SwitchToTheNewStoreView">
250+
<arguments>
251+
<argument name="storeViewName" type="string"/>
252+
</arguments>
253+
<scrollTo selector="{{AdminProductContentSection.pageHeader}}" stepKey="scrollToUp"/>
254+
<waitForElementVisible selector="{{AdminProductFormActionSection.changeStoreButton}}" stepKey="waitForElementBecomeVisible"/>
255+
<click selector="{{AdminProductFormActionSection.changeStoreButton}}" stepKey="clickStoreviewSwitcher"/>
256+
<click selector="{{AdminProductFormActionSection.selectStoreView(storeViewName)}}" stepKey="chooseStoreView"/>
257+
<click selector="{{AdminConfirmationModalSection.ok}}" stepKey="acceptStoreSwitchingMessage"/>
258+
<waitForPageLoad stepKey="waitForPageLoad"/>
259+
</actionGroup>
260+
199261
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/ActionGroup/CreateCartPriceRuleActionGroup.xml

Lines changed: 0 additions & 44 deletions
This file was deleted.

app/code/Magento/Catalog/Test/Mftf/ActionGroup/CreateCustomerActionGroup.xml

Lines changed: 0 additions & 53 deletions
This file was deleted.

app/code/Magento/Catalog/Test/Mftf/ActionGroup/CreateNewOredrsActionGroup.xml

Lines changed: 0 additions & 36 deletions
This file was deleted.

app/code/Magento/Catalog/Test/Mftf/ActionGroup/CreateProductActionGroup.xml

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)