|
| 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="AdminAwsS3ExportBundleProductTest" extends="AdminExportBundleProductTest"> |
| 12 | + <annotations> |
| 13 | + <features value="AwsS3"/> |
| 14 | + <stories value="Export Products"/> |
| 15 | + <title value="S3 - Export Bundle Products"/> |
| 16 | + <description value="Verifies that a user can export Bundle and Simple child products for Bundled products |
| 17 | + with a dynamic price, a fixed price, and a custom attribute. Verifies that the exported file and the |
| 18 | + downloadable copy of the exported file contain the expected products. Note that MFTF cannot simply download |
| 19 | + a file and have access to it due to the test not having access to the server that is running the test |
| 20 | + browser. Therefore, this test verifies that the Download button can be successfully clicked, grabs the |
| 21 | + request URL from the Download button, executes the request on the magento machine via a curl request, and |
| 22 | + verifies the contents of the downloaded file. Uses S3 for the file system."/> |
| 23 | + <severity value="CRITICAL"/> |
| 24 | + <testCaseId value="MC-38558"/> |
| 25 | + <group value="importExport"/> |
| 26 | + <group value="remote_storage_aws_s3"/> |
| 27 | + </annotations> |
| 28 | + |
| 29 | + <before> |
| 30 | + <!-- Enable AWS S3 Remote Storage --> |
| 31 | + <magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.enable_options}}" stepKey="enableRemoteStorage" before="firstSimpleProductForDynamic"/> |
| 32 | + </before> |
| 33 | + |
| 34 | + <after> |
| 35 | + <helper class="\Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="deleteDirectory" stepKey="deleteExportFileDirectory"> |
| 36 | + <argument name="path">import_export/export</argument> |
| 37 | + </helper> |
| 38 | + |
| 39 | + <!-- Disable AWS S3 Remote Storage --> |
| 40 | + <magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.disable_options}}" stepKey="disableRemoteStorage" after="logout"/> |
| 41 | + </after> |
| 42 | + |
| 43 | + <!-- Validate Export File on File System: Dynamic Bundle Product --> |
| 44 | + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileExists" stepKey="assertExportFileExists"> |
| 45 | + <argument name="filePath">import_export/export/{$grabNameFile}</argument> |
| 46 | + </helper> |
| 47 | + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileContainsString" stepKey="assertExportFileContainsFirstSimpleProductForDynamicBundledProduct"> |
| 48 | + <argument name="filePath">import_export/export/{$grabNameFile}</argument> |
| 49 | + <argument name="text">$$firstSimpleProductForDynamic.name$$</argument> |
| 50 | + </helper> |
| 51 | + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileContainsString" stepKey="assertExportFileContainsSecondSimpleProductForDynamicBundledProduct"> |
| 52 | + <argument name="filePath">import_export/export/{$grabNameFile}</argument> |
| 53 | + <argument name="text">$$secondSimpleProductForDynamic.name$$</argument> |
| 54 | + </helper> |
| 55 | + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileContainsString" stepKey="assertExportFileContainsDynamicBundleProduct"> |
| 56 | + <argument name="filePath">import_export/export/{$grabNameFile}</argument> |
| 57 | + <argument name="text">$$createDynamicBundleProduct.name$$</argument> |
| 58 | + </helper> |
| 59 | + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileContainsString" stepKey="assertExportFileContainsDynamicBundleProductOption1"> |
| 60 | + <argument name="filePath">import_export/export/{$grabNameFile}</argument> |
| 61 | + <argument name="text">name=$createFirstBundleOption.option[title]$,type=$createFirstBundleOption.option[type]$,required=$createFirstBundleOption.option[required]$,sku=$$firstSimpleProductForDynamic.sku$$</argument> |
| 62 | + </helper> |
| 63 | + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileContainsString" stepKey="assertExportFileContainsDynamicBundleProductOption2"> |
| 64 | + <argument name="filePath">import_export/export/{$grabNameFile}</argument> |
| 65 | + <argument name="text">name=$createFirstBundleOption.option[title]$,type=$createFirstBundleOption.option[type]$,required=$createFirstBundleOption.option[required]$,sku=$$secondSimpleProductForDynamic.sku$$</argument> |
| 66 | + </helper> |
| 67 | + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileContainsString" stepKey="assertExportFileContainsDynamicPriceBundleProduct"> |
| 68 | + <argument name="filePath">import_export/export/{$grabNameFile}</argument> |
| 69 | + <argument name="text">0.000000,,,,$$createDynamicBundleProduct.sku$$</argument> |
| 70 | + </helper> |
| 71 | + |
| 72 | + <!-- Validate Export File on File System: Fixed Bundle Product --> |
| 73 | + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileContainsString" stepKey="assertExportFileContainsFirstSimpleProductForFixedBundledProduct"> |
| 74 | + <argument name="filePath">import_export/export/{$grabNameFile}</argument> |
| 75 | + <argument name="text">$$firstSimpleProductForFixed.name$$</argument> |
| 76 | + </helper> |
| 77 | + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileContainsString" stepKey="assertExportFileContainsSecondSimpleProductForFixedBundledProduct"> |
| 78 | + <argument name="filePath">import_export/export/{$grabNameFile}</argument> |
| 79 | + <argument name="text">$$secondSimpleProductForFixed.name$$</argument> |
| 80 | + </helper> |
| 81 | + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileContainsString" stepKey="assertExportFileContainsFixedBundleProduct"> |
| 82 | + <argument name="filePath">import_export/export/{$grabNameFile}</argument> |
| 83 | + <argument name="text">$$createFixedBundleProduct.name$$</argument> |
| 84 | + </helper> |
| 85 | + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileContainsString" stepKey="assertExportFileContainsFixedBundleProductOption1"> |
| 86 | + <argument name="filePath">import_export/export/{$grabNameFile}</argument> |
| 87 | + <argument name="text">name=$createSecondBundleOption.option[title]$,type=$createSecondBundleOption.option[type]$,required=$createSecondBundleOption.option[required]$,sku=$$firstSimpleProductForFixed.sku$$</argument> |
| 88 | + </helper> |
| 89 | + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileContainsString" stepKey="assertExportFileContainsFixedBundleProductOption2"> |
| 90 | + <argument name="filePath">import_export/export/{$grabNameFile}</argument> |
| 91 | + <argument name="text">name=$createSecondBundleOption.option[title]$,type=$createSecondBundleOption.option[type]$,required=$createSecondBundleOption.option[required]$,sku=$$secondSimpleProductForFixed.sku$$</argument> |
| 92 | + </helper> |
| 93 | + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileContainsString" stepKey="assertExportFileContainsFixedPriceBundleProduct"> |
| 94 | + <argument name="filePath">import_export/export/{$grabNameFile}</argument> |
| 95 | + <argument name="text">$$createFixedBundleProduct.price$$0000,,,,$$createFixedBundleProduct.sku$$</argument> |
| 96 | + </helper> |
| 97 | + |
| 98 | + <!-- Validate Export File on File System: Fixed Bundle Product with Attribute --> |
| 99 | + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileContainsString" stepKey="assertExportFileContainsFirstSimpleProductForFixedBundledProductWithAttribute"> |
| 100 | + <argument name="filePath">import_export/export/{$grabNameFile}</argument> |
| 101 | + <argument name="text">$$firstSimpleProductForFixedWithAttribute.name$$</argument> |
| 102 | + </helper> |
| 103 | + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileContainsString" stepKey="assertExportFileContainsSecondSimpleProductForFixedBundledProductWithAttribute"> |
| 104 | + <argument name="filePath">import_export/export/{$grabNameFile}</argument> |
| 105 | + <argument name="text">$$secondSimpleProductForFixedWithAttribute.name$$</argument> |
| 106 | + </helper> |
| 107 | + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileContainsString" stepKey="assertExportFileContainsFixedBundleProductWithAttribute"> |
| 108 | + <argument name="filePath">import_export/export/{$grabNameFile}</argument> |
| 109 | + <argument name="text">$$createFixedBundleProductWithAttribute.name$$</argument> |
| 110 | + </helper> |
| 111 | + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileContainsString" stepKey="assertExportFileContainsFixedBundleProductWithAttributeOption1"> |
| 112 | + <argument name="filePath">import_export/export/{$grabNameFile}</argument> |
| 113 | + <argument name="text">name=$createBundleOptionWithAttribute.option[title]$,type=$createBundleOptionWithAttribute.option[type]$,required=$createBundleOptionWithAttribute.option[required]$,sku=$$firstSimpleProductForFixedWithAttribute.sku$$</argument> |
| 114 | + </helper> |
| 115 | + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileContainsString" stepKey="assertExportFileContainsFixedBundleProductWithAttributeOption2"> |
| 116 | + <argument name="filePath">import_export/export/{$grabNameFile}</argument> |
| 117 | + <argument name="text">name=$createBundleOptionWithAttribute.option[title]$,type=$createBundleOptionWithAttribute.option[type]$,required=$createBundleOptionWithAttribute.option[required]$,sku=$$secondSimpleProductForFixedWithAttribute.sku$$</argument> |
| 118 | + </helper> |
| 119 | + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileContainsString" stepKey="assertExportFileContainsFixedPriceBundleProductWithAttribute"> |
| 120 | + <argument name="filePath">import_export/export/{$grabNameFile}</argument> |
| 121 | + <argument name="text">$$createFixedBundleProductWithAttribute.price$$0000,,,,$$createFixedBundleProductWithAttribute.sku$$</argument> |
| 122 | + </helper> |
| 123 | + |
| 124 | + <!-- Delete Export File --> |
| 125 | + <helper class="\Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileDoesNotExist" stepKey="assertExportFileDeleted"> |
| 126 | + <argument name="filePath">import_export/export/{$grabNameFile}</argument> |
| 127 | + </helper> |
| 128 | + </test> |
| 129 | +</tests> |
0 commit comments