Skip to content

Commit

Permalink
Merge pull request #2717 from magento-pangolin/RE-develop-pr
Browse files Browse the repository at this point in the history
[pangolin] RE-develop functional tests

 - MC-244: Admin should be able to create a simple product using a custom attribute set
 - MC-288: Admin should be able to update existing attributes of child products of a configurable product
 - MC-290: Customer should be able to change chosen options for Bundle Product when clicking Edit button in Shopping Cart page
 - MC-168: Admin should be able to assign attributes to an attribute set
 - MC-189: Admin should be able to add images of different types and sizes to Simple Product
 - MC-291: Customer should be able to see chosen options for Bundle Product in Shopping Cart when Option Title is edited in Admin
 - MC-194: Admin should be able to unassign attributes from an attribute set
 - MC-168: Admin should be able to assign attributes to an attribute set
 - MC-225: Admin should be able to save and publish a bundle product
 - MC-215: Admin should be able to change a bundle product status to Enabled/Disabled
 - MQE-1063: Make MC-115 and MC-200 more robust
 - MQE-976: Tweak annotations for all existing tests
  • Loading branch information
okolesnyk authored Jun 20, 2018
2 parents e47b0d7 + 4933bb9 commit 9ff7742
Show file tree
Hide file tree
Showing 101 changed files with 1,500 additions and 156 deletions.
Binary file added dev/tests/acceptance/tests/_data/bmp.bmp
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dev/tests/acceptance/tests/_data/gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dev/tests/acceptance/tests/_data/ico.ico
Binary file not shown.
Binary file added dev/tests/acceptance/tests/_data/jpg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dev/tests/acceptance/tests/_data/large.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dev/tests/acceptance/tests/_data/medium.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dev/tests/acceptance/tests/_data/png.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dev/tests/acceptance/tests/_data/small.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions dev/tests/acceptance/tests/_data/svg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
<test name="AdminLoginTest">
<annotations>
<features value="Admin Login"/>
<features value="Backend"/>
<stories value="Login on the Admin Login page"/>
<title value="You should be able to log into the Magento Admin backend."/>
<description value="You should be able to log into the Magento Admin backend."/>
<title value="Admin should be able to log into the Magento Admin backend"/>
<description value="Admin should be able to log into the Magento Admin backend"/>
<severity value="CRITICAL"/>
<testCaseId value="MAGETWO-71572"/>
<group value="example"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminClearFiltersActionGroup">
<amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="GoToCatalogProductPage"/>
<waitForPageLoad stepKey="WaitForPageToLoad"/>
<conditionalClick selector="{{AdminProductCatalog.clearFilters}}" dependentSelector="{{AdminProductCatalog.clearFilters}}" visible="true" stepKey="ClickOnButtonToRemoveFiltersIfPresent"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
<actionGroup name="BundleProductFilter">
<!--Setting filter-->
<amOnPage url="{{ProductCatalogPage.url}}" stepKey="GoToCatalogPage"/>
<waitForPageLoad stepKey="WaitForPageToLoadFully"/>
<click selector="{{AdminProductCatalog.clickOnFilter}}" stepKey="ClickOnFilter"/>
<click selector="{{AdminProductCatalog.clickOnTypeDropDown}}" stepKey="ClickOnTypeDropDown"/>
<click selector="{{AdminProductCatalog.clickOnBundleOption}}" stepKey="ClickOnBundleOption"/>
<click selector="{{AdminProductCatalog.clickOnApplyFilters}}" stepKey="ClickOnApplyFilters"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
<actionGroup name="CreateBasicBundleProduct">
<!--Product name and SKU-->
<fillField selector="{{AdminProductFormBundleSection.productName}}" userInput="{{BundleProduct.name}}" stepKey="fillProductName"/>
<fillField selector="{{AdminProductFormBundleSection.productSku}}" userInput="{{BundleProduct.sku}}" stepKey="fillProductSku"/>

<!--Trigger SEO drop down-->
<conditionalClick selector="{{AdminProductFormBundleSection.seoDropdown}}" dependentSelector="{{AdminProductFormBundleSection.seoDependent}}" visible="false" stepKey="OpenDropDownIfClosed"/>
<waitForPageLoad stepKey="WaitForDropDownSEO"/>

<!--Fill URL input-->
<fillField userInput="{{BundleProduct.urlKey}}" selector="{{AdminProductFormBundleSection.urlKey}}" stepKey="FillsinSEOlinkExtension"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
<actionGroup name="AncillaryPrepBundleProduct">
<fillField selector="{{AdminProductFormBundleSection.productName}}" userInput="{{BundleProduct.name}}" stepKey="fillProductName"/>
<fillField selector="{{AdminProductFormBundleSection.productSku}}" userInput="{{BundleProduct.sku}}" stepKey="fillProductSku"/>

