Skip to content

Commit

Permalink
Convert VerifyDisabledCustomerGroupFieldTest to MFTF #664
Browse files Browse the repository at this point in the history
  • Loading branch information
michal-krawczyk-qa committed Mar 15, 2019
1 parent c427332 commit 648df72
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
<element name="selectFirstRow" type="button" selector="//button[@class='action-select']"/>
<element name="deleteBtn" type="button" selector="//*[text()='Delete']"/>
<element name="clearAllBtn" type="button" selector="//button[text()='Clear all']"/>
<element name="selectIdZeroRow" type="button" selector="tr.data-row:nth-child(1) td.data-grid-actions-cell:nth-child(4) > a.action-menu-item" />
</section>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="VerifyDisabledCustomerGroupFieldTest">
<annotations>
<stories value="Check that field is disabled in system Customer Group"/>
<title value="Check that field is disabled in system Customer Group"/>
<description value="Checks that customer_group_code field is disabled in NOT LOGGED IN Customer Group"/>
<testCaseId value="MAGETWO-52481"/>
<severity value="CRITICAL"/>
<group value="customers"/>
<group value="mtf_migrated"/>
</annotations>

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

<!-- 2. Navigate to Customers > Customer Groups -->
<amOnPage url="{{AdminCustomerGroupPage.url}}" stepKey="amOnCustomerGroupPage" />
<waitForPageLoad stepKey="waitForCustomerGroupsPageLoad" />

<!-- 3. Select system Customer Group specified in data set from grid -->
<click selector="{{AdminCustomerGroupMainSection.selectIdZeroRow}}" stepKey="clickOnEditCustomerGroup" />

<!-- 4. Perform all assertions -->
<seeInField selector="#customer_group_code" userInput="NOT LOGGED IN" stepKey="seeNotLoggedInTextInGroupName" />
<assertElementContainsAttribute selector="#customer_group_code" attribute="disabled" expectedValue="true" stepKey="checkIfGroupNameIsDisabled" />

</test>
</tests>

0 comments on commit 648df72

Please sign in to comment.