|
| 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" |
| 10 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="AdminCheckDashboardWithChartsTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Backend"/> |
| 14 | + <stories value="Google Charts on Magento dashboard"/> |
| 15 | + <title value="Admin should see Google chart on Magento dashboard"/> |
| 16 | + <description value="Google chart on Magento dashboard page is displaying properly"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="MAGETWO-98934"/> |
| 19 | + <useCaseId value="MAGETWO-98584"/> |
| 20 | + <group value="backend"/> |
| 21 | + </annotations> |
| 22 | + <before> |
| 23 | + <magentoCLI command="config:set admin/dashboard/enable_charts 1" stepKey="setEnableCharts"/> |
| 24 | + <createData entity="SimpleProduct2" stepKey="createProduct"> |
| 25 | + <field key="price">150</field> |
| 26 | + </createData> |
| 27 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"> |
| 28 | + <field key="firstname">John1</field> |
| 29 | + <field key="lastname">Doe1</field> |
| 30 | + </createData> |
| 31 | + <createData entity="CustomerCart" stepKey="createCustomerCart"> |
| 32 | + <requiredEntity createDataKey="createCustomer"/> |
| 33 | + </createData> |
| 34 | + <createData entity="CustomerCartItem" stepKey="addCartItem"> |
| 35 | + <requiredEntity createDataKey="createCustomerCart"/> |
| 36 | + <requiredEntity createDataKey="createProduct"/> |
| 37 | + </createData> |
| 38 | + <createData entity="CustomerAddressInformation" stepKey="addCustomerOrderAddress"> |
| 39 | + <requiredEntity createDataKey="createCustomerCart"/> |
| 40 | + </createData> |
| 41 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 42 | + </before> |
| 43 | + <after> |
| 44 | + <magentoCLI command="config:set admin/dashboard/enable_charts 0" stepKey="setDisableChartsAsDefault"/> |
| 45 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 46 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 47 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 48 | + </after> |
| 49 | + |
| 50 | + <grabTextFrom selector="{{AdminDashboardSection.dashboardTotals('Quantity')}}" stepKey="grabQuantityBefore"/> |
| 51 | + |
| 52 | + <updateData createDataKey="createCustomerCart" entity="CustomerOrderPaymentMethod" stepKey="sendCustomerPaymentInformation"> |
| 53 | + <requiredEntity createDataKey="createCustomerCart"/> |
| 54 | + </updateData> |
| 55 | + <createData entity="Invoice" stepKey="invoiceOrder"> |
| 56 | + <requiredEntity createDataKey="createCustomerCart"/> |
| 57 | + </createData> |
| 58 | + <createData entity="Shipment" stepKey="shipOrder"> |
| 59 | + <requiredEntity createDataKey="createCustomerCart"/> |
| 60 | + </createData> |
| 61 | + |
| 62 | + <reloadPage stepKey="refreshPage"/> |
| 63 | + <actionGroup ref="AssertAdminDashboardDisplayedWithNoErrorsActionGroup" stepKey="assertAdminDashboardNotBroken"/> |
| 64 | + <grabTextFrom selector="{{AdminDashboardSection.dashboardTotals('Quantity')}}" stepKey="grabQuantityAfter"/> |
| 65 | + <assertGreaterThan stepKey="checkQuantityWasChanged"> |
| 66 | + <actualResult type="const">$grabQuantityAfter</actualResult> |
| 67 | + <expectedResult type="const">$grabQuantityBefore</expectedResult> |
| 68 | + </assertGreaterThan> |
| 69 | + </test> |
| 70 | +</tests> |
0 commit comments