Skip to content

Commit 6f158a9

Browse files
MAGETWO-91688: Exception when login as restricted admin with access only to CMS Block
- Stabilize functional tests.
1 parent f65f66d commit 6f158a9

File tree

2 files changed

+43
-18
lines changed

2 files changed

+43
-18
lines changed

app/code/Magento/Braintree/Test/Mftf/Test/CreateAnAdminOrderUsingBraintreePaymentTest1.xml

Lines changed: 42 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,24 @@
1717
<severity value="CRITICAL"/>
1818
<testCaseId value="MAGETWO-93677"/>
1919
<group value="braintree"/>
20-
<skip>
21-
<issueId value="MQE-1187" />
22-
</skip>
2320
</annotations>
2421

22+
2523
<before>
2624
<!--Login As Admin-->
2725
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
26+
2827
<!--CreateNewProduct-->
29-
<actionGroup ref="CreateNewProductActionGroup" stepKey="CreateNewProduct"/>
28+
<createData entity="_defaultCategory" stepKey="createCategory"/>
29+
<createData entity="_defaultProduct" stepKey="createProduct">
30+
<requiredEntity createDataKey="createCategory"/>
31+
</createData>
32+
3033
<!--Create New Customer-->
31-
<actionGroup ref="CreateCustomerActionGroup" stepKey="CreateCustomer"/>
34+
<createData stepKey="createCustomer" entity="Simple_US_Customer"/>
3235
</before>
3336

37+
3438
<!--Configure Braintree-->
3539
<actionGroup ref="ConfigureBraintree" stepKey="configureBraintree"/>
3640

@@ -45,42 +49,63 @@
4549
<argument name="role" value="adminRole"/>
4650
</actionGroup>
4751

48-
<!--Log out-->
49-
<actionGroup ref="SignOut" stepKey="SignOut"/>
52+
<!--SignOut-->
53+
<actionGroup ref="logout" stepKey="signOutFromAdmin"/>
54+
5055
<!--Log in as new user-->
5156
<actionGroup ref="LoginAsAnyUser" stepKey="LoginActionGroup">
5257
<argument name="uname" value="{{newAdmin.username}}"/>
5358
<argument name="passwd" value="{{newAdmin.password}}"/>
5459
</actionGroup>
60+
<waitForPageLoad stepKey="waitForLogin" time="3"/>
5561

5662
<!--Create New Order-->
57-
<actionGroup ref="CreateNewOrderActionGroup" stepKey="createNewOrder"/>
63+
<actionGroup ref="navigateToNewOrderPageExistingCustomer" stepKey="navigateToNewOrder">
64+
<argument name="customer" value="Simple_US_Customer"/>
65+
</actionGroup>
66+
67+
<actionGroup ref="addSimpleProductToOrder" stepKey="addProduct">
68+
<argument name="product" value="_defaultProduct"/>
69+
</actionGroup>
70+
71+
<actionGroup ref="fillOrderCustomerInformation" stepKey="fillCustomerAddress">
72+
<argument name="customer" value="Simple_US_Customer"/>
73+
<argument name="address" value="US_Address_TX"/>
74+
</actionGroup>
75+
76+
<actionGroup ref="orderSelectFlatRateShipping" stepKey="selectFlatRateShipping"/>
77+
78+
<waitForPageLoad stepKey="waitForShippingToFinish"/>
79+
80+
<actionGroup ref="useBraintreeForMasterCard" stepKey="selectCardWithBraintree"/>
81+
82+
<click stepKey="submitOrder" selector="{{NewOrderSection.submitOrder}}"/>
83+
<waitForPageLoad stepKey="waitForSaveConfig" time="5"/>
84+
<waitForElementVisible selector="{{NewOrderSection.successMessage}}" stepKey="waitForSuccessMessage" time="1"/>
5885

5986
<after>
87+
<!-- Disable BrainTree -->
88+
<actionGroup ref="DisableBrainTree" stepKey="disableBrainTree"/>
89+
6090
<!--SignOut-->
6191
<actionGroup ref="SignOut" stepKey="signOutFromNewUser"/>
6292
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
6393

6494
<!--Delete Product-->
65-
<actionGroup ref="DeleteProductActionGroup" stepKey="DeleteAllProducts">
66-
<argument name="productName" value="NewProductData.ProductName"/>
67-
</actionGroup>
95+
<deleteData stepKey="deleteProduct" createDataKey="createProduct"/>
6896

6997
<!--Delete Customer-->
70-
<actionGroup ref="DeleteCustomerActionGroup" stepKey="DeleteCustomer">
71-
<argument name="lastName" value="NewCustomerData.LastName"/>
72-
</actionGroup>
98+
<deleteData stepKey="deleteCustomer" createDataKey="createCustomer"/>
7399

74100
<!--Delete created user-->
75-
<actionGroup ref="DeleteCreatedUserActionGroup" stepKey="AdminDeleteUserActionGroup">
101+
<actionGroup ref="AdminDeleteUserActionGroup" stepKey="AdminDeleteUserActionGroup">
76102
<argument name="user" value="adminRole"/>
77103
</actionGroup>
104+
78105
<!--Delete created role-->
79106
<actionGroup ref="AdminDeleteCreatedRoleActionGroup" stepKey="AdminDeleteRoleActionGroup">
80107
<argument name="role" value="adminRole"/>
81108
</actionGroup>
82-
<!--Log Out-->
83-
<actionGroup ref="logout" stepKey="logOut2"/>
84109
</after>
85110
</test>
86111
</tests>

app/code/Magento/User/Test/Mftf/ActionGroup/AdminDeleteUserActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10-
<actionGroup name="DeleteCreatedUserActionGroup">
10+
<actionGroup name="AdminDeleteUserActionGroup">
1111
<arguments>
1212
<argument name="user"/>
1313
</arguments>

0 commit comments

Comments
 (0)