Skip to content

Commit 65b5f94

Browse files
author
Mariana Lashch
committed
Merge branch '2.3-develop' of github.com:magento/magento2ce into port-1101
2 parents 70972b0 + 470fd45 commit 65b5f94

File tree

22 files changed

+593
-21
lines changed

22 files changed

+593
-21
lines changed
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
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="AdminAttributeTextSwatchesCanBeFiledTest">
12+
<annotations>
13+
<features value="Backend"/>
14+
<stories value="Unable to add more attributes in size"/>
15+
<title value="Check that attribute text swatches can be filed"/>
16+
<description value="Check that attribute text swatches can be filed"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MAGETWO-96710"/>
19+
<useCaseId value="MAGETWO-96409"/>
20+
<group value="backend"/>
21+
<group value="ui"/>
22+
</annotations>
23+
<before>
24+
25+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
26+
27+
</before>
28+
<after>
29+
<!-- Delete all 10 store views -->
30+
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView1">
31+
<argument name="customStore" value="customStore"/>
32+
</actionGroup>
33+
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView2">
34+
<argument name="customStore" value="NewStoreViewData"/>
35+
</actionGroup>
36+
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView3">
37+
<argument name="customStore" value="storeViewData"/>
38+
</actionGroup>
39+
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView4">
40+
<argument name="customStore" value="storeViewData1"/>
41+
</actionGroup>
42+
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView5">
43+
<argument name="customStore" value="storeViewData2"/>
44+
</actionGroup>
45+
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView6">
46+
<argument name="customStore" value="storeViewData3"/>
47+
</actionGroup>
48+
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView7">
49+
<argument name="customStore" value="storeViewData4"/>
50+
</actionGroup>
51+
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView8">
52+
<argument name="customStore" value="storeViewData5"/>
53+
</actionGroup>
54+
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView9">
55+
<argument name="customStore" value="storeViewData6"/>
56+
</actionGroup>
57+
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView10">
58+
<argument name="customStore" value="storeViewData7"/>
59+
</actionGroup>
60+
61+
<actionGroup ref="logout" stepKey="logout"/>
62+
</after>
63+
64+
<!-- Create 10 store views -->
65+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView1">
66+
<argument name="customStore" value="customStore"/>
67+
</actionGroup>
68+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView2">
69+
<argument name="customStore" value="NewStoreViewData"/>
70+
</actionGroup>
71+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView3">
72+
<argument name="customStore" value="storeViewData"/>
73+
</actionGroup>
74+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView4">
75+
<argument name="customStore" value="storeViewData1"/>
76+
</actionGroup>
77+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView5">
78+
<argument name="customStore" value="storeViewData2"/>
79+
</actionGroup>
80+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView6">
81+
<argument name="customStore" value="storeViewData3"/>
82+
</actionGroup>
83+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView7">
84+
<argument name="customStore" value="storeViewData4"/>
85+
</actionGroup>
86+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView8">
87+
<argument name="customStore" value="storeViewData5"/>
88+
</actionGroup>
89+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView9">
90+
<argument name="customStore" value="storeViewData6"/>
91+
</actionGroup>
92+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView10">
93+
<argument name="customStore" value="storeViewData7"/>
94+
</actionGroup>
95+
96+
<!--Navigate to Product attribute page-->
97+
<amOnPage url="{{ProductAttributePage.url}}" stepKey="navigateToNewProductAttributePage"/>
98+
<waitForPageLoad stepKey="waitForPageLoad"/>
99+
<fillField userInput="test_label" selector="{{AttributePropertiesSection.DefaultLabel}}" stepKey="fillDefaultLabel"/>
100+
<selectOption selector="{{AttributePropertiesSection.InputType}}" userInput="Text Swatch" stepKey="selectInputType"/>
101+
<click selector="{{AttributePropertiesSection.addSwatch}}" stepKey="clickAddSwatch"/>
102+
<waitForAjaxLoad stepKey="waitForAjaxLoad"/>
103+
104+
<!-- Fill Swatch and Description fields for Admin -->
105+
<fillField selector="{{AttributeManageSwatchSection.swatchField('Admin')}}" userInput="test" stepKey="fillSwatchForAdmin"/>
106+
<fillField selector="{{AttributeManageSwatchSection.descriptionField('Admin')}}" userInput="test" stepKey="fillDescriptionForAdmin"/>
107+
108+
<!-- Grab value Swatch and Description fields for Admin -->
109+
<grabValueFrom selector="{{AttributeManageSwatchSection.swatchField('Admin')}}" stepKey="grabSwatchForAdmin"/>
110+
<grabValueFrom selector="{{AttributeManageSwatchSection.descriptionField('Admin')}}" stepKey="grabDescriptionForAdmin"/>
111+
112+
<!-- Check that Swatch and Description fields for Admin are not empty-->
113+
<assertNotEmpty actual="$grabSwatchForAdmin" stepKey="checkSwatchFieldForAdmin"/>
114+
<assertNotEmpty actual="$grabDescriptionForAdmin" stepKey="checkDescriptionFieldForAdmin"/>
115+
</test>
116+
</tests>

