Skip to content

Commit

Permalink
Merge pull request #3617 from magento-epam/EPAM-PR-28
Browse files Browse the repository at this point in the history
Fixed issues:
MAGETWO-95834 Unable to create Configurations for Configurable Products
MAGETWO-95837 Product is added to Wish List with Attributes selected however they were unselected on PDP before
MAGETWO-96107 Additional blank option in country dropdown
MAGETWO-96409 [2.3.x] [MAGENTO CLOUD] Unable to add more attributes in size
MAGETWO-91640 Scheduled Import of Products fails on error when errors should be skipped
MAGETWO-96413 Restricted Admin User Backend Order Creation Issue With B2B
MAGETWO-96428 [2.3.x] App:config:dump doesn't lock all the settings in Magento backend
  • Loading branch information
rganin authored Jan 23, 2019
2 parents 2f30dde + 5abd592 commit 470fd45
Show file tree
Hide file tree
Showing 22 changed files with 593 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<?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="AdminAttributeTextSwatchesCanBeFiledTest">
<annotations>
<features value="Backend"/>
<stories value="Unable to add more attributes in size"/>
<title value="Check that attribute text swatches can be filed"/>
<description value="Check that attribute text swatches can be filed"/>
<severity value="MAJOR"/>
<testCaseId value="MAGETWO-96710"/>
<useCaseId value="MAGETWO-96409"/>
<group value="backend"/>
<group value="ui"/>
</annotations>
<before>

<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>

</before>
<after>
<!-- Delete all 10 store views -->
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView1">
<argument name="customStore" value="customStore"/>
</actionGroup>
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView2">
<argument name="customStore" value="NewStoreViewData"/>
</actionGroup>
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView3">
<argument name="customStore" value="storeViewData"/>
</actionGroup>
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView4">
<argument name="customStore" value="storeViewData1"/>
</actionGroup>
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView5">
<argument name="customStore" value="storeViewData2"/>
</actionGroup>
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView6">
<argument name="customStore" value="storeViewData3"/>
</actionGroup>
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView7">
<argument name="customStore" value="storeViewData4"/>
</actionGroup>
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView8">
<argument name="customStore" value="storeViewData5"/>
</actionGroup>
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView9">
<argument name="customStore" value="storeViewData6"/>
</actionGroup>
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView10">
<argument name="customStore" value="storeViewData7"/>
</actionGroup>

<actionGroup ref="logout" stepKey="logout"/>
</after>

<!-- Create 10 store views -->
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView1">
<argument name="customStore" value="customStore"/>
</actionGroup>
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView2">
<argument name="customStore" value="NewStoreViewData"/>
</actionGroup>
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView3">
<argument name="customStore" value="storeViewData"/>
</actionGroup>
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView4">
<argument name="customStore" value="storeViewData1"/>
</actionGroup>
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView5">
<argument name="customStore" value="storeViewData2"/>
</actionGroup>
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView6">
<argument name="customStore" value="storeViewData3"/>
</actionGroup>
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView7">
<argument name="customStore" value="storeViewData4"/>
</actionGroup>
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView8">
<argument name="customStore" value="storeViewData5"/>
</actionGroup>
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView9">
<argument name="customStore" value="storeViewData6"/>
</actionGroup>
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView10">
<argument name="customStore" value="storeViewData7"/>
</actionGroup>

<!--Navigate to Product attribute page-->
<amOnPage url="{{ProductAttributePage.url}}" stepKey="navigateToNewProductAttributePage"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
<fillField userInput="test_label" selector="{{AttributePropertiesSection.DefaultLabel}}" stepKey="fillDefaultLabel"/>
<selectOption selector="{{AttributePropertiesSection.InputType}}" userInput="Text Swatch" stepKey="selectInputType"/>
<click selector="{{AttributePropertiesSection.addSwatch}}" stepKey="clickAddSwatch"/>
<waitForAjaxLoad stepKey="waitForAjaxLoad"/>

<!-- Fill Swatch and Description fields for Admin -->
<fillField selector="{{AttributeManageSwatchSection.swatchField('Admin')}}" userInput="test" stepKey="fillSwatchForAdmin"/>
<fillField selector="{{AttributeManageSwatchSection.descriptionField('Admin')}}" userInput="test" stepKey="fillDescriptionForAdmin"/>

<!-- Grab value Swatch and Description fields for Admin -->
<grabValueFrom selector="{{AttributeManageSwatchSection.swatchField('Admin')}}" stepKey="grabSwatchForAdmin"/>
<grabValueFrom selector="{{AttributeManageSwatchSection.descriptionField('Admin')}}" stepKey="grabDescriptionForAdmin"/>

<!-- Check that Swatch and Description fields for Admin are not empty-->
<assertNotEmpty actual="$grabSwatchForAdmin" stepKey="checkSwatchFieldForAdmin"/>
<assertNotEmpty actual="$grabDescriptionForAdmin" stepKey="checkDescriptionFieldForAdmin"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
<element name="TinyMCE4" type="button" selector="//span[text()='Default Value']/parent::label/following-sibling::div//div[@class='mce-branding-powered-by']"/>
<element name="checkIfTabOpen" selector="//div[@id='advanced_fieldset-wrapper' and not(contains(@class,'opened'))]" type="button"/>
<element name="useInLayeredNavigation" type="select" selector="#is_filterable"/>
<element name="addSwatch" type="button" selector="#add_new_swatch_text_option_button"/>
</section>
<section name="AttributeManageSwatchSection">
<element name="swatchField" type="input" selector="//th[contains(@class, 'col-swatch')]/span[contains(text(), '{{arg}}')]/ancestor::thead/following-sibling::tbody//input[@placeholder='Swatch']" parameterized="true"/>
<element name="descriptionField" type="input" selector="//th[contains(@class, 'col-swatch')]/span[contains(text(), '{{arg}}')]/ancestor::thead/following-sibling::tbody//input[@placeholder='Description']" parameterized="true"/>
</section>
<section name="AttributeOptionsSection">
<element name="AddOption" type="button" selector="#add_new_option_button"/>
Expand Down
24 changes: 24 additions & 0 deletions app/code/Magento/Config/Test/Mftf/Data/CountryOptionConfigData.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
<entity name="EnableAdminAccountAllowCountry" type="admin_account_country_options_config">
<requiredEntity type="admin_account_country_options_value">AdminAccountAllowCountryUS</requiredEntity>
</entity>
<entity name="AdminAccountAllowCountryUS" type="admin_account_country_options_value">
<data key="value">US</data>
</entity>

