|
| 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="AdminJsCalenderDateFormatTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Catalog"/> |
| 14 | + <stories value="Storefront should reflect the js calender format configured in the backend" /> |
| 15 | + <title value="Check if js calender format configured in backend is reflected on storefront" /> |
| 16 | + <description value="Check if js calender format configured in backend is reflected on storefront" /> |
| 17 | + <severity value="AVERAGE"/> |
| 18 | + <testCaseId value="AC-12164"/> |
| 19 | + <group value="Catalog"/> |
| 20 | + </annotations> |
| 21 | + |
| 22 | + <before> |
| 23 | + <createData entity="_defaultCategory" stepKey="createPreReqCategory"/> |
| 24 | + </before> |
| 25 | + |
| 26 | + <after> |
| 27 | + <deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/> |
| 28 | + <actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteProduct"> |
| 29 | + <argument name="sku" value="{{_defaultProduct.sku}}"/> |
| 30 | + </actionGroup> |
| 31 | + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearFilter"/> |
| 32 | + |
| 33 | + <actionGroup ref="AdminOpenStoreConfigCatalogPageActionGroup" stepKey="navigateToConfigurationPage2"/> |
| 34 | + <actionGroup ref="AdminConfigExpandDateAndTimeTabActionGroup" stepKey="expandDateAndTimeCustomOptionsTab2"/> |
| 35 | + <actionGroup ref="SelectDropdownDateAndTimeActionGroup" stepKey="RevertDateAndTimeFieldOrder"> |
| 36 | + <argument name="useJsCalender" value="No"/> |
| 37 | + <argument name="firstFieldOfDateOrder" value="Month"/> |
| 38 | + <argument name="secondFieldOfDateOrder" value="Day"/> |
| 39 | + </actionGroup> |
| 40 | + <actionGroup ref="AdminCheckUseSystemValueActionGroup" stepKey="checkUseSystemValueForDateFieldsOrder"> |
| 41 | + <argument name="rowId" value="row_catalog_custom_options_date_fields_order"/> |
| 42 | + </actionGroup> |
| 43 | + <actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveDateAndTimeConfig2"/> |
| 44 | + |
| 45 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> |
| 46 | + </after> |
| 47 | + |
| 48 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 49 | + |
| 50 | + <!-- Open admin configuration, got to catalog, expand date and time tab --> |
| 51 | + <actionGroup ref="AdminOpenStoreConfigCatalogPageActionGroup" stepKey="navigateToConfigurationPage"/> |
| 52 | + <actionGroup ref="AdminConfigExpandDateAndTimeTabActionGroup" stepKey="expandDateAndTimeCustomOptionsTab"/> |
| 53 | + |
| 54 | + <!-- Customize date and time configuration to D/M/Y --> |
| 55 | + <actionGroup ref="AdminUncheckUseSystemValueActionGroup" stepKey="uncheckUseSystemValueForDateFieldsOrder"> |
| 56 | + <argument name="rowId" value="row_catalog_custom_options_date_fields_order"/> |
| 57 | + </actionGroup> |
| 58 | + <actionGroup ref="SelectDropdownDateAndTimeActionGroup" stepKey="CustomizeDateAndTimeFieldOrder"> |
| 59 | + <argument name="useJsCalender" value="Yes"/> |
| 60 | + <argument name="firstFieldOfDateOrder" value="Day"/> |
| 61 | + <argument name="secondFieldOfDateOrder" value="Month"/> |
| 62 | + </actionGroup> |
| 63 | + <actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveDateAndTimeConfig"/> |
| 64 | + |
| 65 | + <!-- Create simple product on storefront --> |
| 66 | + <actionGroup ref="FillAdminSimpleProductFormActionGroup" stepKey="fillProductFieldsInAdmin"> |
| 67 | + <argument name="category" value="$$createPreReqCategory$$"/> |
| 68 | + <argument name="simpleProduct" value="_defaultProduct"/> |
| 69 | + </actionGroup> |
| 70 | + |
| 71 | + <!-- Add customizable date option --> |
| 72 | + <actionGroup ref="AdminAddCustomizableOptionToSimpleProductActionGroup" stepKey="AddCustomizableDateOption"/> |
| 73 | + |
| 74 | + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="runCronIndex"> |
| 75 | + <argument name="indices" value=""/> |
| 76 | + </actionGroup> |
| 77 | + |
| 78 | + <!-- Assert date on storefront --> |
| 79 | + <actionGroup ref="AssertProductDateFormatInStorefrontActionGroup" stepKey="assertDateFormat"> |
| 80 | + <argument name="product" value="_defaultProduct"/> |
| 81 | + </actionGroup> |
| 82 | + </test> |
| 83 | +</tests> |
0 commit comments