Skip to content

Commit 1379393

Browse files
Merge branch '2.4-develop' into comm_78764_25677
2 parents f9926ca + b053b83 commit 1379393

File tree

78 files changed

+2358
-17
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+2358
-17
lines changed

app/code/Magento/Backend/Test/Mftf/Test/AdminCheckDashboardWithChartsTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<group value="pr_exclude"/>
2222
</annotations>
2323
<before>
24+
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
2425
<magentoCLI command="config:set admin/dashboard/enable_charts 1" stepKey="setEnableCharts"/>
2526
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
2627
<argument name="tags" value="config full_page"/>
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
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="AdminVerifyStateProvinceRequiredOnAddingNewAddressPageTest">
12+
<annotations>
13+
<features value="Backend"/>
14+
<stories value="Verification of required fields on new address page test"/>
15+
<title value="Admin verifies State/Province should be required fields on add new address page test"/>
16+
<description value="Admin verifies State/Province should be required fields on add new address page test"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="AC-3912"/>
19+
<group value="configuration"/>
20+
</annotations>
21+
<before>
22+
<!-- Set locale options to United Kingdom-->
23+
<magentoCLI stepKey="localeUK" command="config:set general/locale/code en_GB"/>
24+
<!-- Deploy static content with United Kingdom locale-->
25+
<magentoCLI command="setup:static-content:deploy en_GB" stepKey="deployStaticContentWithUnitedKingdomLocale"/>
26+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
27+
</before>
28+
<after>
29+
<!-- Set locale options to en_US-->
30+
<magentoCLI stepKey="localeUS" command="config:set general/locale/code en_US"/>
31+
<!-- Change Admin locale to default -->
32+
<actionGroup ref="SetAdminAccountActionGroup" stepKey="setAdminAccountToUnitedStates">
33+
<argument name="InterfaceLocaleByValue" value="en_US" />
34+
</actionGroup>
35+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
36+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
37+
<argument name="indices" value=""/>
38+
</actionGroup>
39+
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
40+
<argument name="tags" value=""/>
41+
</actionGroup>
42+
</after>
43+
44+
<!-- Open Admin Store Configuration Page -->
45+
<actionGroup ref="AdminOpenStoreConfigPageActionGroup" stepKey="openStoreConfigPage" />
46+
47+
<!--"Choose United Kingdom" as State Option Required and save configuration -->
48+
<conditionalClick selector="{{StateOptionsSection.stateOptions}}" dependentSelector="{{StateOptionsSection.countriesWithRequiredRegions}}" visible="false" stepKey="expandStateOptionsTab"/>
49+
<waitForAjaxLoad stepKey="waitForAjax"/>
50+
<scrollTo selector="{{StateOptionsSection.countriesWithRequiredRegions}}" stepKey="scrollToForm"/>
51+
<selectOption selector="{{StateOptionsSection.countriesWithRequiredRegions}}" userInput="United Kingdom" stepKey="selectCountriesWithRequiredRegion"/>
52+
<click selector="#save" stepKey="saveStateOptionsConfig"/>
53+
<waitForPageLoad stepKey="waitForSavingConfig"/>
54+
55+
<!-- create customer on storefront -->
56+
<actionGroup ref="StorefrontOpenCustomerAccountCreatePageActionGroup" stepKey="openCreateAccountPage"/>
57+
<actionGroup ref="ReloadPageActionGroup" stepKey="refreshPage"/>
58+
<actionGroup ref="StorefrontFillCustomerAccountCreationFormActionGroup" stepKey="fillCreateAccountForm">
59+
<argument name="customer" value="Simple_US_Customer"/>
60+
</actionGroup>
61+
<actionGroup ref="StorefrontClickCreateAnAccountCustomerAccountCreationFormActionGroup" stepKey="submitCreateAccountForm"/>
62+
63+
<!-- Open AddressBook and set Country as "United Kingdom" -->
64+
<actionGroup ref="StorefrontCustomerGoToSidebarMenu" stepKey="goToAddressBookPage">
65+
<argument name="menu" value="Address Book"/>
66+
</actionGroup>
67+
68+
<!-- Choose Country as "United Kingdom" -->
69+
<selectOption selector="{{StorefrontCustomerAddressFormSection.country}}" userInput="United Kingdom" stepKey="selectCountry"/>
70+
<click selector="{{StorefrontCustomerAddressFormSection.saveAddress}}" stepKey="saveCustomerAddress"/>
71+
72+
<!-- Assert the error message -->
73+
<seeElement selector="{{StorefrontCustomerMessagesSection.assertErrorMessage}}" stepKey="assetErrorMessage"/>
74+
</test>
75+
</tests>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminCustomizableOptionWithOneOptionActionGroup">
12+
<annotations>
13+
<description>Requires Navigation to the Product Creation page. Adds custom Option with one option.</description>
14+
</annotations>
15+
16+
<click selector="{{AdminProductFormBundleSection.customizableOptionsToggle}}" stepKey="expandCustomOptions"/>
17+
<scrollTo selector="{{AdminProductFormBundleSection.customizableOptionsToggle}}" stepKey="scrollUpABit"/>
18+
<wait stepKey="waitForScroll" time="10"/>
19+
<click selector="{{AdminProductFormBundleSection.addButtonOption}}" stepKey="clickAddButtonOption"/>
20+
<waitForElementVisible selector="{{AdminProductFormBundleSection.customOptionXTitle}}" stepKey="waitForOptions"/>
21+
<fillField selector="{{AdminProductFormBundleSection.customOptionXTitle}}" userInput="op1" stepKey="fillOptionTitle"/>
22+
<wait stepKey="waitForFillTitle" time="10"/>
23+
<click selector="{{AdminProductFormBundleSection.customOptionSelectType}}" stepKey="selectType"/>
24+
<click selector="{{AdminProductFormBundleSection.customOptionSelectField}}" stepKey="selectField"/>
25+
<click selector="{{AdminProductFormBundleSection.uncheckRequired}}" stepKey="uncheckRequired"/>
26+
<fillField selector="{{AdminProductFormBundleSection.customizableOptionPrice}}" userInput="30" stepKey="fillPrice"/>
27+
<click selector="{{AdminProductFormBundleSection.priceType}}" stepKey="clickPriceType"/>
28+
<click selector="{{AdminProductFormBundleSection.priceTypeSelectPercent}}" stepKey="selectPercent"/>
29+
</actionGroup>
30+
</actionGroups>

