Skip to content

Commit 4907d9a

Browse files
committed
MAGETWO-97355: [FT] [MFTF] AdminCreateOrderWithBundleProductTest fails because of bad design
1 parent 6b109f4 commit 4907d9a

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,23 @@
6060
<actionGroup name="navigateToNewOrderPageExistingCustomer">
6161
<arguments>
6262
<argument name="customer"/>
63+
<argument name="storeView" defaultValue="_defaultStore"/>
6364
</arguments>
6465
<amOnPage url="{{AdminOrdersPage.url}}" stepKey="navigateToOrderIndexPage"/>
6566
<waitForPageLoad stepKey="waitForIndexPageLoad"/>
6667
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="Orders" stepKey="seeIndexPageTitle"/>
6768
<click selector="{{AdminMainActionsSection.add}}" stepKey="clickCreateNewOrder"/>
6869
<waitForPageLoad stepKey="waitForCustomerGridLoad"/>
70+
<!--Clear grid filters-->
71+
<conditionalClick selector="{{AdminOrderCustomersGridSection.resetButton}}" dependentSelector="{{AdminOrderCustomersGridSection.resetButton}}" visible="true" stepKey="clearExistingCustomerFilters"/>
6972
<fillField userInput="{{customer.email}}" selector="{{AdminOrderCustomersGridSection.emailFilter}}" stepKey="filterEmail"/>
7073
<click selector="{{AdminOrderCustomersGridSection.searchButton}}" stepKey="applyFilter"/>
7174
<waitForPageLoad stepKey="waitForFilteredCustomerGridLoad"/>
7275
<click selector="{{AdminOrderCustomersGridSection.firstRow}}" stepKey="clickOnCustomer"/>
73-
<waitForPageLoad stepKey="waitForCreateOrderPageLoad" />
76+
<waitForPageLoad stepKey="waitForCreateOrderPageLoad"/>
77+
<!-- Select store view if appears -->
78+
<conditionalClick selector="{{AdminOrderStoreScopeTreeSection.storeOption(storeView.name)}}" dependentSelector="{{AdminOrderStoreScopeTreeSection.storeOption(storeView.name)}}" visible="true" stepKey="selectStoreViewIfAppears"/>
79+
<waitForPageLoad stepKey="waitForCreateOrderPageLoadAfterStoreSelect"/>
7480
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="Create New Order" stepKey="seeNewOrderPageTitle"/>
7581
</actionGroup>
7682
<!--Add a simple product to order-->
@@ -132,13 +138,13 @@
132138
<click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/>
133139
<fillField selector="{{AdminOrderFormItemsSection.skuFilter}}" userInput="{{product.sku}}" stepKey="fillSkuFilterBundle"/>
134140
<click selector="{{AdminOrderFormItemsSection.search}}" stepKey="clickSearchBundle"/>
135-
<scrollTo selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" x="0" y="-100" stepKey="scrollToCheckColumn"/>
141+
<scrollToTopOfPage stepKey="scrollToTop1"/>
136142
<checkOption selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="selectBundleProduct"/>
143+
<waitForLoadingMaskToDisappear stepKey="waitForMask"/>
137144
<waitForElementVisible selector="{{AdminOrderFormBundleProductSection.quantity}}" stepKey="waitForBundleOptionLoad"/>
138-
<wait time="2" stepKey="waitForOptionsToLoad"/>
139145
<fillField selector="{{AdminOrderFormBundleProductSection.quantity}}" userInput="{{quantity}}" stepKey="fillQuantity"/>
140146
<click selector="{{AdminOrderFormConfigureProductSection.ok}}" stepKey="clickOk"/>
141-
<scrollTo selector="{{AdminOrderFormItemsSection.addSelected}}" x="0" y="-100" stepKey="scrollToAddSelectedButton"/>
147+
<scrollToTopOfPage stepKey="scrollToTop2"/>
142148
<click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="clickAddSelectedProducts"/>
143149
</actionGroup>
144150
<!--Add bundle product to order and check product price in the grid-->

app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithBundleProductTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
1010
<test name="AdminCreateOrderWithBundleProductTest">
1111
<annotations>
1212
<title value="Create Order in Admin and update bundle product configuration"/>

0 commit comments

Comments
 (0)