<entity name="DisableAdminAccountAllowCountry" type="default_admin_account_country_options_config">
<requiredEntity type="checkoutTotalFlagZero">DefaultAdminAccountAllowCountry</requiredEntity>
</entity>
<entity name="DefaultAdminAccountAllowCountry" type="checkoutTotalFlagZero">
<data key="value">0</data>
</entity>
</entities>
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataOperation.xsd">
<operation name="AdminAccountCountryOptionConfig" dataType="admin_account_country_options_config" type="create" auth="adminFormKey" url="/admin/system_config/save/section/general/" method="POST">
<object key="groups" dataType="admin_account_country_options_config">
<object key="country" dataType="admin_account_country_options_config">
<object key="fields" dataType="admin_account_country_options_config">
<object key="allow" dataType="admin_account_country_options_value">
<field key="value">string</field>
</object>
</object>
</object>
</object>
</operation>

<operation name="DefaultAdminAccountCountryOptionConfig" dataType="default_admin_account_country_options_config" type="create" auth="adminFormKey" url="/admin/system_config/save/section/general/" method="POST">
<object key="groups" dataType="default_admin_account_country_options_config">
<object key="country" dataType="default_admin_account_country_options_config">
<object key="fields" dataType="default_admin_account_country_options_config">
<object key="allow" dataType="default_admin_account_country_options_config">
<object key="inherit" dataType="checkoutTotalFlagZero">
<field key="value">string</field>
</object>
</object>
</object>
</object>
</object>
</operation>
</operations>
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?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="CheckingCountryDropDownWithOneAllowedCountryTest">
<annotations>
<features value="Config"/>
<stories value="MAGETWO-96107: Additional blank option in country dropdown"/>
<title value="Checking country drop-down with one allowed country"/>
<description value="Check country drop-down with one allowed country"/>
<severity value="MAJOR"/>
<testCaseId value="MAGETWO-96133"/>
<group value="configuration"/>
</annotations>
<before>
<createData entity="EnableAdminAccountAllowCountry" stepKey="setAllowedCountries"/>
</before>
<after>
<createData entity="DisableAdminAccountAllowCountry" stepKey="setDefaultValueForAllowCountries"/>
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
<actionGroup ref="AdminDeleteCustomerActionGroup" stepKey="deleteCustomer">
<argument name="customerEmail" value="CustomerEntityOne.email"/>
</actionGroup>
<actionGroup ref="AdminClearCustomersFiltersActionGroup" stepKey="clearFilters"/>
<waitForPageLoad stepKey="WaitForPageToLoad"/>
<actionGroup ref="logout" stepKey="logout"/>
</after>
<!--Flush Magento Cache-->
<magentoCLI stepKey="flushCache" command="cache:flush"/>
<!--Create a customer account from Storefront-->
<actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="createAnAccount">
<argument name="Customer" value="CustomerEntityOne"/>
</actionGroup>
<click selector="{{CheckoutPaymentSection.addressBook}}" stepKey="goToAddressBook"/>
<click selector="{{StorefrontCustomerAddressSection.country}}" stepKey="clickToExpandCountryDropDown"/>
<see selector="{{StorefrontCustomerAddressSection.country}}" userInput="United States" stepKey="seeSelectedCountry"/>
<dontSee selector="{{StorefrontCustomerAddressSection.country}}" userInput="Brazil" stepKey="canNotSeeSelectedCountry"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="AdminChooseAffectedAttributeSetPopup">
<element name="confirm" type="button" selector="button[data-index='confirm_button']" timeout="30"/>
<element name="closePopUp" type="button" selector="//*[contains(@class,'product_form_product_form_configurable_attribute_set')]//button[@data-role='closeBtn']" timeout="30"/>
</section>
</sections>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
<element name="removeProductBtn" type="button" selector="//a[text()='Remove Product']"/>
<element name="disableProductBtn" type="button" selector="//a[text()='Disable Product']"/>
<element name="enableProductBtn" type="button" selector="//a[text()='Enable Product']"/>
<element name="confProductSku" type="input" selector="//*[@name='configurable-matrix[{{arg}}][sku]']" parameterized="true"/>
<element name="confProductSkuMessage" type="text" selector="//*[@name='configurable-matrix[{{arg}}][sku]']/following-sibling::label" parameterized="true"/>
<element name="variationsSkuInputByRow" selector="[data-index='configurable-matrix'] table > tbody > tr:nth-of-type({{row}}) input[name*='sku']" type="input" parameterized="true"/>
<element name="variationsSkuInputErrorByRow" selector="[data-index='configurable-matrix'] table > tbody > tr:nth-of-type({{row}}) .admin__field-error" type="text" parameterized="true"/>
</section>
Expand Down
Loading

0 comments on commit 470fd45

Please sign in to comment.