app/code/Magento/Bundle/Test/Mftf/Section/AdminProductFormBundleSection.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,16 @@
113113
<element name="userDefinedQuantity" type="checkbox" selector="[name='bundle_options[bundle_options][{{option}}][bundle_selections][{{product}}][selection_can_change_qty]'][type='checkbox']" parameterized="true"/>
114114
<element name="bundleItemsOptionTableRows" type="button" selector=".admin__dynamic-rows[data-index='bundle_selections'] tr.data-row" timeout="30"/>
115115
<element name="isDefault" type="button" selector="//table[@class='admin__dynamic-rows admin__control-table']//span[contains(text(),'{{var1}}')]/../../../../..//input[@type='radio']" parameterized="true"/>
116+
<!--Customizable Options -->
117+
<element name="customizableOptionsToggle" type="button" selector="//span[text()='Customizable Options']"/>
118+
<element name="addButtonOption" type="button" selector="button[data-index='button_add']"/>
119+
<element name="customOptionXTitle" type="input" selector="[name='product[options][0][title]']"/>
120+
<element name="customOptionSelectType" type="select" selector="[data-index='container_common'] .admin__action-multiselect-text"/>
121+
<element name="customOptionSelectField" type="select" selector="//label[contains(text(),'Field')]" />
122+
<element name="uncheckRequired" type="checkbox" selector="//span[contains(text(),'Required')]"/>
123+
<element name="addButton" type="button" selector="//span[contains(text(),'Add Value')]"/>
124+
<element name="customizableOptionPrice" type="input" selector=".//*[@name='product[options][0][price]']" />
125+
<element name="priceType" type="select" selector="[name='product[options][0][price_type]']" />
126+
<element name="priceTypeSelectPercent" type="select" selector="//*[@name='product[options][0][price_type]']/option[2]" />
116127
</section>
117128
</sections>

