|
| 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="AdminVirtualProductTypeSwitchingToDownloadableProductTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Catalog"/> |
| 14 | + <stories value="Product type switching"/> |
| 15 | + <title value="Virtual product type switching on editing to Downloadable product"/> |
| 16 | + <description value="Virtual product type switching on editing to Downloadable product"/> |
| 17 | + <testCaseId value="MC-17954"/> |
| 18 | + <useCaseId value="MAGETWO-44170"/> |
| 19 | + <severity value="MAJOR"/> |
| 20 | + <group value="catalog"/> |
| 21 | + </annotations> |
| 22 | + <before> |
| 23 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 24 | + <!--Create product--> |
| 25 | + <comment userInput="Create product" stepKey="commentCreateProduct"/> |
| 26 | + <createData entity="VirtualProduct" stepKey="createProduct"/> |
| 27 | + </before> |
| 28 | + <after> |
| 29 | + <!--Delete product--> |
| 30 | + <comment userInput="Delete product" stepKey="commentDeleteProduct"/> |
| 31 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 32 | + <actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearProductFilters"/> |
| 33 | + <actionGroup ref="logout" stepKey="logout"/> |
| 34 | + </after> |
| 35 | + <!--Change product type to Downloadable--> |
| 36 | + <comment userInput="Change product type to Downloadable" stepKey="commentCreateDownloadable"/> |
| 37 | + <amOnPage url="{{AdminProductEditPage.url($$createProduct.id$$)}}" stepKey="gotToDownloadableProductPage"/> |
| 38 | + <waitForPageLoad stepKey="waitForDownloadableProductPageLoad"/> |
| 39 | + <actionGroup ref="AdminAddDownloadableLinkInformationActionGroup" stepKey="addDownloadableLinkInformation"/> |
| 40 | + <checkOption selector="{{AdminProductDownloadableSection.isLinksPurchasedSeparately}}" stepKey="checkOptionPurchaseSeparately"/> |
| 41 | + <actionGroup ref="addDownloadableProductLinkWithMaxDownloads" stepKey="addDownloadableProductLink"> |
| 42 | + <argument name="link" value="downloadableLinkWithMaxDownloads"/> |
| 43 | + </actionGroup> |
| 44 | + <actionGroup ref="saveProductForm" stepKey="saveDownloadableProductForm"/> |
| 45 | + <!--Assert downloadable product on Admin product page grid--> |
| 46 | + <comment userInput="Assert configurable product in Admin product page grid" stepKey="commentAssertDownloadableProductOnAdmin"/> |
| 47 | + <amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="goToCatalogProductPage"/> |
| 48 | + <actionGroup ref="filterProductGridBySku2" stepKey="filterProductGridBySku"> |
| 49 | + <argument name="sku" value="$$createProduct.sku$$"/> |
| 50 | + </actionGroup> |
| 51 | + <see selector="{{AdminProductGridSection.productGridCell('1', 'Name')}}" userInput="$$createProduct.name$$" stepKey="seeDownloadableProductNameInGrid"/> |
| 52 | + <see selector="{{AdminProductGridSection.productGridCell('1', 'Type')}}" userInput="Downloadable Product" stepKey="seeDownloadableProductTypeInGrid"/> |
| 53 | + <actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearDownloadableProductFilters"/> |
| 54 | + <!--Assert downloadable product on storefront--> |
| 55 | + <comment userInput="Assert downloadable product on storefront" stepKey="commentAssertDownloadableProductOnStorefront"/> |
| 56 | + <amOnPage url="{{StorefrontProductPage.url($$createProduct.name$$)}}" stepKey="openDownloadableProductPage"/> |
| 57 | + <waitForPageLoad stepKey="waitForStorefrontDownloadableProductPageLoad"/> |
| 58 | + <see userInput="IN STOCK" selector="{{StorefrontProductInfoMainSection.productStockStatus}}" stepKey="assertDownloadableProductInStock"/> |
| 59 | + <scrollTo selector="{{StorefrontDownloadableProductSection.downloadableLinkBlock}}" stepKey="scrollToLinksInStorefront"/> |
| 60 | + <seeElement selector="{{StorefrontDownloadableProductSection.downloadableLinkLabel(downloadableLinkWithMaxDownloads.title)}}" stepKey="seeDownloadableLink" /> |
| 61 | + </test> |
| 62 | + <test name="AdminDownloadableProductTypeSwitchingToSimpleProductTest" extends="AdminVirtualProductTypeSwitchingToDownloadableProductTest"> |
| 63 | + <annotations> |
| 64 | + <features value="Catalog"/> |
| 65 | + <stories value="Product type switching"/> |
| 66 | + <title value="Downloadable product type switching on editing to Simple product"/> |
| 67 | + <description value="Downloadable product type switching on editing to Simple product"/> |
| 68 | + <testCaseId value="MC-17955"/> |
| 69 | + <useCaseId value="MAGETWO-44170"/> |
| 70 | + <severity value="MAJOR"/> |
| 71 | + <group value="catalog"/> |
| 72 | + </annotations> |
| 73 | + <!--Change product type to Simple--> |
| 74 | + <comment userInput="Change product type to Simple Product" stepKey="commentCreateSimple"/> |
| 75 | + <amOnPage url="{{AdminProductEditPage.url($$createProduct.id$$)}}" stepKey="gotToProductPage"/> |
| 76 | + <waitForPageLoad stepKey="waitForProductPageLoad"/> |
| 77 | + <actionGroup ref="AdminAddDownloadableLinkInformationActionGroup" stepKey="addDownloadableLinkInformation"/> |
| 78 | + <selectOption selector="{{AdminProductFormSection.productWeightSelect}}" userInput="This item has weight" stepKey="selectWeightForProduct"/> |
| 79 | + <actionGroup ref="saveProductForm" stepKey="saveProductForm"/> |
| 80 | + <!--Assert simple product on Admin product page grid--> |
| 81 | + <comment userInput="Assert simple product in Admin product page grid" stepKey="commentAssertProductOnAdmin"/> |
| 82 | + <amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="goToCatalogSimpleProductPage"/> |
| 83 | + <actionGroup ref="filterProductGridBySku2" stepKey="filterSimpleProductGridBySku"> |
| 84 | + <argument name="sku" value="$$createProduct.sku$$"/> |
| 85 | + </actionGroup> |
| 86 | + <see selector="{{AdminProductGridSection.productGridCell('1', 'Name')}}" userInput="$$createProduct.name$$" stepKey="seeSimpleProductNameInGrid"/> |
| 87 | + <see selector="{{AdminProductGridSection.productGridCell('1', 'Type')}}" userInput="Simple Product" stepKey="seeSimpleProductTypeInGrid"/> |
| 88 | + <actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearSimpleProductFilters"/> |
| 89 | + <!--Assert simple product on storefront--> |
| 90 | + <comment userInput="Assert simple product on storefront" stepKey="commentAssertSimpleProductOnStorefront"/> |
| 91 | + <amOnPage url="{{StorefrontProductPage.url($$createProduct.name$$)}}" stepKey="openSimpleProductPage"/> |
| 92 | + <waitForPageLoad stepKey="waitForStorefrontSimpleProductPageLoad"/> |
| 93 | + <see userInput="IN STOCK" selector="{{StorefrontProductInfoMainSection.productStockStatus}}" stepKey="assertSimpleProductInStock"/> |
| 94 | + <dontSeeElement selector="{{StorefrontDownloadableProductSection.downloadableLinkLabel(downloadableLinkWithMaxDownloads.title)}}" stepKey="dontSeeDownloadableLink" /> |
| 95 | + </test> |
| 96 | +</tests> |
0 commit comments