Skip to content

Commit 0ce7184

Browse files
authored
Merge pull request #2901 from magento-pangolin/RE-develop-pr
[pangolin] Weekly regression enablement tests
2 parents f0c4347 + 5733a1a commit 0ce7184

28 files changed

+726
-18
lines changed

app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationBlankIndustryTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
</after>
2323
<actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/>
2424
<amOnPage stepKey="amOnAdminConfig" url="{{AdminConfigPage.url}}"/>
25+
<waitForPageLoad stepKey="waitForAdminConfig"/>
2526
<click stepKey="clickAdvancedReportingConfigMenu" selector="{{AdminConfigSection.advancedReportingMenuItem}}"/>
2627
<see stepKey="seeAdvancedReportingIndustryLabel" selector="{{AdminConfigSection.advancedReportingIndustryLabel}}" userInput="Industry"/>
2728
<selectOption stepKey="selectAdvancedReportingIndustry" selector="{{AdminConfigSection.advancedReportingIndustry}}" userInput="--Please Select--"/>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,6 @@
6868
<element name="searchForCategory" type="input" selector="div.action-menu._active > div.admin__action-multiselect-search-wrap input" timeout="30"/>
6969
<element name="selectCategory" type="multiselect" selector="//div[@class='action-menu _active']//label[@class='admin__action-multiselect-label']"/>
7070
<element name="categoriesLabel" type="text" selector="//div[@class='action-menu _active']//button[@data-action='close-advanced-select']"/>
71+
<element name="userDefinedQuantity" type="checkbox" selector="[name='bundle_options[bundle_options][{{option}}][bundle_selections][{{product}}][selection_can_change_qty]'][type='checkbox']" parameterized="true"/>
7172
</section>
7273
</sections>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
1111
<section name="BundleStorefrontSection">
1212
<!--TestingForLocationOfOptions-->
13-
<element name="bundleOptionSelector" type="button" selector="//*[@id='bundle-slide']/span"/>
14-
<element name="bundleOptionSelection" type="button" selector="//div[@class='nested options-list']/div[2]/label[@class='label']"/>
13+
<element name="bundleOptionSelector" type="checkbox" selector="//*[@id='bundle-slide']/span" timeout="30"/>
14+
<element name="bundleOptionSelection" type="checkbox" selector="//div[@class='nested options-list']/div[{{optionNumber}}]/label[@class='label']" parameterized="true"/>
1515
<!--Description-->
1616
<!--CE exclusively-->
1717
<element name="longDescriptionText" type="text" selector="//*[@id='description']/div/div" timeout="30"/>

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,13 @@
2121
<element name="nthOptionDiv" type="block" selector="#product-options-wrapper div.field.option:nth-of-type({{var}})" parameterized="true"/>
2222
<element name="nthItemOptionsTitle" type="text" selector="dl.item-options dt:nth-of-type({{var}})" parameterized="true"/>
2323
<element name="nthItemOptionsValue" type="text" selector="dl.item-options dd:nth-of-type({{var}})" parameterized="true"/>
24+
<element name="bundleProductName" type="text" selector="//*[@id='maincontent']//span[@itemprop='name']"/>
25+
<element name="pageNotFound" type="text" selector="//h1[@class='page-title']//span[contains(., 'Whoops, our bad...')]"/>
26+
<element name="dropDownOptionOneProducts" type="select" selector="//label//span[contains(text(), '{{productName}}')]/../..//div[@class='control']//select" parameterized="true"/>
27+
<element name="dropDownOptionOneQuantity" type="input" selector="//span[contains(text(), '{{productName}}')]/../..//input" parameterized="true"/>
28+
<element name="radioButtonOptionTwoProducts" type="checkbox" selector="//label//span[contains(text(), '{{productName}}')]/../..//div[@class='control']//div[@class='field choice'][{{productNumber}}]/input" parameterized="true"/>
29+
<element name="radioButtonOptionTwoQuantity" type="input" selector="//label//span[contains(text(), '{{productName}}')]/../..//div[@class='control']//div[@class='field qty qty-holder']//input" parameterized="true"/>
30+
<element name="checkboxOptionThreeProducts" type="checkbox" selector="//label//span[contains(text(), '{{productName}}')]/../..//div[@class='control']//div[@class='field choice'][{{productNumber}}]/input" parameterized="true"/>
31+
<element name="multiselectOptionFourProducts" type="multiselect" selector="//label//span[contains(text(), '{{productName}}')]/../..//select[@multiple='multiple']" parameterized="true"/>
2432
</section>
2533
</sections>

app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteABundleProduct.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,6 @@
8282
<!--Testing deletion of product-->
8383
<amOnPage url="{{BundleProduct.urlKey}}.html" stepKey="GoToProductPageAgain"/>
8484
<waitForPageLoad stepKey="WaitForProductPageToLoadToShowElement"/>
85-
<dontSeeElement selector="{{BundleStorefrontSection.bundleProductName}}" stepKey="LookingForNameOfProductTwo"/>
85+
<dontSeeElement selector="{{StorefrontBundledSection.bundleProductName}}" stepKey="LookingForNameOfProductTwo"/>
8686
</test>
8787
</tests>

