Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MFTF] Refactoring MoveRecentlyViewedConfigurableProductOnOrderPageTest #35099

Merged
merged 2 commits into from Jun 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -91,8 +91,10 @@
</actionGroup>

<!-- Go to created product page -->
<amOnPage url="{{StorefrontProductPage.url($$createConfigProduct.custom_attributes[url_key]$$)}}" stepKey="goToProductPage"/>
<waitForPageLoad stepKey="waitForProductPageLoad"/>
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="goToProductPage">
<argument name="productUrl" value="$$createConfigProduct.custom_attributes[url_key]$$"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForProductPageLoad"/>
<selectOption selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" userInput="$$getConfigAttributeOption.value$$" stepKey="selectOption"/>

<!-- Search and open customer -->
Expand All @@ -103,13 +105,15 @@
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickEditButton"/>

<!-- Click create order -->
<click selector="{{AdminCustomerMainActionsSection.createOrderBtn}}" stepKey="clickCreateOrder"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
<actionGroup ref="AdminClickCreateOrderButtonOnEditCustomerPageActionGroup" stepKey="clickCreateOrder"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageLoad"/>
<conditionalClick selector="{{AdminOrderStoreScopeTreeSection.storeOption(_defaultStore.name)}}" dependentSelector="{{AdminOrderStoreScopeTreeSection.storeOption(_defaultStore.name)}}" visible="true" stepKey="selectStoreViewIfAppears"/>
<waitForPageLoad stepKey="waitForPageLoad2"/>

<!-- Add configure to product -->
<click selector="{{AdminCustomerActivitiesRecentlyViewedSection.addToOrderConfigure($$createConfigProduct.name$$)}}" stepKey="configureProduct"/>
<actionGroup ref="AdminClickConfigureForRecentlyViewedProductActionGroup" stepKey="configureProduct">
<argument name="productName" value="$$createConfigProduct.name$$"/>
</actionGroup>
<selectOption selector="{{AdminCustomerActivitiesConfigureSection.addAttribute}}" userInput="$$getConfigAttributeOption.value$$" stepKey="selectProductOption"/>
<click selector="{{AdminCustomerActivitiesConfigureSection.okButton}}" stepKey="clickOkBtn"/>
<waitForPageLoad stepKey="waitForProductConfigureLoad"/>
Expand All @@ -118,7 +122,15 @@
<actionGroup ref="AdminClickUpdateChangesOnCreateOrderPageActionGroup" stepKey="clickUpdateChangesBtn"/>

<!-- Assert products in items ordered grid -->
<see selector="{{AdminCustomerCreateNewOrderSection.gridCell('1', 'Product')}}" userInput="$$createConfigProduct.name$$" stepKey="seeProductName"/>
<see selector="{{AdminCustomerCreateNewOrderSection.gridCell('1', 'Price')}}" userInput="$123.00" stepKey="seeProductPrice"/>
<actionGroup ref="AdminAssertProductInItemsOrderedGridOnCreateOrderPageActionGroup" stepKey="seeProductName">
<argument name="index" value="1"/>
<argument name="attribute" value="Product"/>
<argument name="value" value="$$createConfigProduct.name$$"/>
</actionGroup>
<actionGroup ref="AdminAssertProductInItemsOrderedGridOnCreateOrderPageActionGroup" stepKey="seeProductPrice">
<argument name="index" value="1"/>
<argument name="attribute" value="Price"/>
<argument name="value" value="$123.00"/>
</actionGroup>
</test>
</tests>