<!--Trigger SEO drop down-->
<conditionalClick selector="{{AdminProductFormBundleSection.seoDropdown}}" dependentSelector="{{AdminProductFormBundleSection.seoDependent}}" visible="false" stepKey="OpenDropDownIfClosed"/>
<waitForPageLoad stepKey="WaitForDropDownSEO"/>

<!--Fill URL input-->
<fillField userInput="{{BundleProduct.urlKey}}" selector="{{AdminProductFormBundleSection.urlKey}}" stepKey="FillsinSEOlinkExtension"/>
</actionGroup>

<!--Enable/Disable Product Toggle-->
<actionGroup name="EnableDisableProduct">
<click stepKey="ClickOnEnableDisableToggle" selector="{{AdminProductFormBundleSection.enableDisableToggle}}"/>
</actionGroup>

<!--Edit existing product by searching in product catalog-->
<actionGroup name="FindProductToEdit">
<amOnPage url="{{ProductCatalogPage.url}}" stepKey="GoToProductCatalog"/>
<waitForPageLoad stepKey="WaitForCatalogProductPageToLoad"/>
<fillField userInput="{{BundleProduct.name}}" selector="#fulltext" stepKey="EnterProductNameInSearch"/>
<click stepKey="ClickSearch" selector="{{AdminProductFormBundleSection.searchButton}}"/>
<click stepKey="ClickOnProduct" selector="{{AdminProductFormBundleSection.firstCatalogProduct}}"/>
<waitForPageLoad stepKey="WaitForProductEditPageToLoad"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,25 @@
-->

<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
<entity name="BundleProduct" type="product">
<data key="name" unique="suffix">BundleProduct</data>
<data key="name" unique="suffix">BundleProduct</data>
<data key="name2" unique="suffix">BundleProduct2</data>
<data key="sku" unique="suffix">bundleproduct</data>
<data key="sku2" unique="suffix">bundleproduct2</data>
<data key="type_id">bundle</data>
<data key="attribute_set_id">4</data>
<data key="optionTitle1">BundleOption</data>
<data key="optionInputType1">checkbox</data>
<data key="defaultQuantity">10</data>
<data key="status">1</data>
<data key="urlKey" unique="suffix">bundleproduct</data>
<data key="urlKey2" unique="suffix">bundleproduct2</data>
<data key="default_quantity1">10</data>
<data key="default_quantity2">20</data>
<data key="set">4</data>
<data key="type">bundle</data>
</entity>
<entity name="ApiBundleProduct" type="product2">
<data key="name" unique="suffix">Api Bundle Product</data>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
<page name="AdminCatalogProductPage" url="catalog/product/" area="admin" module="Magento_Bundle">
<section name="AdminCatalogProductSection"/>
</page>
</pages>
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
<page name="AdminProductCreatePage" url="catalog/product/new/set/{{set}}/type/{{type}}/" area="admin" module="Magento_Catalog" parameterized="true">
<section name="AdminProductFormBundleSection"/>
</page>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
<section name="AdminProductCatalog">
<element name="clickOnFilter" type="button" selector="//div[@class='data-grid-filters-action-wrap']/button" timeout="30"/>
<element name="clickOnTypeDropDown" type="multiselect" selector="//select[@name='type_id']" timeout="30"/>
<element name="clickOnBundleOption" type="multiselect" selector="//select[@name='type_id']/option[4]" timeout="30"/>
<element name="clickOnApplyFilters" type="button" selector="//button[@class='action-secondary']" timeout="30"/>
<element name="selectAllCheckBox" type="checkbox" selector="//div[@data-role='grid-wrapper']//label[@data-bind='attr: {for: ko.uid}']" timeout="30"/>
<element name="clickOnActions" type="button" selector="//div[@class='action-select-wrap']/button" timeout="30"/>
<element name="clickOnChangeStatus" type="multiselect" selector="//div[@class='action-menu-items']//li[2]" timeout="30"/>
<element name="clickOnDisable" type="multiselect" selector="//div[@class='action-menu-items']//ul[@class='action-submenu _active']//li[span='Disable']" timeout="30"/>
<element name="clickOnEnable" type="multiselect" selector="//div[@class='action-menu-items']//ul[@class='action-submenu _active']//li[span='Enable']" timeout="30"/>
<element name="clearFilters" type="button" selector="//div[@class='admin__data-grid-header']//button[@data-action='grid-filter-reset']" timeout="30"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-->

