-
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 remote-tracking branch 'origin/2.4-develop' into refactor/mftf-…
…customer
- Loading branch information
Showing
32 changed files
with
769 additions
and
171 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
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
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
19 changes: 19 additions & 0 deletions
19
...code/Magento/Catalog/Test/Mftf/ActionGroup/AdminExpandProductAttributesTabActionGroup.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,19 @@ | ||
<?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"> | ||
<actionGroup name="AdminExpandProductAttributesTabActionGroup"> | ||
<annotations> | ||
<description>Expands the 'Attributes' tab on the Admin Product page.</description> | ||
</annotations> | ||
|
||
<scrollTo selector="{{AdminProductAttributeSection.attributeSectionHeader}}" stepKey="scrollToAttributesTab"/> | ||
<conditionalClick selector="{{AdminProductAttributeSection.attributeSectionHeader}}" dependentSelector="{{AdminProductAttributeSection.attributeSection}}" visible="false" stepKey="expandAttributesTab"/> | ||
</actionGroup> | ||
</actionGroups> |
26 changes: 26 additions & 0 deletions
26
...Mftf/ActionGroup/AssertStorefrontAttributeOptionPresentInLayeredNavigationActionGroup.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,26 @@ | ||
<?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"> | ||
<actionGroup name="AssertStorefrontAttributeOptionPresentInLayeredNavigationActionGroup"> | ||
<annotations> | ||
<description>Clicks on the attribute label. Checks for attribute option presence.</description> | ||
</annotations> | ||
<arguments> | ||
<argument name="attributeLabel" type="string" defaultValue="{{ProductAttributeFrontendLabel.label}}"/> | ||
<argument name="attributeOptionLabel" type="string" defaultValue="{{Option1Store0.label}}"/> | ||
<argument name="attributeOptionPosition" type="string" defaultValue="1"/> | ||
</arguments> | ||
|
||
<waitForElementVisible selector="{{StorefrontCategorySidebarSection.filterOptionsTitle(attributeLabel)}}" stepKey="waitForAttributeVisible"/> | ||
<conditionalClick selector="{{StorefrontCategorySidebarSection.filterOptionsTitle(attributeLabel)}}" dependentSelector="{{StorefrontCategorySidebarSection.activeFilterOptions}}" visible="false" stepKey="clickToExpandAttribute"/> | ||
<waitForElementVisible selector="{{StorefrontCategorySidebarSection.activeFilterOptions}}" stepKey="waitForAttributeOptionsVisible"/> | ||
<see selector="{{StorefrontCategorySidebarSection.activeFilterOptionItemByPosition(attributeOptionPosition)}}" userInput="{{attributeOptionLabel}}" stepKey="assertAttributeOptionInLayeredNavigation"/> | ||
</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
91 changes: 91 additions & 0 deletions
91
...de/Magento/Catalog/Test/Mftf/Test/AdminCheckCustomAttributeValuesAfterProductSaveTest.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,91 @@ | ||
<?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="AdminCheckCustomAttributeValuesAfterProductSaveTest"> | ||
<annotations> | ||
<features value="Catalog"/> | ||
<stories value="Product attributes"/> | ||
<title value="Saving custom attribute values using UI"/> | ||
<description value="Checks that saved custom attribute values are reflected on the product's edit page"/> | ||
<severity value="MAJOR"/> | ||
<testCaseId value="MC-29653"/> | ||
<useCaseId value="MC-29023"/> | ||
<group value="catalog"/> | ||
</annotations> | ||
<before> | ||
<!-- Create multi select product attribute --> | ||
<createData entity="productAttributeMultiselectTwoOptions" stepKey="createMultiSelectProductAttribute"/> | ||
<!-- Add options to created product attribute --> | ||
<createData entity="productAttributeOption1" stepKey="addFirstOptionToAttribute"> | ||
<requiredEntity createDataKey="createMultiSelectProductAttribute"/> | ||
</createData> | ||
<createData entity="productAttributeOption2" stepKey="addSecondOptionToAttribute"> | ||
<requiredEntity createDataKey="createMultiSelectProductAttribute"/> | ||
</createData> | ||
<createData entity="productAttributeOption3" stepKey="addThirdOptionToAttribute"> | ||
<requiredEntity createDataKey="createMultiSelectProductAttribute"/> | ||
</createData> | ||
<!-- Create simple product --> | ||
<createData entity="SimpleProduct2" stepKey="createSimpleProduct"/> | ||
<magentoCLI command="indexer:reindex" arguments="catalogsearch_fulltext" stepKey="reindexCatalogSearch"/> | ||
<!-- Login to Admin page --> | ||
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> | ||
</before> | ||
<after> | ||
<!-- Delete created entities --> | ||
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> | ||
<deleteData createDataKey="createMultiSelectProductAttribute" stepKey="deleteMultiSelectProductAttribute"/> | ||
<!-- Logout from Admin page --> | ||
<actionGroup ref="logout" stepKey="logoutFromAdmin"/> | ||
</after> | ||
|
||
<!-- Open created product for edit --> | ||
<amOnPage url="{{AdminProductEditPage.url($createSimpleProduct.id$)}}" stepKey="goToProductEditPage"/> | ||
<waitForPageLoad stepKey="waitForProductPageLoad"/> | ||
|
||
<!-- Add created attribute to the product --> | ||
<actionGroup ref="AddProductAttributeInProductModalActionGroup" stepKey="addAttributeToProduct"> | ||
<argument name="attributeCode" value="$createMultiSelectProductAttribute.attribute_code$"/> | ||
</actionGroup> | ||
<waitForPageLoad stepKey="waitForAttributeAdded"/> | ||
|
||
<!-- Expand 'Attributes' tab --> | ||
<actionGroup ref="AdminExpandProductAttributesTabActionGroup" stepKey="expandAttributesTab"/> | ||
<!-- Check created attribute presents in the 'Attributes' tab --> | ||
<seeElement selector="{{AdminProductAttributesSection.attributeDropdownByCode($createMultiSelectProductAttribute.attribute_code$)}}" stepKey="assertAttributeIsPresentInTab"/> | ||
<!-- Select attribute options --> | ||
<selectOption selector="{{AdminProductAttributesSection.attributeDropdownByCode($createMultiSelectProductAttribute.attribute_code$)}}" parameterArray="[$addFirstOptionToAttribute.option[store_labels][0][label]$, $addThirdOptionToAttribute.option[store_labels][0][label]$]" stepKey="selectAttributeOptions"/> | ||
<!-- Save product --> | ||
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductForm"/> | ||
|
||
<!-- Check attribute options are selected --> | ||
<actionGroup ref="AdminExpandProductAttributesTabActionGroup" stepKey="expandAttributesTabAfterProductSave"/> | ||
<seeOptionIsSelected selector="{{AdminProductAttributesSection.attributeDropdownByCode($createMultiSelectProductAttribute.attribute_code$)}}" userInput="$addFirstOptionToAttribute.option[store_labels][0][label]$" stepKey="assertFirstOptionIsSelected"/> | ||
<seeOptionIsSelected selector="{{AdminProductAttributesSection.attributeDropdownByCode($createMultiSelectProductAttribute.attribute_code$)}}" userInput="$addThirdOptionToAttribute.option[store_labels][0][label]$" stepKey="assertThirdOptionIsSelected"/> | ||
|
||
<!-- Search for the product on Storefront --> | ||
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToHomePage"/> | ||
<waitForPageLoad stepKey="waitForHomePageLoad"/> | ||
<actionGroup ref="StorefrontCheckQuickSearchActionGroup" stepKey="searchProductOnStorefront"> | ||
<argument name="phrase" value="$createSimpleProduct.name$"/> | ||
</actionGroup> | ||
|
||
<!-- Assert that attribute values present in layered navigation --> | ||
<actionGroup ref="AssertStorefrontAttributeOptionPresentInLayeredNavigationActionGroup" stepKey="assertFirstAttributeOptionPresence"> | ||
<argument name="attributeLabel" value="$createMultiSelectProductAttribute.attribute[frontend_labels][0][label]$"/> | ||
<argument name="attributeOptionLabel" value="$addFirstOptionToAttribute.option[store_labels][0][label]$"/> | ||
<argument name="attributeOptionPosition" value="1"/> | ||
</actionGroup> | ||
<actionGroup ref="AssertStorefrontAttributeOptionPresentInLayeredNavigationActionGroup" stepKey="assertThirdAttributeOptionPresence"> | ||
<argument name="attributeLabel" value="$createMultiSelectProductAttribute.attribute[frontend_labels][0][label]$"/> | ||
<argument name="attributeOptionLabel" value="$addThirdOptionToAttribute.option[store_labels][0][label]$"/> | ||
<argument name="attributeOptionPosition" value="2"/> | ||
</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
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
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
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
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
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
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.