Skip to content

Commit 834d799

Browse files
committed
MFTF Stability control
- last round
1 parent 6fa5174 commit 834d799

File tree

4 files changed

+34
-1
lines changed

4 files changed

+34
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminOpenEditPageTermsConditionsByNameActionGroup">
12+
<annotations>
13+
<description>Opens Edit Page of Terms and Conditions By Provided Name</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="termName" type="string"/>
17+
</arguments>
18+
19+
<fillField selector="{{AdminTermGridSection.filterByTermName}}" userInput="{{termName}}" stepKey="fillTermNameFilter"/>
20+
<click selector="{{AdminTermGridSection.searchButton}}" stepKey="clickSearchButton"/>
21+
<waitForPageLoad stepKey="waitForPageLoad" />
22+
<grabAttributeFrom selector="{{AdminTermGridSection.firstRow}}" userInput="title" stepKey="termsEditUrl" />
23+
<amOnUrl url="{$termsEditUrl}" stepKey="openTermsEditPage" />
24+
<waitForPageLoad stepKey="waitForEditTermPageLoad"/>
25+
</actionGroup>
26+
</actionGroups>

app/code/Magento/CheckoutAgreements/Test/Mftf/Section/AdminTermGridSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<element name="searchButton" type="button" selector="//div[contains(@class,'admin__data-grid-header')]//div[contains(@class,'admin__filter-actions')]/button[1]"/>
1212
<element name="resetButton" type="button" selector="//div[contains(@class,'admin__data-grid-header')]//div[contains(@class,'admin__filter-actions')]/button[2]"/>
1313
<element name="filterByTermName" type="input" selector="#agreementGrid_filter_name"/>
14+
<element name="firstRow" type="block" selector=".data-grid>tbody>tr"/>
1415
<element name="firstRowConditionName" type="text" selector=".data-grid>tbody>tr>td.col-name"/>
1516
<element name="firstRowConditionId" type="text" selector=".data-grid>tbody>tr>td.col-id.col-agreement_id"/>
1617
<element name="successMessage" type="text" selector=".message-success"/>

app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminUpdateDisabledHtmlTermEntityTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<deleteData createDataKey="createProduct" stepKey="deletedProduct"/>
3333

3434
<actionGroup ref="AdminTermsConditionsOpenGridActionGroup" stepKey="openTermsGridToDelete"/>
35-
<actionGroup ref="AdminTermsConditionsEditTermByNameActionGroup" stepKey="openTermToDelete">
35+
<actionGroup ref="AdminOpenEditPageTermsConditionsByNameActionGroup" stepKey="openTermToDelete">
3636
<argument name="termName" value="{{activeTextTerm.name}}"/>
3737
</actionGroup>
3838
<actionGroup ref="AdminTermsConditionsDeleteTermByNameActionGroup" stepKey="deleteOpenedTerm"/>

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@
2323
<click selector="{{AdminOrdersGridSection.createNewOrder}}" stepKey="clickCreateNewOrder"/>
2424
<click selector="{{AdminOrderFormActionSection.CreateNewCustomer}}" stepKey="clickCreateCustomer"/>
2525
<waitForPageLoad stepKey="waitForPageLoaded" />
26+
<!--
27+
Adding wait for 5 seconds to make sure AdminOrderStoreScopeTreeSection.storeForOrder(storeView.name)
28+
renders properly. Unfortunately can not add waitForElement because in some scenarios where this action group
29+
is used the step with Store selection is absent. That is why click is conditional.
30+
-->
31+
<wait time="5" stepKey="wait" />
2632
<conditionalClick selector="{{AdminOrderStoreScopeTreeSection.storeForOrder(storeView.name)}}" dependentSelector="{{AdminOrderStoreScopeTreeSection.storeForOrder(storeView.name)}}" visible="true" stepKey="selectStoreViewIfAppears"/>
2733
<waitForPageLoad stepKey="waitForCreateOrderPageLoadAfterStoreSelect"/>
2834
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="Create New Order" stepKey="seeNewOrderPageTitle"/>

0 commit comments

Comments
 (0)