app/code/Magento/Bundle/Test/Mftf/Test/AdminMassDeleteBundleProducts.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,11 @@
133133
<!--Testing deletion of products-->
134134
<amOnPage url="{{BundleProduct.urlKey}}.html" stepKey="GoToProductPageAgain"/>
135135
<waitForPageLoad stepKey="WaitForProductPageToLoadToShowElement"/>
136-
<dontSeeElement stepKey="LookingForNameOfProduct" selector="{{BundleStorefrontSection.bundleProductName}}"/>
137-
<seeElement stepKey="LookingForPageNotFoundMessage" selector="{{BundleStorefrontSection.pageNotFound}}"/>
136+
<dontSeeElement stepKey="LookingForNameOfProduct" selector="{{StorefrontBundledSection.bundleProductName}}"/>
137+
<seeElement stepKey="LookingForPageNotFoundMessage" selector="{{StorefrontBundledSection.pageNotFound}}"/>
138138
<amOnPage url="{{BundleProduct.urlKey2}}.html" stepKey="GoToProductPageAgain2"/>
139139
<waitForPageLoad stepKey="WaitForProductPageToLoadToShowElement2"/>
140-
<dontSeeElement stepKey="LookingForNameOfProduct2" selector="{{BundleStorefrontSection.bundleProductName}}"/>
141-
<seeElement stepKey="LookingForPageNotFoundMessage2" selector="{{BundleStorefrontSection.pageNotFound}}"/>
140+
<dontSeeElement stepKey="LookingForNameOfProduct2" selector="{{StorefrontBundledSection.bundleProductName}}"/>
141+
<seeElement stepKey="LookingForPageNotFoundMessage2" selector="{{StorefrontBundledSection.pageNotFound}}"/>
142142
</test>
143143
</tests>

app/code/Magento/Bundle/Test/Mftf/Test/AdminProductBundleCreationTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@
7272

7373
<!--Test Assertion - on correct page/page has been published-->
7474
<waitForPageLoad stepKey="waitForBundleProductPageToLoad"/>
75-
<seeElement stepKey="LookingForNameOfProduct" selector="{{BundleStorefrontSection.bundleProductName}}"/>
75+
<seeElement stepKey="LookingForNameOfProduct" selector="{{StorefrontBundledSection.bundleProductName}}"/>
7676
</test>
7777
</tests>

app/code/Magento/Bundle/Test/Mftf/Test/EnableDisableBundleProductStatusTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<!--Go to page-->
7373
<amOnPage url="{{BundleProduct.urlKey}}.html" stepKey="GoToProductPage"/>
7474
<waitForPageLoad stepKey="waitForBundleProductPageToLoad"/>
75-
<seeElement stepKey="LookingForNameOfProduct" selector="{{BundleStorefrontSection.bundleProductName}}"/>
75+
<seeElement stepKey="LookingForNameOfProduct" selector="{{StorefrontBundledSection.bundleProductName}}"/>
7676

7777
<!--Testing disabled view-->
7878
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="GoToProductCatalog"/>
@@ -87,6 +87,6 @@
8787
<see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShownAgain"/>
8888
<amOnPage url="{{BundleProduct.urlKey}}.html" stepKey="GoToProductPageAgain"/>
8989
<waitForPageLoad stepKey="WaitForProductPageToLoadToShowElement"/>
90-
<dontSeeElement stepKey="LookingForNameOfProductTwo" selector="{{BundleStorefrontSection.bundleProductName}}"/>
90+
<dontSeeElement stepKey="LookingForNameOfProductTwo" selector="{{StorefrontBundledSection.bundleProductName}}"/>
9191
</test>
9292
</tests>

app/code/Magento/Bundle/Test/Mftf/Test/MassEnableDisableBundleProductsTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
<!--Confirm bundle products have been disabled-->
138138
<amOnPage url="{{BundleProduct.urlKey2}}.html" stepKey="GoToProductPage"/>
139139
<waitForPageLoad stepKey="WaitForProductPageToLoadToShowElement"/>
140-
<dontSeeElement stepKey="LookingForNameOfProductDisabled" selector="{{BundleStorefrontSection.bundleProductName}}"/>
140+
<dontSeeElement stepKey="LookingForNameOfProductDisabled" selector="{{StorefrontBundledSection.bundleProductName}}"/>
141141

