Skip to content

Commit 83b7f30

Browse files
authored
Merge pull request #8212 from magento-gl/functional-testing-mainline-deployment
ACQE-4787 : Bengals Mainline Deployment
2 parents 9c0e123 + 88cf05d commit 83b7f30

File tree

44 files changed

+1730
-5
lines changed

Some content is hidden

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

44 files changed

+1730
-5
lines changed

app/code/Magento/Backend/Test/Mftf/Section/LocaleOptionsSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@
1616
<element name="localeDisabled" type="select" selector="#general_locale_code[disabled=disabled]"/>
1717
<element name="useDefault" type="checkbox" selector="#general_locale_timezone_inherit"/>
1818
<element name="defaultLocale" type="checkbox" selector="#general_locale_code_inherit"/>
19+
<element name="checkIfTabExpand" type="button" selector="#general_locale-head:not(.open)"/>
20+
<element name="timeZoneDropdown" type="select" selector="//select[@id='general_locale_timezone']"/>
1921
</section>
2022
</sections>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,6 @@
4444
<element name="productAttributeName" type="button" selector="//div[@class='filter-options-title' and contains(text(),'{{var1}}')]" parameterized="true"/>
4545
<element name="productAttributeOptionValue" type="button" selector="//div[@id='narrow-by-list']//a[contains(text(), '{{var1}}')]" parameterized="true"/>
4646
<element name="outOfStockProductCategoryPage" type="text" selector="//div[@class='stock unavailable']//span[text()='Out of stock']"/>
47+
<element name="ListedProductAttributes" type="block" selector="//div[@aria-label='{{vs_attribute}}']//div[@aria-label='{{attribute_name}}']" parameterized="true"/>
4748
</section>
4849
</sections>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,6 @@
3535
<element name="ProductAddToCompareByName" type="text" selector="//*[contains(@class,'product-item-info')][descendant::a[contains(text(), '{{var1}}')]]//a[contains(@class, 'tocompare')]" parameterized="true"/>
3636
<element name="ProductImageByNameAndSrc" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//img[contains(@src, '{{src}}')]" parameterized="true"/>
3737
<element name="ProductStockUnavailable" type="text" selector="//*[text()='Out of stock']"/>
38+
<element name="listedProductOnProductPage" type="block" selector="//div[contains(@aria-labelledBy,'{{attribute_code}}')]//div[@aria-label='{{attribute_name}}']" parameterized="true"/>
3839
</section>
3940
</sections>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
<element name="productOptionFile" type="file" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//label[contains(.,'OptionFile')]/../div[@class='control']//input[@type='file']" parameterized="true"/>
3232
<element name="productOptionSelect" type="select" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//label[contains(.,'{{var1}}')]/../div[@class='control']//select" parameterized="true"/>
3333
<element name="asLowAs" type="input" selector="span[class='price-wrapper '] "/>
34+
<element name="asLowAsLabel" type="input" selector="//strong[@id='block-related-heading']/following::span[@class='price-label'][1]"/>
35+
<element name="asLowAsLabelAgain" type="input" selector="//strong[@id='block-related-heading']/following::span[@class='price-label'][2]"/>
3436
<element name="specialPriceValue" type="text" selector="//span[@class='special-price']//span[@class='price']"/>
3537
<element name="mapPrice" type="text" selector="//div[@class='price-box price-final_price']//span[contains(@class, 'price-msrp_price')]"/>
3638
<element name="clickForPriceLink" type="text" selector="//div[@class='price-box price-final_price']//a[contains(text(), 'Click for price')]"/>
@@ -106,7 +108,7 @@
106108
<element name="customOptionHour" type="date" selector="//div[@class='field date required']//span[text()='{{option}}']/../..//div/select[@data-calendar-role='hour']" parameterized="true"/>
107109
<element name="customOptionMinute" type="date" selector="//div[@class='field date required']//span[text()='{{option}}']/../..//div/select[@data-calendar-role='minute']" parameterized="true"/>
108110
<element name="customOptionDayPart" type="date" selector="//div[@class='field date required']//span[text()='{{option}}']/../..//div/select[@data-calendar-role='day_part']" parameterized="true"/>
109-
111+
<element name="swatchOptionDisabled" type="text" selector=".//*[@class='swatch-option color disabled']"/>
110112
<element name="addToCartEnabled" type="button" selector="#product-addtocart-button:not([disabled])"/>
111113
</section>
112114
</sections>

app/code/Magento/Catalog/Test/Mftf/Test/AddNewProductAttributeInProductPageTest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
<!-- Login as admin -->
2323
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
2424