app/code/Magento/Catalog/Test/Mftf/Section/AdminCreateProductAttributeSection.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
<element name="TinyMCE4" type="button" selector="//span[text()='Default Value']/parent::label/following-sibling::div//div[@class='mce-branding-powered-by']"/>
2323
<element name="checkIfTabOpen" selector="//div[@id='advanced_fieldset-wrapper' and not(contains(@class,'opened'))]" type="button"/>
2424
<element name="useInLayeredNavigation" type="select" selector="#is_filterable"/>
25+
<element name="addSwatch" type="button" selector="#add_new_swatch_text_option_button"/>
26+
</section>
27+
<section name="AttributeManageSwatchSection">
28+
<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"/>
29+
<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"/>
2530
</section>
2631
<section name="AttributeOptionsSection">
2732
<element name="AddOption" type="button" selector="#add_new_option_button"/>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="EnableAdminAccountAllowCountry" type="admin_account_country_options_config">
12+
<requiredEntity type="admin_account_country_options_value">AdminAccountAllowCountryUS</requiredEntity>
13+
</entity>
14+
<entity name="AdminAccountAllowCountryUS" type="admin_account_country_options_value">
15+
<data key="value">US</data>
16+
</entity>
17+
18+
<entity name="DisableAdminAccountAllowCountry" type="default_admin_account_country_options_config">
19+
<requiredEntity type="checkoutTotalFlagZero">DefaultAdminAccountAllowCountry</requiredEntity>
20+
</entity>
21+
<entity name="DefaultAdminAccountAllowCountry" type="checkoutTotalFlagZero">
22+
<data key="value">0</data>
23+
</entity>
24+
</entities>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataOperation.xsd">
10+
<operation name="AdminAccountCountryOptionConfig" dataType="admin_account_country_options_config" type="create" auth="adminFormKey" url="/admin/system_config/save/section/general/" method="POST">
11+
<object key="groups" dataType="admin_account_country_options_config">
12+
<object key="country" dataType="admin_account_country_options_config">
13+
<object key="fields" dataType="admin_account_country_options_config">
14+
<object key="allow" dataType="admin_account_country_options_value">
15+
<field key="value">string</field>
16+
</object>
17+
</object>
18+
</object>
19+
</object>
20+
</operation>
21+
22+
<operation name="DefaultAdminAccountCountryOptionConfig" dataType="default_admin_account_country_options_config" type="create" auth="adminFormKey" url="/admin/system_config/save/section/general/" method="POST">
23+
<object key="groups" dataType="default_admin_account_country_options_config">
24+
<object key="country" dataType="default_admin_account_country_options_config">
25+
<object key="fields" dataType="default_admin_account_country_options_config">
26+
<object key="allow" dataType="default_admin_account_country_options_config">
27+
<object key="inherit" dataType="checkoutTotalFlagZero">
28+
<field key="value">string</field>
29+
</object>
30+
</object>
31+
</object>
32+
</object>
33+
</object>
34+
</operation>
35+
</operations>
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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="CheckingCountryDropDownWithOneAllowedCountryTest">
12+
<annotations>
13+
<features value="Config"/>
14+
<stories value="MAGETWO-96107: Additional blank option in country dropdown"/>
15+
<title value="Checking country drop-down with one allowed country"/>
16+
<description value="Check country drop-down with one allowed country"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MAGETWO-96133"/>
19+
<group value="configuration"/>
20+
</annotations>
21+
<before>
22+
<createData entity="EnableAdminAccountAllowCountry" stepKey="setAllowedCountries"/>
23+
</before>
24+
<after>
25+
<createData entity="DisableAdminAccountAllowCountry" stepKey="setDefaultValueForAllowCountries"/>
26+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
27+
<actionGroup ref="AdminDeleteCustomerActionGroup" stepKey="deleteCustomer">
28+
<argument name="customerEmail" value="CustomerEntityOne.email"/>
29+
</actionGroup>
30+
<actionGroup ref="AdminClearCustomersFiltersActionGroup" stepKey="clearFilters"/>
31+
<waitForPageLoad stepKey="WaitForPageToLoad"/>
32+
<actionGroup ref="logout" stepKey="logout"/>
33+
</after>
34+
<!--Flush Magento Cache-->
35+
<magentoCLI stepKey="flushCache" command="cache:flush"/>
36+
<!--Create a customer account from Storefront-->
37+
<actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="createAnAccount">
38+
<argument name="Customer" value="CustomerEntityOne"/>
39+
</actionGroup>
40+
<click selector="{{CheckoutPaymentSection.addressBook}}" stepKey="goToAddressBook"/>
41+
<click selector="{{StorefrontCustomerAddressSection.country}}" stepKey="clickToExpandCountryDropDown"/>
42+
<see selector="{{StorefrontCustomerAddressSection.country}}" userInput="United States" stepKey="seeSelectedCountry"/>
43+
<dontSee selector="{{StorefrontCustomerAddressSection.country}}" userInput="Brazil" stepKey="canNotSeeSelectedCountry"/>
44+
</test>
45+
</tests>

