|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | +/** |
| 4 | + * Copyright 2025 Adobe |
| 5 | + * All Rights Reserved. |
| 6 | + */ |
| 7 | +--> |
| 8 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 9 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + <test name="StorefrontVerifyBundleAndDownloadableProductPageLayoutTest"> |
| 11 | + <annotations> |
| 12 | + <features value="Catalog"/> |
| 13 | + <stories value="Product Page Layout"/> |
| 14 | + <title value="Verify Bundle and Downloadable product pages layout"/> |
| 15 | + <description value="To verify Bundle and Downloadable product pages layout"/> |
| 16 | + <testCaseId value="AC-13423"/> |
| 17 | + <severity value="AVERAGE"/> |
| 18 | + <group value="catalog"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <actionGroup ref="AddDownloadableDomainActionGroup" stepKey="addDownloadableDomain"/> |
| 22 | + <!-- Login as Admin --> |
| 23 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 24 | + <!-- Create customer on Storefront and bundle, downloadable product--> |
| 25 | + <createData entity="SimpleSubCategory" stepKey="createCategory"/> |
| 26 | + <createData entity="CustomerEntityOne" stepKey="createCustomerViaTheStorefront"/> |
| 27 | + <createData entity="_defaultProduct" stepKey="createSimpleProduct1"> |
| 28 | + <requiredEntity createDataKey="createCategory"/> |
| 29 | + </createData> |
| 30 | + <createData entity="_defaultProduct" stepKey="createSimpleProduct2"> |
| 31 | + <requiredEntity createDataKey="createCategory"/> |
| 32 | + </createData> |
| 33 | + <createData entity="ApiBundleProductPriceViewRange" stepKey="bundleProduct"> |
| 34 | + <requiredEntity createDataKey="createCategory"/> |
| 35 | + </createData> |
| 36 | + <createData entity="ApiDownloadableProduct" stepKey="downloadableProduct"/> |
| 37 | + <createData entity="ApiDownloadableLink" stepKey="addDownloadableLink1"> |
| 38 | + <requiredEntity createDataKey="downloadableProduct"/> |
| 39 | + </createData> |
| 40 | + <createData entity="ApiDownloadableLink" stepKey="addDownloadableLink2"> |
| 41 | + <requiredEntity createDataKey="downloadableProduct"/> |
| 42 | + </createData> |
| 43 | + <!-- Create Attribute --> |
| 44 | + <createData entity="DropDownBundleOption" stepKey="bundleOption"> |
| 45 | + <requiredEntity createDataKey="bundleProduct"/> |
| 46 | + </createData> |
| 47 | + <createData entity="ApiBundleLink" stepKey="createBundleLink1"> |
| 48 | + <requiredEntity createDataKey="bundleProduct"/> |
| 49 | + <requiredEntity createDataKey="bundleOption"/> |
| 50 | + <requiredEntity createDataKey="createSimpleProduct1"/> |
| 51 | + </createData> |
| 52 | + <createData entity="ApiBundleLink" stepKey="createBundleLink2"> |
| 53 | + <requiredEntity createDataKey="bundleProduct"/> |
| 54 | + <requiredEntity createDataKey="bundleOption"/> |
| 55 | + <requiredEntity createDataKey="createSimpleProduct2"/> |
| 56 | + </createData> |
| 57 | + <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToProductEditPage"> |
| 58 | + <argument name="productId" value="$$bundleProduct.id$$"/> |
| 59 | + </actionGroup> |
| 60 | + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/> |
| 61 | + </before> |
| 62 | + <after> |
| 63 | + <!-- Delete created data --> |
| 64 | + <actionGroup ref="RemoveDownloadableDomainActionGroup" stepKey="removeDownloadableDomain"/> |
| 65 | + <createData entity="SimpleSubCategory" stepKey="deleteCreateCategory"/> |
| 66 | + <deleteData createDataKey="createCustomerViaTheStorefront" stepKey="deleteCustomerViaTheStorefront"/> |
| 67 | + <deleteData createDataKey="bundleProduct" stepKey="deleteBundleProduct"/> |
| 68 | + <deleteData createDataKey="downloadableProduct" stepKey="deleteDownloadableProduct"/> |
| 69 | + <!-- Log out --> |
| 70 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 71 | + </after> |
| 72 | + <!-- Pre-condition 1: Login to the storefront as customer --> |
| 73 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer"> |
| 74 | + <argument name="Customer" value="$$createCustomerViaTheStorefront$$"/> |
| 75 | + </actionGroup> |
| 76 | + <!-- Step 1: Open the bundle product page --> |
| 77 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openBundleProductPage"> |
| 78 | + <argument name="productUrl" value="$bundleProduct.custom_attributes[url_key]$"/> |
| 79 | + </actionGroup> |
| 80 | + <waitForPageLoad stepKey="waitForProductPage"/> |
| 81 | + <!-- Step 2: Add bundle product page to the wishlist --> |
| 82 | + <actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" stepKey="addToWishlistProduct"> |
| 83 | + <argument name="productVar" value="$$bundleProduct$$"/> |
| 84 | + </actionGroup> |
| 85 | + <!-- Click on the bundle product edit icon, and check the bundle product page layout --> |
| 86 | + <actionGroup ref="StorefrontCustomerUpdateWishlistItemActionGroup" stepKey="clickEditWishlistItem"> |
| 87 | + <argument name="productName" value="$$bundleProduct.name$$"/> |
| 88 | + </actionGroup> |
| 89 | + <waitForPageLoad stepKey="waitForPageLoad"/> |
| 90 | + <scrollToTopOfPage stepKey="scrollToTop"/> |
| 91 | + <!-- Verify if bundle product page layout is not getting break with some element present on page --> |
| 92 | + <waitForElementVisible selector="{{StorefrontBundledSection.bundleProductName}}" stepKey="LookingForNameOfProduct" /> |
| 93 | + <waitForElementVisible selector="{{StorefrontBundleProductActionSection.updateWishList}}" stepKey="waitForProductUpdateWishlistBtnVisible"/> |
| 94 | + <waitForElementVisible selector="{{StorefrontBundledSection.bundleProductsPrice}}" stepKey="LookingFoPriceOfProduct" /> |
| 95 | + <waitForElementVisible selector="{{StorefrontBundleProductActionSection.customizeAndAddToCartButton}}" stepKey="waitForCustomizeAndAddToCartButton"/> |
| 96 | + <waitForElementVisible selector="{{StorefrontBundleProductActionSection.skuField}}" stepKey="LookingFoSkuOfProduct"/> |
| 97 | + <waitForElementVisible selector="{{StorefrontProductInfoMainSection.fixedFinalPrice}}" stepKey="seeBundleProductPrice"/> |
| 98 | + <!-- Step 3: Open the downloadable product page --> |
| 99 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openStorefrontProductPage"> |
| 100 | + <argument name="productUrl" value="$downloadableProduct.custom_attributes[url_key]$"/> |
| 101 | + </actionGroup> |
| 102 | + <waitForPageLoad stepKey="waitForPageLoadAgain"/> |
| 103 | + <!-- Step 3.1: Add downloadable product page to the wishlist --> |
| 104 | + <actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" stepKey="addToDownloadableWishlistProduct"> |
| 105 | + <argument name="productVar" value="$$downloadableProduct$$"/> |
| 106 | + </actionGroup> |
| 107 | + <!-- Click on the downloadable product edit icon, and check the downloadable product page layout --> |
| 108 | + <actionGroup ref="StorefrontCustomerUpdateWishlistItemActionGroup" stepKey="clickEditDownloadableWishlistItem"> |
| 109 | + <argument name="productName" value="$downloadableProduct.name$"/> |
| 110 | + </actionGroup> |
| 111 | + <waitForPageLoad stepKey="waitForPageLoadAgain2"/> |
| 112 | + <scrollToTopOfPage stepKey="scrollToTopAgain"/> |
| 113 | + <!-- Verify if downloadable product page layout is not getting break with some element present on page --> |
| 114 | + <waitForElementVisible selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="seeStorefrontDownloadableProductsProductName"/> |
| 115 | + <waitForElementVisible selector="{{StorefrontProductInfoMainSection.productSku}}" stepKey="seeStorefrontDownloadableProductsProductSku"/> |
| 116 | + <waitForElementVisible selector="{{StorefrontProductInfoMainSection.fixedFinalPrice}}" stepKey="seeDownloadableProductPrice"/> |
| 117 | + <!-- Check for Downloadable Links --> |
| 118 | + <actionGroup ref="AssertStorefrontLinkOnDownloadableProductPageActionGroup" stepKey="seeFirstLink"> |
| 119 | + <argument name="linkTitle" value="{{ApiDownloadableLink.title}}"/> |
| 120 | + </actionGroup> |
| 121 | + </test> |
| 122 | +</tests> |
0 commit comments