25+
<!-- remove the Filter From the page-->
26+
<actionGroup ref="ClearFiltersAdminProductGridActionGroup" stepKey="clearFilterFromProductIndex"/>
27+
2528
<!--Create Category-->
2629
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
2730

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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="AdminChecksIfOnlyOneQuantityConfigurationIsDisplayedForBundleProductWhileCreatingAnOrderTest">
11+
<annotations>
12+
<features value="Bundle"/>
13+
<stories value="Create Admin checks if only one Quantity Configuration is displayed for Bundle product while creating an order"/>
14+
<title value="Admin checks if only one Quantity Configuration is displayed for Bundle product while creating an order"/>
15+
<description value="create Admin checks if only one Quantity Configuration is displayed for Bundle product "/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="AC-5237"/>
18+
</annotations>
19+
<before>
20+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
21+
<createData entity="SimpleProduct2" stepKey="simpleProduct1"/>
22+
<createData entity="SimpleProduct2" stepKey="simpleProduct2"/>
23+
<createData entity="Simple_US_Customer_NY" stepKey="createCustomer"/>
24+
</before>
25+
<after>
26+
<deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
27+
<deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/>
28+
<!--Delete customer-->
29+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
30+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
31+
</after>
32+
<!-- Go to bundle product creation page -->
33+
<amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage"/>
34+
<waitForPageLoad stepKey="waitForBundleProductCreationPage"/>
35+
<!-- Entering Bundle Product name,SKU, category, url key -->
36+
<fillField selector="{{AdminProductFormSection.productName}}" userInput="{{BundleProduct.name}}" stepKey="fillProductName"/>
37+
<!-- Create bundle product options -->
38+
<conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems"/>
39+
<click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption3"/>
40+
<waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" stepKey="waitForBundleOptions"/>
41+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="fillOptionTitle"/>
42+
<selectOption selector="{{AdminProductFormBundleSection.bundleOptionXInputType('0')}}" userInput="{{BundleProduct.optionInputType1}}" stepKey="selectInputType"/>
43+
<waitForElementVisible selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="waitForAddProductsToBundle"/>
44+
<click selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="clickAddProductsToOption"/>
45+
<waitForPageLoad stepKey="waitForPageLoadAfterBundleProducts"/>
46+
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterBundleProductOptions">
47+
<argument name="product" value="$$simpleProduct1$$"/>
48+
</actionGroup>
49+
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow"/>
50+
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterBundleProductOptions2">
51+
<argument name="product" value="$$simpleProduct2$$"/>
52+
</actionGroup>
53+
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow2"/>
54+
<click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="clickAddSelectedBundleProducts"/>
55+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty1"/>
56+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty2"/>
57+
<!--Save the product-->
58+
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveButton"/>
59+
<!--Create new order-->
60+
<actionGroup ref="AdminNavigateToNewOrderPageExistingCustomerActionGroup" stepKey="navigateToNewOrderWithExistingCustomer">
61+
<argument name="customer" value="Simple_US_Customer_NY"/>
62+
</actionGroup>
63+
<click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/>
64+
<click selector="{{AdminOrderFormItemsSection.search}}" stepKey="clickSearch"/>
65+
<scrollTo selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" x="0" y="-100" stepKey="scrollToCheckColumn"/>
66+
<checkOption selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="selectProduct"/>
67+
<waitForPageLoad stepKey="waitForProductLoad"/>
68+
</test>
69+
</tests>
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminCreateCategoryWithAPIForMultiStoresTest">
11+
<annotations>
12+
<stories value="Create categories"/>
13+
<title value="Create Category Using API post"/>
14+
<description value="Create Category Using API post when there are more than stores existing"/>
15+
<testCaseId value="AC-5384"/>
16+
<severity value="MAJOR"/>
17+
<group value="Catalog"/>
18+
<group value="mtf_migrated"/>
19+
</annotations>
20+
21+
<before>
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/>
23+
<!--Create a new additional store view for the default website and store-->
24+
<actionGroup ref="CreateStoreViewActionGroup" stepKey="createNewSecondStoreviewForDefaultStore">
25+
<argument name="storeView" value="SecondStoreGroupUnique"/>
26+
</actionGroup>
27+
<!--Create a new second store for the default website-->
28+
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createNewStoreForMainWebsite">
29+
<argument name="website" value="{{_defaultWebsite.name}}"/>
30+
<argument name="storeGroupName" value="{{customStoreGroup.name}}"/>
31+
<argument name="storeGroupCode" value="{{customStoreGroup.code}}"/>
32+
</actionGroup>
33+
<!--Create a store view for the second store-->
34+
<actionGroup ref="CreateCustomStoreViewActionGroup" stepKey="createStoreviewForSecondStore"/>
35+
<!--Create a second custom website-->
36+
<actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createNewWebsite">
37+
<argument name="newWebsiteName" value="{{secondCustomWebsite.name}}"/>
38+
<argument name="websiteCode" value="{{secondCustomWebsite.code}}"/>
39+
</actionGroup>
40+
<!--Create a store for the second website-->
41+
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createStoreForNewWebsite">
42+
<argument name="website" value="{{secondCustomWebsite.name}}"/>
43+
<argument name="storeGroupName" value="{{NewStoreData.name}}"/>
44+
<argument name="storeGroupCode" value="{{NewStoreData.code}}"/>
45+
</actionGroup>
46+
<!--Create a store view of the new store of second website-->
47+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createCustomStoreView">
48+
<argument name="StoreGroup" value="NewStoreData"/>
49+
<argument name="customStore" value="staticSecondStore"/>
50+
</actionGroup>
51+
</before>
52+
53+
<after>
54+
<!--Delete the created category-->
55+
<actionGroup ref="DeleteCategoryActionGroup" stepKey="deleteCategory">
56+
<argument name="categoryEntity" value="SimpleSubCategory"/>
57+
</actionGroup>
58+
<!--Set the main website as default-->
59+
<actionGroup ref="AdminSetDefaultWebsiteActionGroup" stepKey="setMainWebsiteAsDefault">
60+
<argument name="websiteName" value="{{_defaultWebsite.name}}"/>
61+
</actionGroup>
62+
<!--Delete the second created website-->
63+
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteCreatedWebsite">
64+
<argument name="websiteName" value="{{secondCustomWebsite.name}}"/>
65+
</actionGroup>
66+
<!--Create a second store created for main website-->
67+
<actionGroup ref="DeleteCustomStoreActionGroup" stepKey="deleteCreatedCustomWebsiteStore">
68+
<argument name="storeGroupName" value="customStoreGroup.name"/>
69+
</actionGroup>
70+
<!--Create a second store view created for main website-->
71+
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteCreatedCustomStoreview">
72+
<argument name="customStore" value="SecondStoreGroupUnique"/>
73+
</actionGroup>
74+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
75+
</after>
76+
<!--Create a category and check that in storefront -->
77+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
78+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/>
79+
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory"/>
80+
<see userInput="$$createCategory.name$$" stepKey="assertCategoryNameOnStorefront" selector="{{StorefrontCategoryMainSection.CategoryTitle}}"/>
81+
<waitForPageLoad stepKey="waitForCustomerCategoryPageLoad"/>
82+
<!--Switch to second store view and check that created category in storefront-->
83+
<actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="switchToSecondMainStoreView">
84+
<argument name="storeView" value="SecondStoreGroupUnique"/>
85+
</actionGroup>
86+
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory2"/>
87+
<see userInput="$$createCategory.name$$" stepKey="assertCategoryNameOnSecondMainStoreView" selector="{{StorefrontCategoryMainSection.CategoryTitle}}"/>
88+
<waitForPageLoad stepKey="waitForCustomerCategoryPageLoad2"/>
89+
<!--Switch to second store and check that created category in storefront-->
90+
<actionGroup ref="StorefrontSwitchStoreActionGroup" stepKey="switchToSecondMainStore">
91+
<argument name="storeName" value="{{customStoreGroup.name}}"/>
92+
</actionGroup>
93+
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory3"/>
94+
<see userInput="$$createCategory.name$$" stepKey="assertCategoryNameOnSecondMainStore" selector="{{StorefrontCategoryMainSection.CategoryTitle}}"/>
95+
<waitForPageLoad stepKey="waitForCustomerCategoryPageLoad3"/>
96+
<!--Switch to second website and check that created category in storefront-->
97+
<actionGroup ref="AdminSetDefaultWebsiteActionGroup" stepKey="setNewWebsiteAsDefault">
98+
<argument name="websiteName" value="{{secondCustomWebsite.name}}"/>
99+
</actionGroup>
100+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage2"/>
101+
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory4"/>
102+
<see userInput="$$createCategory.name$$" stepKey="assertCategoryNameOnSecondWebsite" selector="{{StorefrontCategoryMainSection.CategoryTitle}}"/>
103+
<waitForPageLoad stepKey="waitForCustomerCategoryPageLoad4"/>
104+
</test>
105+
</tests>

0 commit comments

Comments
 (0)