-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4548 from magento-tsg/2.3-develop-mftf-pr20
[TSG] MFTF for 2.3 (pr20) (2.3-develop)
- Loading branch information
Showing
18 changed files
with
824 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
...to/Bundle/Test/Mftf/Test/AdminShouldBeAbleToMassUpdateAttributesForBundleProductsTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="AdminShouldBeAbleToMassUpdateAttributesForBundleProductsTest"> | ||
<annotations> | ||
<features value="Bundle"/> | ||
<stories value="Admin list bundle products"/> | ||
<title value="Admin should be able to mass update attributes for bundle products"/> | ||
<description value="Admin should be able to mass update attributes for bundle products"/> | ||
<severity value="CRITICAL"/> | ||
<testCaseId value="MC-219"/> | ||
<group value="bundle"/> | ||
<group value="WYSIWYGDisabled"/> | ||
</annotations> | ||
<before> | ||
<!-- Create Simple Product --> | ||
<createData entity="SimpleProduct2" stepKey="createSimpleProduct"/> | ||
<!-- Create Fixed Bundle Product --> | ||
<createData entity="ApiFixedBundleProduct" stepKey="createFixedBundleProduct"/> | ||
<!-- Create DropDown Bundle Option --> | ||
<createData entity="DropDownBundleOption" stepKey="createBundleOption"> | ||
<requiredEntity createDataKey="createFixedBundleProduct"/> | ||
</createData> | ||
<!-- Link Simple Product --> | ||
<createData entity="ApiBundleLink" stepKey="createNewBundleLink"> | ||
<requiredEntity createDataKey="createFixedBundleProduct"/> | ||
<requiredEntity createDataKey="createBundleOption"/> | ||
<requiredEntity createDataKey="createSimpleProduct"/> | ||
</createData> | ||
</before> | ||
<after> | ||
<!-- Delete Simple Product --> | ||
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> | ||
<!-- Delete Fixed Bundle Product --> | ||
<deleteData createDataKey="createFixedBundleProduct" stepKey="deleteBundleProduct"/> | ||
<!-- Clear Filter --> | ||
<actionGroup ref="ClearProductsFilterActionGroup" stepKey="clearProductFilter"/> | ||
<!--Log Out Admin--> | ||
<actionGroup ref="logout" stepKey="logoutAsAdmin"/> | ||
</after> | ||
<!-- Login as Admin --> | ||
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> | ||
<!-- Go to Catalog -> Catalog -> Products and Search created product in precondition and choose it --> | ||
<actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchProduct"> | ||
<argument name="product" value="$$createFixedBundleProduct$$"/> | ||
</actionGroup> | ||
<!-- Choose "Update attributes" and Change any product data --> | ||
<actionGroup ref="AdminUpdateProductNameAndDescriptionAttributes" stepKey="updateProductAttribute"> | ||
<argument name="product" value="UpdateAttributeNameAndDescription"/> | ||
</actionGroup> | ||
<!--Run cron twice--> | ||
<magentoCLI command="cron:run" stepKey="cronRun"/> | ||
<magentoCLI command="cron:run" stepKey="cronRunTwice"/> | ||
<!-- Search for a product with a new name and Open Product --> | ||
<actionGroup ref="filterProductGridByName" stepKey="searchWithNewProductName"> | ||
<argument name="product" value="UpdateAttributeNameAndDescription"/> | ||
</actionGroup> | ||
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openProductPage"> | ||
<argument name="product" value="$$createFixedBundleProduct$$"/> | ||
</actionGroup> | ||
<!-- Assert product name and description --> | ||
<actionGroup ref="AssertProductNameInProductEditForm" stepKey="assertProductName"> | ||
<argument name="productName" value="{{UpdateAttributeNameAndDescription.name}}"/> | ||
</actionGroup> | ||
<actionGroup ref="AssertProductDescriptionInProductEditForm" stepKey="assertProductDescription"> | ||
<argument name="productDescription" value="{{UpdateAttributeNameAndDescription.description}}"/> | ||
</actionGroup> | ||
</test> | ||
</tests> |
137 changes: 137 additions & 0 deletions
137
...de/Magento/Bundle/Test/Mftf/Test/StorefrontCustomerSearchBundleProductsByKeywordsTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="StorefrontCustomerSearchBundleProductsByKeywordsTest"> | ||
<annotations> | ||
<features value="Bundle"/> | ||
<stories value="Bundle products list on Storefront"/> | ||
<title value="Customer should be able to see search results when searching for bundle products by keyword"/> | ||
<description value="Customer should be able to see search results when searching for bundle products by keyword"/> | ||
<severity value="CRITICAL"/> | ||
<testCaseId value="MC-227"/> | ||
<group value="bundle"/> | ||
</annotations> | ||
<before> | ||
<createData entity="SimpleProductNotVisibleIndividually" stepKey="createSimpleProduct"/> | ||
<createData entity="DynamicBundleProductCustomDescription" stepKey="createDynamicBundle"/> | ||
<createData entity="DropDownBundleOption" stepKey="dynamicBundleOption"> | ||
<requiredEntity createDataKey="createDynamicBundle"/> | ||
</createData> | ||
<createData entity="ApiBundleLink" stepKey="createDynamicBundleLink"> | ||
<requiredEntity createDataKey="createDynamicBundle"/> | ||
<requiredEntity createDataKey="dynamicBundleOption"/> | ||
<requiredEntity createDataKey="createSimpleProduct"/> | ||
</createData> | ||
<createData entity="SimpleProductNotVisibleIndividually" stepKey="createSimpleProductTwo"/> | ||
<createData entity="FixedBundleProductCustomDescription" stepKey="createFixedBundle"/> | ||
<createData entity="DropDownBundleOption" stepKey="fixedBundleOption"> | ||
<requiredEntity createDataKey="createFixedBundle"/> | ||
</createData> | ||
<createData entity="ApiBundleLink" stepKey="createFixedBundleLink"> | ||
<requiredEntity createDataKey="createFixedBundle"/> | ||
<requiredEntity createDataKey="fixedBundleOption"/> | ||
<requiredEntity createDataKey="createSimpleProductTwo"/> | ||
</createData> | ||
<magentoCLI command="indexer:reindex" arguments="cataloginventory_stock catalogsearch_fulltext" stepKey="reindex"/> | ||
</before> | ||
<after> | ||
<deleteData createDataKey="createDynamicBundle" stepKey="deleteDynamicBundleProduct"/> | ||
<deleteData createDataKey="createFixedBundle" stepKey="deleteFixedBundleProduct"/> | ||
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> | ||
<deleteData createDataKey="createSimpleProductTwo" stepKey="createSimpleProductTwo"/> | ||
</after> | ||
<!-- 1. Go to storefront home page --> | ||
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToStorefrontPage"/> | ||
<!-- 2. Fill quick search bar with test values unique for dynamic bundle product and click search --> | ||
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchDynamic"> | ||
<argument name="phrase" value="Dynamic"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontQuickSearchSeeProductByName" stepKey="assertDynamicBundleInSearchResultByDynamic"> | ||
<argument name="productName" value="$createDynamicBundle.name$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontQuickSearchCheckProductNameNotInGrid" stepKey="assertFixedBundleInSearchResultByDynamic"> | ||
<argument name="productName" value="$createFixedBundle.name$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchByDescription"> | ||
<argument name="phrase" value="Dynamicscription"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontQuickSearchSeeProductByName" stepKey="assertDynamicBundleInSearchResultByDescription"> | ||
<argument name="productName" value="$createDynamicBundle.name$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontQuickSearchCheckProductNameNotInGrid" stepKey="dontSeeFixedBundleInSearchResultByDescription"> | ||
<argument name="productName" value="$createFixedBundle.name$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchShortDescription"> | ||
<argument name="phrase" value="Dynamictest"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontQuickSearchSeeProductByName" stepKey="assertDynamicBundleInSearchResultByShortDescription"> | ||
<argument name="productName" value="$createDynamicBundle.name$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontQuickSearchCheckProductNameNotInGrid" stepKey="dontSeeFixedBundleInSearchResultByShortDescription"> | ||
<argument name="productName" value="$createFixedBundle.name$"/> | ||
</actionGroup> | ||
<!-- 3. Fill quick search bar with test values mutual for both products and click search --> | ||
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchTest123"> | ||
<argument name="phrase" value="Test 123"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontQuickSearchSeeProductByName" stepKey="seeDynamicBundleByTest123"> | ||
<argument name="productName" value="$createDynamicBundle.name$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontQuickSearchSeeProductByName" stepKey="seeFixedBundleByTest123"> | ||
<argument name="productName" value="$createFixedBundle.name$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchTesting321"> | ||
<argument name="phrase" value="Testing 321"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontQuickSearchSeeProductByName" stepKey="seeDynamicBundleByTesting321"> | ||
<argument name="productName" value="$createDynamicBundle.name$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontQuickSearchSeeProductByName" stepKey="seeFixedBundleByTesting321"> | ||
<argument name="productName" value="$createFixedBundle.name$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchShort555"> | ||
<argument name="phrase" value="Short 555"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontQuickSearchSeeProductByName" stepKey="seeDynamicBundleByShort555"> | ||
<argument name="productName" value="$createDynamicBundle.name$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontQuickSearchSeeProductByName" stepKey="seeFixedBundleByShort555"> | ||
<argument name="productName" value="$createFixedBundle.name$"/> | ||
</actionGroup> | ||
<!-- 4. Fill quick search bar with test values unique for fixed bundle product and click search --> | ||
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchByFixed"> | ||
<argument name="phrase" value="Fixed"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontQuickSearchSeeProductByName" stepKey="seeFixedBundleByFixed"> | ||
<argument name="productName" value="$createFixedBundle.name$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontQuickSearchCheckProductNameNotInGrid" stepKey="dontSeeDynamicBundleByFixed"> | ||
<argument name="productName" value="$createDynamicBundle.name$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchByDescriptionForFixed"> | ||
<argument name="phrase" value="Fixedscription"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontQuickSearchSeeProductByName" stepKey="seeFixedBundleByDescriptionForFixed"> | ||
<argument name="productName" value="$createFixedBundle.name$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontQuickSearchCheckProductNameNotInGrid" stepKey="dontSeeDynamicProductByDescriptionForFixed"> | ||
<argument name="productName" value="$createDynamicBundle.name$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchByShortDescriptionForFixed"> | ||
<argument name="phrase" value="Fixedtest"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontQuickSearchSeeProductByName" stepKey="seeFixedBundleByShortDescriptionForFixed"> | ||
<argument name="productName" value="$createFixedBundle.name$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontQuickSearchCheckProductNameNotInGrid" stepKey="dontSeeDynamicBundleByShortDescriptionForFixed"> | ||
<argument name="productName" value="$createDynamicBundle.name$"/> | ||
</actionGroup> | ||
</test> | ||
</tests> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductAttributeMassUpdateActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<!-- Update Product Name and Description attribute --> | ||
<actionGroup name="AdminUpdateProductNameAndDescriptionAttributes"> | ||
<arguments> | ||
<argument name="product"/> | ||
</arguments> | ||
<click selector="{{AdminProductGridSection.productGridCheckboxOnRow('1')}}" stepKey="clickCheckbox"/> | ||
<click selector="{{AdminProductGridSection.bulkActionDropdown}}" stepKey="clickDropdown"/> | ||
<click selector="{{AdminProductGridSection.bulkActionOption('Update attributes')}}" stepKey="clickOption"/> | ||
<waitForPageLoad stepKey="waitForUploadPage"/> | ||
<seeInCurrentUrl url="{{ProductAttributesEditPage.url}}" stepKey="seeAttributePageEditUrl"/> | ||
<click selector="{{AdminUpdateAttributesSection.toggleName}}" stepKey="clickToChangeName"/> | ||
<fillField selector="{{AdminUpdateAttributesSection.name}}" userInput="{{product.name}}" stepKey="fillFieldName"/> | ||
<click selector="{{AdminUpdateAttributesSection.toggleDescription}}" stepKey="clickToChangeDescription"/> | ||
<fillField selector="{{AdminUpdateAttributesSection.description}}" userInput="{{product.description}}" stepKey="fillFieldDescription"/> | ||
<click selector="{{AdminUpdateAttributesSection.saveButton}}" stepKey="save"/> | ||
<waitForElementVisible selector="{{AdminMessagesSection.successMessage}}" stepKey="waitVisibleSuccessMessage"/> | ||
<see selector="{{AdminMessagesSection.successMessage}}" userInput="Message is added to queue" stepKey="seeSuccessMessage"/> | ||
</actionGroup> | ||
</actionGroups> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.