|
| 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 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + <test name="AdminGridSearchSelectAllTest"> |
| 11 | + <annotations> |
| 12 | + <stories value="Selection should be removed during search."/> |
| 13 | + <title value="Selection should be removed during search."/> |
| 14 | + <description value="Empty selected before and after search, like it works for filter"/> |
| 15 | + <testCaseId value=""/> |
| 16 | + <severity value="CRITICAL"/> |
| 17 | + <group value="uI"/> |
| 18 | + </annotations> |
| 19 | + <before> |
| 20 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 21 | + <!--Create three customers--> |
| 22 | + <createData entity="Simple_US_Customer" stepKey="firstCustomer"/> |
| 23 | + <createData entity="Simple_US_Customer" stepKey="secondCustomer"/> |
| 24 | + <createData entity="Simple_US_Customer" stepKey="thirdCustomer"/> |
| 25 | + </before> |
| 26 | + <after> |
| 27 | + <!--Remove two created customers, third already deleted--> |
| 28 | + <deleteData createDataKey="firstCustomer" stepKey="deleteFirstCustomer"/> |
| 29 | + <deleteData createDataKey="secondCustomer" stepKey="deleteSecondCustomer"/> |
| 30 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 31 | + </after> |
| 32 | + <amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomerPage"/> |
| 33 | + <!-- search Admin Data Grid By Keyword --> |
| 34 | + <conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/> |
| 35 | + <fillField selector="{{AdminDataGridHeaderSection.search}}" userInput="$$secondCustomer.email$$" stepKey="fillKeywordSearchFieldWithSecondCustomerEmail"/> |
| 36 | + <click selector="{{AdminDataGridHeaderSection.submitSearch}}" stepKey="clickKeywordSearch"/> |
| 37 | + <waitForPageLoad stepKey="waitForPageLoad"/> |
| 38 | + <!-- Check select all action --> |
| 39 | + <actionGroup ref="AdminSelectAllCustomers" stepKey="selectAllCustomers"/> |
| 40 | + <seeCheckboxIsChecked selector="{{AdminCustomerGridMainActionsSection.customerCheckbox($$secondCustomer.email$$)}}" stepKey="checkSecondCustomerIsCheckedAfterSelectAll"/> |
| 41 | + <!-- Clear searching By Keyword--> |
| 42 | + <conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clickClearFiltersAfterSearch"/> |
| 43 | + <waitForPageLoad stepKey="waitForPageLoadAfterSearchRemoved"/> |
| 44 | + <!-- Check if selection has bee removed --> |
| 45 | + <dontSeeCheckboxIsChecked selector="{{AdminCustomerGridMainActionsSection.customerCheckbox($$secondCustomer.email$$)}}" stepKey="checkSecondCustomerCheckboxIsUnchecked"/> |
| 46 | + <!-- Check delete action --> |
| 47 | + <click selector="{{AdminCustomerGridMainActionsSection.customerCheckbox(($$thirdCustomer.email$$)}}" stepKey="selectThirdCustomer"/> |
| 48 | + <seeCheckboxIsChecked selector="{{AdminCustomerGridMainActionsSection.customerCheckbox($$thirdCustomer.email$$)}}" stepKey="checkThirdCustomerIsChecked"/> |
| 49 | + <!-- Use delete action for selected --> |
| 50 | + <click selector="{{AdminCustomerGridMainActionsSection.actions}}" stepKey="clickActions"/> |
| 51 | + <click selector="{{AdminCustomerGridMainActionsSection.delete}}" stepKey="clickDelete"/> |
| 52 | + <waitForAjaxLoad stepKey="waitForLoadConfirmation"/> |
| 53 | + <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmDelete"/> |
| 54 | + <!-- Check if only one record record has been deleted --> |
| 55 | + <see selector="{{AdminMessagesSection.success}}" userInput="A total of 1 record(s) were deleted" stepKey="seeSuccess"/> |
| 56 | + </test> |
| 57 | +</tests> |
0 commit comments