Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit f947cad

Browse files
authored
Merge pull request #2763 from magento-pangolin/RE-develop-pr
[pangolin] Weekly RE-develop functional tests
2 parents ce48579 + aee9de9 commit f947cad

File tree

54 files changed

+2438
-48
lines changed

Some content is hidden

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

54 files changed

+2438
-48
lines changed
31.4 KB
Loading
16.2 KB
Loading
9.98 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
11+
<!-- Action group to delete an item given that items name -->
12+
<!-- Must already be on the admin page containing the grid -->
13+
<actionGroup name="deleteEntitySecondaryGrid">
14+
<arguments>
15+
<argument name="name" type="string"/>
16+
<argument name="searchInput" type="string"/>
17+
</arguments>
18+
19+
<!-- search for the name -->
20+
<click stepKey="resetFilters" selector="{{AdminSecondaryGridSection.resetFilters}}"/>
21+
<fillField stepKey="fillIdentifier" selector="{{searchInput}}" userInput="{{name}}"/>
22+
<click stepKey="searchForName" selector="{{AdminSecondaryGridSection.searchButton}}"/>
23+
<click stepKey="clickResult" selector="{{AdminSecondaryGridSection.firstRow}}"/>
24+
<waitForPageLoad stepKey="waitForTaxRateLoad"/>
25+
26+
<!-- delete the rule -->
27+
<click stepKey="clickDelete" selector="{{AdminStoresMainActionsSection.deleteButton}}"/>
28+
<click stepKey="clickOk" selector="{{AdminConfirmationModalSection.ok}}"/>
29+
<see stepKey="seeSuccess" selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="deleted"/>
30+
</actionGroup>
31+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
11+
<section name="AdminSecondaryGridSection">
12+
<element name="resetFilters" type="button" selector="[title='Reset Filter']"/>
13+
<element name="taxIdentifierSearch" type="input" selector=".col-code .admin__control-text"/>
14+
<element name="searchButton" type="input" selector=".admin__filter-actions [title='Search']"/>
15+
<element name="firstRow" type="block" selector="tr[data-role='row']"/>
16+
</section>
17+
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/ActionGroup/AdminClearFiltersActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
<actionGroup name="AdminClearFiltersActionGroup">
1212
<amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="GoToCatalogProductPage"/>
1313
<waitForPageLoad stepKey="WaitForPageToLoad"/>
14-
<conditionalClick selector="{{AdminProductCatalog.clearFilters}}" dependentSelector="{{AdminProductCatalog.clearFilters}}" visible="true" stepKey="ClickOnButtonToRemoveFiltersIfPresent"/>
14+
<conditionalClick selector="{{AdminProductFiltersSection.filtersClear}}" dependentSelector="{{AdminProductFiltersSection.filtersClear}}" visible="true" stepKey="ClickOnButtonToRemoveFiltersIfPresent"/>
1515
</actionGroup>
1616
</actionGroups>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/ActionGroup/BundleProductFilterActionGroup.xml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@
1010
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="BundleProductFilter">
1212
<!--Setting filter-->
13-
<amOnPage url="{{ProductCatalogPage.url}}" stepKey="GoToCatalogPage"/>
14-
<waitForPageLoad stepKey="WaitForPageToLoadFully"/>
15-
<click selector="{{AdminProductCatalog.clickOnFilter}}" stepKey="ClickOnFilter"/>
16-
<click selector="{{AdminProductCatalog.clickOnTypeDropDown}}" stepKey="ClickOnTypeDropDown"/>
17-
<click selector="{{AdminProductCatalog.clickOnBundleOption}}" stepKey="ClickOnBundleOption"/>
18-
<click selector="{{AdminProductCatalog.clickOnApplyFilters}}" stepKey="ClickOnApplyFilters"/>
13+
<!--Prereq: go to admin product catalog page-->
14+
<click selector="{{AdminProductFiltersSection.filter}}" stepKey="ClickOnFilter"/>
15+
<click selector="{{AdminProductFiltersSection.typeDropDown}}" stepKey="ClickOnTypeDropDown"/>
16+
<click selector="{{AdminProductFiltersSection.bundleOption}}" stepKey="ClickOnBundleOption"/>
17+
<click selector="{{AdminProductFiltersSection.applyFilters}}" stepKey="ClickOnApplyFilters"/>
1918
</actionGroup>
2019
</actionGroups>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/ActionGroup/CreateBundleProductActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="CreateBasicBundleProduct">
12+
<!--Prereq: Go to bundle product creation page-->
1213
<!--Product name and SKU-->
1314
<fillField selector="{{AdminProductFormBundleSection.productName}}" userInput="{{BundleProduct.name}}" stepKey="fillProductName"/>
1415
<fillField selector="{{AdminProductFormBundleSection.productSku}}" userInput="{{BundleProduct.sku}}" stepKey="fillProductSku"/>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/ActionGroup/EnableDisableProductActionGroup.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="AncillaryPrepBundleProduct">
12+
<!--Prereq: go to bundle product creation page-->
1213
<fillField selector="{{AdminProductFormBundleSection.productName}}" userInput="{{BundleProduct.name}}" stepKey="fillProductName"/>
1314
<fillField selector="{{AdminProductFormBundleSection.productSku}}" userInput="{{BundleProduct.sku}}" stepKey="fillProductSku"/>
1415