app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminChooseAffectedAttributeSetSection.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminChooseAffectedAttributeSetPopup">
1212
<element name="confirm" type="button" selector="button[data-index='confirm_button']" timeout="30"/>
13+
<element name="closePopUp" type="button" selector="//*[contains(@class,'product_form_product_form_configurable_attribute_set')]//button[@data-role='closeBtn']" timeout="30"/>
1314
</section>
14-
</sections>
15+
</sections>

app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminProductFormConfigurationsSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
<element name="removeProductBtn" type="button" selector="//a[text()='Remove Product']"/>
2323
<element name="disableProductBtn" type="button" selector="//a[text()='Disable Product']"/>
2424
<element name="enableProductBtn" type="button" selector="//a[text()='Enable Product']"/>
25+
<element name="confProductSku" type="input" selector="//*[@name='configurable-matrix[{{arg}}][sku]']" parameterized="true"/>
26+
<element name="confProductSkuMessage" type="text" selector="//*[@name='configurable-matrix[{{arg}}][sku]']/following-sibling::label" parameterized="true"/>
2527
<element name="variationsSkuInputByRow" selector="[data-index='configurable-matrix'] table > tbody > tr:nth-of-type({{row}}) input[name*='sku']" type="input" parameterized="true"/>
2628
<element name="variationsSkuInputErrorByRow" selector="[data-index='configurable-matrix'] table > tbody > tr:nth-of-type({{row}}) .admin__field-error" type="text" parameterized="true"/>
2729
</section>

0 commit comments

Comments
 (0)