|
| 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="AdminProductImageAssignmentForMultipleStoresTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Catalog"/> |
| 14 | + <stories value="Product image assignment for multiple stores"/> |
| 15 | + <title value="Product image assignment for multiple stores"/> |
| 16 | + <description value="Product image assignment for multiple stores"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="MAGETWO-58718"/> |
| 19 | + <group value="product"/> |
| 20 | + <group value="WYSIWYGDisabled"/> |
| 21 | + </annotations> |
| 22 | + <before> |
| 23 | + <!-- Login Admin --> |
| 24 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 25 | + <!-- Create Store View English --> |
| 26 | + <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreViewEn"> |
| 27 | + <argument name="customStore" value="customStoreEN"/> |
| 28 | + </actionGroup> |
| 29 | + <!-- Create Store View France --> |
| 30 | + <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreViewFr"> |
| 31 | + <argument name="customStore" value="customStoreFR"/> |
| 32 | + </actionGroup> |
| 33 | + <!-- Create Category and Simple Product --> |
| 34 | + <createData entity="_defaultCategory" stepKey="createCategory"/> |
| 35 | + <createData entity="_defaultProduct" stepKey="createSimpleProduct"> |
| 36 | + <requiredEntity createDataKey="createCategory"/> |
| 37 | + <field key="price">100</field> |
| 38 | + </createData> |
| 39 | + </before> |
| 40 | + <after> |
| 41 | + <!-- Delete Store View English --> |
| 42 | + <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreViewEn"> |
| 43 | + <argument name="customStore" value="customStoreEN"/> |
| 44 | + </actionGroup> |
| 45 | + <!-- Delete Store View France --> |
| 46 | + <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreViewFr"> |
| 47 | + <argument name="customStore" value="customStoreFR"/> |
| 48 | + </actionGroup> |
| 49 | + <!-- Clear Filter Store --> |
| 50 | + <actionGroup ref="clearFiltersAdminDataGrid" stepKey="resetFiltersOnStorePage"/> |
| 51 | + <!-- Delete Category and Simple Product --> |
| 52 | + <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> |
| 53 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 54 | + <!-- Clear Filter Product --> |
| 55 | + <actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearProductFilters"/> |
| 56 | + <!-- Logout Admin --> |
| 57 | + <actionGroup ref="logout" stepKey="logoutOfAdmin"/> |
| 58 | + </after> |
| 59 | + <!-- Search Product and Open Edit --> |
| 60 | + <actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchProduct"> |
| 61 | + <argument name="product" value="$$createSimpleProduct$$"/> |
| 62 | + </actionGroup> |
| 63 | + <actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct"> |
| 64 | + <argument name="product" value="$$createSimpleProduct$$"/> |
| 65 | + </actionGroup> |
| 66 | + |
| 67 | + <!-- Switch to the English store view --> |
| 68 | + <actionGroup ref="AdminSwitchStoreViewActionGroup" stepKey="switchStoreViewEnglishProduct"> |
| 69 | + <argument name="storeView" value="customStoreEN.name"/> |
| 70 | + </actionGroup> |
| 71 | + |
| 72 | + <!-- Upload Image English --> |
| 73 | + <actionGroup ref="addProductImage" stepKey="uploadImageEnglish"/> |
| 74 | + <actionGroup ref="saveProductForm" stepKey="saveProduct1"/> |
| 75 | + |
| 76 | + <!-- Switch to the French store view --> |
| 77 | + <actionGroup ref="AdminSwitchStoreViewActionGroup" stepKey="switchStoreViewFrenchProduct"> |
| 78 | + <argument name="storeView" value="customStoreFR.name"/> |
| 79 | + </actionGroup> |
| 80 | + |
| 81 | + <!-- Upload Image French --> |
| 82 | + <actionGroup ref="addProductImage" stepKey="uploadImageFrench"> |
| 83 | + <argument name="image" value="Magento3"/> |
| 84 | + </actionGroup> |
| 85 | + <actionGroup ref="AdminAssignImageRolesActionGroup" stepKey="assignImageRole1"> |
| 86 | + <argument name="image" value="Magento3"/> |
| 87 | + </actionGroup> |
| 88 | + <actionGroup ref="saveProductForm" stepKey="saveProduct2"/> |
| 89 | + |
| 90 | + <!-- Switch to the All store view --> |
| 91 | + <actionGroup ref="AdminSwitchToAllStoreViewActionGroup" stepKey="switchAllStoreViewProduct"/> |
| 92 | + |
| 93 | + <!-- Upload Image All Store View --> |
| 94 | + <actionGroup ref="addProductImage" stepKey="uploadImageAllStoreView"> |
| 95 | + <argument name="image" value="TestImageNew"/> |
| 96 | + </actionGroup> |
| 97 | + <actionGroup ref="AdminAssignImageRolesActionGroup" stepKey="assignImageRole"> |
| 98 | + <argument name="image" value="TestImageNew"/> |
| 99 | + </actionGroup> |
| 100 | + |
| 101 | + <!-- Change any product data product description --> |
| 102 | + <click selector="{{AdminProductContentSection.sectionHeader}}" stepKey="openDescriptionDropDown"/> |
| 103 | + <fillField selector="{{AdminProductContentSection.descriptionTextArea}}" userInput="This is the long description" stepKey="fillLongDescription"/> |
| 104 | + <fillField selector="{{AdminProductContentSection.shortDescriptionTextArea}}" userInput="This is the short description" stepKey="fillShortDescription"/> |
| 105 | + <actionGroup ref="saveProductForm" stepKey="saveProduct"/> |
| 106 | + |
| 107 | + <!-- Go to Product Page and see Default Store View--> |
| 108 | + <amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct.custom_attributes[url_key]$$)}}" stepKey="goToDefaultStorefrontProductPage"/> |
| 109 | + <seeElement selector="{{StorefrontProductMediaSection.productImageActive(TestImageNew.filename)}}" stepKey="seeActiveImageDefault"/> |
| 110 | + |
| 111 | + <!-- English Switch Store View and see English Store View --> |
| 112 | + <actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="switchStoreViewEnglish"> |
| 113 | + <argument name="storeView" value="customStoreEN"/> |
| 114 | + </actionGroup> |
| 115 | + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="openCategoryPage"/> |
| 116 | + <waitForPageLoad time="30" stepKey="waitForCategoryPage"/> |
| 117 | + <seeElement selector="{{StorefrontCategoryProductSection.ProductImageBySrc(ProductImage.fileName)}}" stepKey="seeThumb"/> |
| 118 | + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct.name$$)}}" stepKey="openProductPage"/> |
| 119 | + <waitForPageLoad time="30" stepKey="waitForProductPage"/> |
| 120 | + <seeElement selector="{{StorefrontProductMediaSection.productImageActive(ProductImage.filename)}}" stepKey="seeActiveImageEnglish"/> |
| 121 | + |
| 122 | + <!-- Switch France Store View and see France Store View --> |
| 123 | + <actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="switchStoreViewFrance"> |
| 124 | + <argument name="storeView" value="customStoreFR"/> |
| 125 | + </actionGroup> |
| 126 | + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="openCategoryPage1"/> |
| 127 | + <waitForPageLoad time="30" stepKey="waitForCategoryPage1"/> |
| 128 | + <seeElement selector="{{StorefrontCategoryProductSection.ProductImageBySrc(Magento3.fileName)}}" stepKey="seeThumb1"/> |
| 129 | + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct.name$$)}}" stepKey="openProductPage1"/> |
| 130 | + <waitForPageLoad time="30" stepKey="waitForProductPage1"/> |
| 131 | + <seeElement selector="{{StorefrontProductMediaSection.productImageActive(Magento3.filename)}}" stepKey="seeActiveImageFrance"/> |
| 132 | + </test> |
| 133 | +</tests> |
0 commit comments