@@ -20,11 +21,6 @@
2021
<fillField userInput="{{BundleProduct.urlKey}}" selector="{{AdminProductFormBundleSection.urlKey}}" stepKey="FillsinSEOlinkExtension"/>
2122
</actionGroup>
2223

23-
<!--Enable/Disable Product Toggle-->
24-
<actionGroup name="EnableDisableProduct">
25-
<click stepKey="ClickOnEnableDisableToggle" selector="{{AdminProductFormBundleSection.enableDisableToggle}}"/>
26-
</actionGroup>
27-
2824
<!--Edit existing product by searching in product catalog-->
2925
<actionGroup name="FindProductToEdit">
3026
<amOnPage url="{{ProductCatalogPage.url}}" stepKey="GoToProductCatalog"/>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Data/ProductData.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
<data key="default_quantity2">20</data>
2727
<data key="set">4</data>
2828
<data key="type">bundle</data>
29+
<data key="fixedPrice">10</data>
30+
<data key="fixedPriceFormatted">$10.00</data>
31+
<data key="defaultAttribute">Default</data>
2932
</entity>
3033
<entity name="ApiBundleProduct" type="product2">
3134
<data key="name" unique="suffix">Api Bundle Product</data>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Section/AdminProductCatalogSection.xml

Lines changed: 0 additions & 23 deletions
This file was deleted.

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Section/AdminProductFormBundleSection.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838
<element name="contentDropDownIfNotShowing" type="button" selector="//div[@data-index='content']//div[contains(@class, '_hide')]"/>
3939
<element name="longDescription" type="input" selector="#product_form_description"/>
4040
<element name="shortDescription" type="input" selector="#product_form_short_description"/>
41+
<!--BundleOptinsDropDown-->
42+
<element name="bundleOptionsDropDown" type="button" selector="div[data-index='bundle-items']" timeout="30"/>
43+
<!--AddingAnOption-->
44+
<element name="addOptions" type="button" selector="//tr[@data-repeat-index='0']//td[4]" timeout="30"/>
4145
<!--SEODropdownTab-->
4246
<element name="seoDropdown" type="button" selector="//div[@data-index='search-engine-optimization']"/>
4347
<element name="seoDependent" type="button" selector="//div[@data-index='search-engine-optimization']//div[contains(@class, '_show')]"/>
@@ -50,5 +54,11 @@
5054
<!--ClickOnFirstProductInCatalog-->
5155
<element name="firstCatalogProduct" type="button" selector="//table[@class='data-grid data-grid-draggable']/tbody/tr[@class='data-row']/td[4]"/>
5256
<element name="bundledItems" type="block" selector="[data-index=bundle-items]"/>
57+
<element name="dynamicPrice" type="button" selector="//div[@data-index='price_type']//div[@data-role='switcher']" timeout="30"/>
58+
<element name="priceField" type="input" selector="//div[@data-index='price']//input"/>
59+
<element name="listedBundleItem" type="text" selector="//tr[@data-repeat-index='0']//div"/>
60+
<element name="listedBundleItem2" type="text" selector="//tr[@data-repeat-index='2']//div"/>
61+
<!--FirstProductOption-->
62+
<element name="firstProductOption" type="checkbox" selector="//div[@class='admin__data-grid-outer-wrap']//tr[@data-repeat-index='0']//input[@type='checkbox']"/>
5363
</section>
5464
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Section/BundleStorefrontSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@
1818
<element name="shortDescriptionText" type="text" selector="//div[@class='product attribute overview']" timeout="30"/>
1919
<!--NameOfProductOnProductPage-->
2020
<element name="bundleProductName" type="text" selector="//*[@id='maincontent']//span[@itemprop='name']"/>
21+
<!--PageNotFoundErrorMessage-->
22+
<element name="pageNotFound" type="text" selector="//h1[@class='page-title']//span[contains(., 'Whoops, our bad...')]"/>
2123
</section>
2224
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Section/StorefrontBundledSection.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,9 @@
1414
<element name="addToCartConfigured" type="button" selector="#product-addtocart-button" timeout="30"/>
1515
<element name="updateCart" type="button" selector="#product-updatecart-button" timeout="30"/>
1616
<element name="configuredPrice" type="block" selector=".price-configured_price .price"/>
17+
<element name="fixedPricing" type="text" selector="//div[@class='price-box price-final_price']//span[@id]//..//span[contains(text(),'{{var1}}')]" parameterized="true"/>
18+
<element name="customizeProduct" type="button" selector="//*[@id='bundle-slide']"/>
19+
<element name="customizableBundleItemOption" type="text" selector="//div[@class='field choice'][1]//input[@type='checkbox']"/>
20+
<element name="customizableBundleItemOption2" type="text" selector="//div[@class='field choice'][2]//input[@type='checkbox']"/>
1721
</section>
1822
</sections>

0 commit comments

Comments
 (0)