|
6 | 6 | */ |
7 | 7 | --> |
8 | 8 |
|
9 | | -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 9 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
10 | 10 | xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
11 | 11 | <test name="AdminCheckDashboardWithChartsTest"> |
12 | 12 | <annotations> |
|
22 | 22 | </annotations> |
23 | 23 | <before> |
24 | 24 | <magentoCLI command="config:set admin/dashboard/enable_charts 1" stepKey="setEnableCharts"/> |
| 25 | + <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches"> |
| 26 | + <argument name="tags" value="config full_page"/> |
| 27 | + </actionGroup> |
25 | 28 | <createData entity="SimpleProduct2" stepKey="createProduct"> |
26 | 29 | <field key="price">150</field> |
27 | 30 | </createData> |
|
43 | 46 | </before> |
44 | 47 | <after> |
45 | 48 | <magentoCLI command="config:set admin/dashboard/enable_charts 0" stepKey="setDisableChartsAsDefault"/> |
| 49 | + <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches"> |
| 50 | + <argument name="tags" value="config full_page"/> |
| 51 | + </actionGroup> |
46 | 52 | <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
47 | 53 | <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
48 | 54 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
49 | 55 | </after> |
50 | 56 |
|
| 57 | + <waitForElementVisible selector="{{AdminDashboardSection.dashboardTotals('Quantity')}}" stepKey="waitForQuantityBefore"/> |
51 | 58 | <grabTextFrom selector="{{AdminDashboardSection.dashboardTotals('Quantity')}}" stepKey="grabQuantityBefore"/> |
52 | 59 |
|
53 | 60 | <updateData createDataKey="createCustomerCart" entity="CustomerOrderPaymentMethod" stepKey="sendCustomerPaymentInformation"> |
|
60 | 67 | <requiredEntity createDataKey="createCustomerCart"/> |
61 | 68 | </createData> |
62 | 69 |
|
63 | | - <reloadPage stepKey="refreshPage"/> |
| 70 | + <actionGroup ref="ReloadPageActionGroup" stepKey="refreshPage"/> |
64 | 71 | <actionGroup ref="AssertAdminDashboardDisplayedWithNoErrorsActionGroup" stepKey="assertAdminDashboardNotBroken"/> |
| 72 | + <waitForElementVisible selector="{{AdminDashboardSection.dashboardTotals('Quantity')}}" stepKey="waitForQuantityAfter"/> |
65 | 73 | <grabTextFrom selector="{{AdminDashboardSection.dashboardTotals('Quantity')}}" stepKey="grabQuantityAfter"/> |
66 | 74 | <assertGreaterThan stepKey="checkQuantityWasChanged"> |
67 | 75 | <actualResult type="const">$grabQuantityAfter</actualResult> |
|
0 commit comments