<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
<section name="AdminProductFormBundleSection">
<element name="bundleItemsToggle" type="button" selector="//span[text()='Bundle Items']"/>
<element name="shipmentType" type="select" selector=".admin__control-select[name='product[shipment_type]']"/>
Expand All @@ -21,5 +21,34 @@
<element name="bundleOptionXRequired" type="checkbox" selector="[name='bundle_options[bundle_options][{{x}}][required]']" parameterized="true"/>
<element name="bundleOptionXProductYQuantity" type="input" selector="[name='bundle_options[bundle_options][{{x}}][bundle_selections][{{y}}][selection_qty]']" parameterized="true"/>
<element name="addProductsToOption" type="button" selector="[data-index='modal_set']" timeout="30"/>
<!--Select"url Key"InputForm-->
<element name="urlKey" type="input" selector="//input[@name='product[url_key]']" timeout="30"/>
<!--AddSelectedProducts-->
<element name="addSelectedProducts" type="button" selector="//span[contains(text(),'Add Selected Products')]/ancestor::button" timeout="30"/>
<!--DefaultQuantities-->
<element name="defaultQuantity1" type="input" selector="//input[@name='bundle_options[bundle_options][0][bundle_selections][0][selection_qty]']" timeout="30"/>
<element name="defaultQuantity2" type="input" selector="//input[@name='bundle_options[bundle_options][0][bundle_selections][1][selection_qty]']" timeout="30"/>
<element name="productName" type="input" selector="//*[@name='product[name]']"/>
<element name="productSku" type="input" selector="//*[@name='product[sku]']"/>
<!--TestingForLocationOfOptions-->
<element name="bundleOptionSelector" type="button" selector="//*[@id='bundle-slide']/span"/>
<element name="bundleOptionSelection" type="button" selector="//div[@class='nested options-list']/div[2]/label[@class='label']"/>
<!--SelectorsForDescriptionCreationOnBundleProduct-->
<element name="contentDropDown" type="button" selector="div[data-index='content']" timeout="30"/>
<element name="contentDropDownIfNotShowing" type="button" selector="//div[@data-index='content']//div[contains(@class, '_hide')]"/>
<element name="longDescription" type="input" selector="#product_form_description"/>
<element name="shortDescription" type="input" selector="#product_form_short_description"/>
<!--SEODropdownTab-->
<element name="seoDropdown" type="button" selector="//div[@data-index='search-engine-optimization']"/>
<element name="seoDependent" type="button" selector="//div[@data-index='search-engine-optimization']//div[contains(@class, '_show')]"/>
<!--NameOfProductOnProductPage-->
<element name="bundleProductName" type="text" selector="//*[@id='maincontent']//span[@itemprop='name']"/>
<!--EnableDisableToggle-->
<element name="enableDisableToggle" type="button" selector="//*[@id='container']//input[@name='product[status]']/.." timeout="30"/>
<!--SearchButton-->
<element name="searchButton" type="button" selector="//div[@class='data-grid-search-control-wrap']//*[@type='button']" timeout="30"/>
<!--ClickOnFirstProductInCatalog-->
<element name="firstCatalogProduct" type="button" selector="//table[@class='data-grid data-grid-draggable']/tbody/tr[@class='data-row']/td[4]"/>
<element name="bundledItems" type="block" selector="[data-index=bundle-items]"/>
</section>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
<section name="BundleStorefrontSection">
<!--TestingForLocationOfOptions-->
<element name="bundleOptionSelector" type="button" selector="//*[@id='bundle-slide']/span"/>
<element name="bundleOptionSelection" type="button" selector="//div[@class='nested options-list']/div[2]/label[@class='label']"/>
<!--Description-->
<!--CE exclusively-->
<element name="longDescriptionText" type="text" selector="//*[@id='description']/div/div" timeout="30"/>
<element name="shortDescriptionText" type="text" selector="//div[@class='product attribute overview']" timeout="30"/>
<!--NameOfProductOnProductPage-->
<element name="bundleProductName" type="text" selector="//*[@id='maincontent']//span[@itemprop='name']"/>
</section>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
<section name="StorefrontBundledSection">
<element name="nthBundledOption" type="input" selector=".option:nth-of-type({{numOption}}) .choice:nth-of-type({{numOptionSelect}}) input" parameterized="true"/>
<element name="addToCart" type="button" selector="#bundle-slide" timeout="30"/>
<element name="addToCartConfigured" type="button" selector="#product-addtocart-button" timeout="30"/>
<element name="updateCart" type="button" selector="#product-updatecart-button" timeout="30"/>
<element name="configuredPrice" type="block" selector=".price-configured_price .price"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@

<!-- Add two bundle items -->
<conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems"/>
<!-- scrollTo before click to fix flaky failure -->
<scrollTo selector="{{AdminProductFormBundleSection.addOption}}" stepKey="scrollToAddOption"/>
<click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption3"/>
<waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" stepKey="waitForBundleOptions"/>
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="fillOptionTitle"/>
Expand Down
Loading

0 comments on commit 9ff7742

Please sign in to comment.