app/code/Magento/Bundle/Test/Mftf/Section/StorefrontBundledSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,6 @@
5050
<element name="validationMessageBox" type="block" selector="#validation-message-box"/>
5151
<element name="dropDownQuantityValidation" type="input" selector="//span[contains(text(), '{{productName}}')]/../..//input/following-sibling::div[@class='mage-error']" parameterized="true"/>
5252
<element name="radioButtonQuantityValidation" type="input" selector="//label//span[contains(text(), '{{productName}}')]/../..//div[@class='control']//div[@class='field qty qty-holder']//input/following-sibling::div[@class='mage-error']" parameterized="true"/>
53+
<element name="dropDrownOptionQuantity" type="input" selector="//span[contains(text(), '{{productName}}')]/../..//input/following-sibling::div//div//div//input" parameterized="true"/>
5354
</section>
5455
</sections>

app/code/Magento/Bundle/Test/Mftf/Section/StorefrontProductActionSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
<element name="addToCartButton" type="button" selector="#product-addtocart-button" timeout="30"/>
1414
<element name="dropdownSelectOption" type="select" selector="//div[@class='control']/select"/>
1515
<element name="dropdownProductSelection" type="select" selector="//div[@class='control']/select/option[contains(.,'{{productName}}')]" parameterized="true"/>
16+
<element name="customOptionField" type="select" selector="[class='input-text product-custom-option']"/>
1617
</section>
1718
</sections>
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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+
<!-- Test XML Example -->
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminBundleProductPriceCalculationOnProductPageTest">
11+
<annotations>
12+
<features value="Bundle"/>
13+
<stories value="Create bundle product in Admin and calculate price on product page"/>
14+
<title value="Bundle product price calculation on product page"/>
15+
<description value="create bundle product calculate and Verify price on product page"/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="AC-4610"/>
18+
</annotations>
19+
<before>
20+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
21+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
22+
<createData entity="ImportProductSimple2_Bundle" stepKey="simpleProduct">
23+
<field key="price">560</field>
24+
<requiredEntity createDataKey="createCategory"/>
25+
</createData>
26+
</before>
27+
<after>
28+
<!-- Delete bundle product -->
29+
<actionGroup ref="DeleteProductUsingProductGridActionGroup" stepKey="deleteBundleProduct">
30+
<argument name="product" value="BundleProduct"/>
31+
</actionGroup>
32+
<!-- deleting category, simple products -->
33+
<deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/>
34+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
35+
<magentoCron groups="index" stepKey="reindex"/>
36+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="flushCache">
37+
<argument name="tags" value="full_page"/>
38+
</actionGroup>
39+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
40+
</after>
41+
<!-- Create Bundle product via Admin -->
42+
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex"/>
43+
<actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetProductGridColumnsInitial"/>
44+
<actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProduct">
45+
<argument name="product" value="BundleProduct"/>
46+
</actionGroup>
47+
<!-- Entering Bundle Product name,SKU, category, url key -->
48+
<fillField selector="{{AdminProductFormSection.productName}}" userInput="{{BundleProduct.name}}" stepKey="fillProductName"/>
49+
<searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="[$$createCategory.name$$]" stepKey="fillCategory"/>
50+
<!-- Add the bundle option to the product -->
51+
<actionGroup ref="AddBundleOptionWithOneProductActionGroup" stepKey="addBundleOption">
52+
<argument name="x" value="0"/>
53+
<argument name="n" value="1"/>
54+
<argument name="prodOneSku" value="$$simpleProduct.sku$$"/>
55+
<argument name="prodTwoSku" value=""/>
56+
<argument name="optionTitle" value="{{BundleProduct.optionTitle1}}"/>
57+
<argument name="inputType" value="Drop-down"/>
58+
</actionGroup>
59+
<checkOption selector="{{AdminProductFormBundleSection.userDefinedQuantity('0', '0')}}" stepKey="userDefinedQuantity"/>
60+
<!-- Save the bundle product -->
61+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductForm"/>
62+
<!-- go to product page -->
63+
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="GoToProductPage">
64+
<argument name="productUrl" value="{{BundleProduct.urlKey}}"/>
65+
</actionGroup>
66+
<!-- update quantity and verify price -->
67+
<click selector="{{StorefrontBundledSection.addToCart}}" stepKey="clickCustomizeAndAddToCart"/>
68+
<wait stepKey="waitForClickOnCartButton" time="10"/>
69+
<fillField selector="{{StorefrontBundledSection.dropDrownOptionQuantity('$$simpleProduct.name$$')}}" userInput="3" stepKey="fillQuantity"/>
70+
<wait stepKey="waitForFillQuantityField" time="10"/>
71+
<click selector="{{StorefrontBundledSection.addToCartConfigured}}" stepKey="clickAddToCart"/>
72+
<!-- Storefront: Verify Updated Customization Price -->
73+
<see userInput="$1,680.00" selector="{{StorefrontBundledSection.bundleProductsPrice}}" stepKey="seeCustomizationPrice"/>
74+
</test>
75+
</tests>
76+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminAssignImageSmallRoleActionGroup">
12+
<annotations>
13+
<description>Requires the navigation to the Product Creation page. Checks the Small Role area for image.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="image"/>
17+
</arguments>
18+
<conditionalClick selector="{{AdminProductImagesSection.productImagesToggle}}" dependentSelector="{{AdminProductImagesSection.imageFile(image.fileName)}}" visible="false" stepKey="expandImages"/>
19+
<waitForElementVisible selector="{{AdminProductImagesSection.imageFile(image.fileName)}}" stepKey="seeProductImageName"/>
20+
<click selector="{{AdminProductImagesSection.imageFile(image.fileName)}}" stepKey="clickProductImage"/>
21+
<waitForElementVisible selector="{{AdminProductImagesSection.altText}}" stepKey="seeAltTextSection"/>
22+
<checkOption selector="{{AdminProductImagesSection.roleSmall}}" stepKey="checkRoles"/>
23+
<click selector="{{AdminSlideOutDialogSection.closeButton}}" stepKey="clickCloseButton"/>
24+
</actionGroup>
25+
</actionGroups>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminAssignImageThumbNailRoleActionGroup">
12+
<annotations>
13+
<description>Requires the navigation to the Product Creation page. Checks Thumb Base Role area for image.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="image"/>
17+
</arguments>
18+
<conditionalClick selector="{{AdminProductImagesSection.productImagesToggle}}" dependentSelector="{{AdminProductImagesSection.imageFile(image.fileName)}}" visible="false" stepKey="expandImages"/>
19+
<waitForElementVisible selector="{{AdminProductImagesSection.imageFile(image.fileName)}}" stepKey="seeProductImageName"/>
20+
<click selector="{{AdminProductImagesSection.imageFile(image.fileName)}}" stepKey="clickProductImage"/>
21+
<waitForElementVisible selector="{{AdminProductImagesSection.altText}}" stepKey="seeAltTextSection"/>
22+
<checkOption selector="{{AdminProductImagesSection.roleThumbnail}}" stepKey="checkRoles"/>
23+
<click selector="{{AdminSlideOutDialogSection.closeButton}}" stepKey="clickCloseButton"/>
24+
</actionGroup>
25+
</actionGroups>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminChangeCategoryAndURLNameActionGroup">
11+
<annotations>
12+
<description>Admin Change/Update category and URL Name in Category page.</description>
13+
</annotations>
14+
<click selector="{{AdminCategorySEOSection.SectionHeader}}" stepKey="openSeoSection"/>
15+
<uncheckOption selector="{{AdminCategorySEOSection.UrlKeyDefaultValueCheckbox}}" stepKey="uncheckUseDefaultUrlKey"/>
16+
<fillField selector="{{AdminCategorySEOSection.UrlKeyInput}}" userInput="{{_defaultCategory.name_lwr}}-hattest" stepKey="enterURLKey"/>
17+
<waitForPageLoad stepKey="waitForPageToLoad3"/>
18+
<uncheckOption selector="{{AdminCategoryBasicFieldSection.categoryNameUseDefault}}" stepKey="UncheckUseDefaultName"/>
19+
<fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="{{_defaultCategory.name_lwr}}-hattest" stepKey="updateCategoryName"/>
20+
<waitForPageLoad stepKey="waitForPageToLoad4"/>
21+
<uncheckOption selector="{{AdminCategorySEOSection.UrlKeyRedirectCheckbox}}" stepKey="uncheckRedirect"/>
22+
<click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveCategoryWithProducts"/>
23+
<waitForPageLoad stepKey="waitForCategorySaved"/>
24+
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="assertSuccessMessage1"/>
25+
</actionGroup>
26+
</actionGroups>

0 commit comments

Comments
 (0)