Skip to content

Commit

Permalink
ENGCOM-7094: Add 'Admin' prefix to Test and ActionGroup #27276
Browse files Browse the repository at this point in the history
 - Merge Pull Request #27276 from lbajsarowicz/magento2:mftf/add-prefix
 - Merged commits:
   1. 3ed4cf7
   2. 9d78f60
   3. fa4ac9b
  • Loading branch information
magento-engcom-team committed Mar 17, 2020
2 parents 8eb9deb + fa4ac9b commit 22f3a1a
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminGridCustomerGroupEditByCodeActionGroup">
<arguments>
<argument name="customerGroupCode" type="string"/>
</arguments>

<click selector="{{AdminCustomerGroupMainSection.editButtonByCustomerGroupCode(customerGroupCode)}}" stepKey="clickOnEditCustomerGroup" />
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="NavigateToCustomerGroupPage">
<actionGroup name="AdminNavigateToCustomerGroupPageActionGroup">
<annotations>
<description>Goes to the Admin Customer Groups page.</description>
</annotations>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ NOTICE: Action Groups in this file are DEPRECATED and SHOULD NOT BE USED anymore
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="NavigateToCustomerGroupPage" extends="AdminNavigateToCustomerGroupPageActionGroup" deprecated="Use AdminNavigateToCustomerGroupPageActionGroup"/>
<actionGroup name="AdminCreateCustomerWithWebSiteAndGroup" deprecated="Use `AdminCreateCustomerWithWebSiteAndGroupActionGroup` instead">
<annotations>
<description>Goes to the Customer grid page. Click on 'Add New Customer'. Fills provided Customer Data. Fill provided Customer Address data. Assigns Product to Website and Store View. Clicks on Save.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="VerifyDisabledCustomerGroupFieldTest">
<test name="AdminVerifyDisabledCustomerGroupFieldTest">
<annotations>
<stories value="Check that field is disabled in system Customer Group"/>
<title value="Check that field is disabled in system Customer Group"/>
Expand All @@ -19,20 +19,20 @@
<group value="mtf_migrated"/>
</annotations>

<!-- Steps -->
<!-- 1. Login to backend as admin user -->
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
<waitForPageLoad stepKey="waitForAdminPageLoad" />
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>

<!-- 2. Navigate to Customers > Customer Groups -->
<amOnPage url="{{AdminCustomerGroupPage.url}}" stepKey="amOnCustomerGroupPage" />
<conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clearFiltersIfTheySet"/>
<actionGroup ref="AdminNavigateToCustomerGroupPageActionGroup" stepKey="amOnCustomerGroupPage"/>
<actionGroup ref="AdminFilterCustomerGroupByNameActionGroup" stepKey="clearFiltersIfTheySet">
<argument name="customerGroupName" value="{{NotLoggedInCustomerGroup.code}}"/>
</actionGroup>

<!-- 3. Select system Customer Group specified in data set from grid -->
<click selector="{{AdminCustomerGroupMainSection.editButtonByCustomerGroupCode(NotLoggedInCustomerGroup.code)}}" stepKey="clickOnEditCustomerGroup" />
<actionGroup ref="AdminGridCustomerGroupEditByCodeActionGroup" stepKey="openCustomerGroup">
<argument name="customerGroupCode" value="{{NotLoggedInCustomerGroup.code}}"/>
</actionGroup>

<!-- 4. Perform all assertions -->
<seeInField selector="{{AdminNewCustomerGroupSection.groupName}}" userInput="{{NotLoggedInCustomerGroup.code}}" stepKey="seeNotLoggedInTextInGroupName" />
<assertElementContainsAttribute selector="{{AdminNewCustomerGroupSection.groupName}}" attribute="disabled" expectedValue="true" stepKey="checkIfGroupNameIsDisabled" />

<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="VerifyDisabledCustomerGroupFieldTest" extends="AdminVerifyDisabledCustomerGroupFieldTest" deprecated="Use AdminVerifyDisabledCustomerGroupFieldTest instead"/>
<test name="AddingProductWithExpiredSessionTest" extends="StorefrontAddProductToCartWithExpiredSessionTest" deprecated="Use StorefrontAddProductToCartWithExpiredSessionTest"/>
</tests>

0 comments on commit 22f3a1a

Please sign in to comment.