142142
<!--Enabling bundle products-->
143143
<amOnPage url="{{ProductCatalogPage.url}}" stepKey="GoToCatalogPageChangingView"/>
@@ -154,6 +154,6 @@
154154
<!--Confirm bundle products have been enabled-->
155155
<amOnPage url="{{BundleProduct.urlKey2}}.html" stepKey="GoToProductPageEnabled"/>
156156
<waitForPageLoad stepKey="waitForBundleProductPageToLoad"/>
157-
<seeElement stepKey="LookingForNameOfProduct" selector="{{BundleStorefrontSection.bundleProductName}}"/>
157+
<seeElement stepKey="LookingForNameOfProduct" selector="{{StorefrontBundledSection.bundleProductName}}"/>
158158
</test>
159159
</tests>
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
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="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
11+
<test name="StorefrontBundleProductDetailsTest">
12+
<annotations>
13+
<features value="Bundle"/>
14+
<stories value="Bundle product details page"/>
15+
<title value="Customer should be able to see basic bundle product details"/>
16+
<description value="Customer should be able to see basic bundle product details"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MC-230"/>
19+
<group value="Bundle"/>
20+
</annotations>
21+
<before>
22+
<!--Creating Data-->
23+
<createData entity="_defaultCategory" stepKey="createPreReqCategory"/>
24+
<createData entity="SimpleProduct2" stepKey="simpleProduct1"/>
25+
<createData entity="SimpleProduct2" stepKey="simpleProduct2"/>
26+
27+
<!-- Admin Login-->
28+
<actionGroup stepKey="loginToAdminPanel" ref="LoginAsAdmin"/>
29+
<actionGroup ref="DisabledWYSIWYG" stepKey="disableWYSIWYG"/>
30+
</before>
31+
<after>
32+
<deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/>
33+
<deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
34+
<deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/>
35+
<actionGroup ref="logout" stepKey="logout"/>
36+
</after>
37+
<!-- go to bundle product creation page-->
38+
<amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage" />
39+
<waitForPageLoad stepKey="waitForBundleProductCreatePageToLoad"/>
40+
41+
<!--Add description-->
42+
<click selector="{{AdminProductFormBundleSection.contentDropDown}}" stepKey="openDescriptionDropDown"/>
43+
<scrollTo selector="{{AdminProductFormBundleSection.contentDropDown}}" stepKey="scrollToError"/>
44+
<fillField selector="{{AdminProductFormBundleSection.longDescription}}" userInput="This is the long description" stepKey="fillLongDescription"/>
45+
<fillField selector="{{AdminProductFormBundleSection.shortDescription}}" userInput="This is the short description" stepKey="fillShortDescription"/>
46+
47+
<!-- Add options -->
48+
<conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems"/>
49+
<click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption"/>
50+
<waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" stepKey="waitForBundleOptions"/>
51+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="fillOptionTitle"/>
52+
<selectOption selector="{{AdminProductFormBundleSection.bundleOptionXInputType('0')}}" userInput="{{BundleProduct.optionInputType1}}" stepKey="selectInputType"/>
53+
<waitForElementVisible selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="waitForAddProductsToBundle"/>
54+
<click selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="clickAddProductsToOption"/>
55+
<waitForPageLoad stepKey="waitForPageLoadAfterBundleProducts"/>
56+
<actionGroup ref="filterProductGridBySku" stepKey="filterBundleProductOptions">
57+
<argument name="product" value="$$simpleProduct1$$"/>
58+
</actionGroup>
59+
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow"/>
60+
<actionGroup ref="filterProductGridBySku" stepKey="filterBundleProductOptions2">
61+
<argument name="product" value="$$simpleProduct2$$"/>
62+
</actionGroup>
63+
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow2"/>
64+
<click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="clickAddSelectedBundleProducts"/>
65+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty1"/>
66+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty2"/>
67+
68+
<!--Create a basic bundle product-->
69+
<actionGroup ref="CreateBasicBundleProduct" stepKey="createBundledProductForTwoSimpleProducts">
70+
<argument name="bundleProduct" value="BundleProduct"/>
71+
</actionGroup>
72+
73+
<!--save the product-->
74+
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveButtonAgain"/>
75+
<see userInput="You saved the product." stepKey="messageYouSavedTheProductIsShownAgain"/>
76+
77+
<!--Checking details-->
78+
<amOnPage url="{{BundleProduct.urlKey}}.html" stepKey="goToProductPage"/>
79+
<waitForPageLoad stepKey="waitForProductPageToLoad"/>
80+
<see selector="{{BundleStorefrontSection.shortDescriptionText}}" userInput="This is the short description" stepKey="seeShortDescription"/>
81+
<see selector="{{BundleStorefrontSection.longDescriptionText}}" userInput="This is the long description" stepKey="seeLongDescription"/>
82+
<click selector="{{BundleStorefrontSection.bundleOptionSelector}}" stepKey="clickOnCustomizationOption"/>
83+
<see selector="{{BundleStorefrontSection.bundleOptionSelection('1')}}" userInput="{{BundleProduct.defaultQuantity}} x $$simpleProduct1.name$$" stepKey="seeOption1"/>
84+
<see selector="{{BundleStorefrontSection.bundleOptionSelection('2')}}" userInput="{{BundleProduct.defaultQuantity}} x $$simpleProduct2.name$$" stepKey="seeOption2"/>
85+
</test>
86+
</tests>

0 commit comments

Comments
 (0)