Skip to content

Commit

Permalink
Showing 127 changed files with 3,980 additions and 268 deletions.
2 changes: 1 addition & 1 deletion dev/tests/acceptance/.env.example
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@ MAGENTO_ADMIN_PASSWORD=
#TESTS_MODULE_PATH=

#*** These properties impact the modules loaded into MFTF, you can point to your own full path, or a custom set of modules located with the core set
#MODULE_WHITELIST=
MODULE_WHITELIST=Magento_Framework,Magento_ConfigurableProductWishlist,Magento_ConfigurableProductCatalogSearch
#CUSTOM_MODULE_PATHS=

#*** Bool property which allows the user to toggle debug output during test execution
1 change: 1 addition & 0 deletions dev/tests/acceptance/composer.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "magento/magento2ce-functional-tests",
"description": "Magento 2 (Open Source) Functional Tests",
"type": "project",
"version": "1.0.0-dev",
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?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">
<!-- Check the category page -->
<actionGroup name="StorefrontCheckCategoryActionGroup">
<arguments>
<argument name="category"/>
<argument name="productCount"/>
</arguments>
<seeInCurrentUrl url="/{{category.custom_attributes[url_key]}}.html" stepKey="checkUrl"/>
<seeInTitle userInput="{{category.name}}" stepKey="assertCategoryNameInTitle"/>
<see userInput="{{category.name}}" selector="{{StorefrontCategoryMainSection.CategoryTitle}}" stepKey="assertCategoryName"/>
<see userInput="{{productCount}}" selector="{{StorefrontCategoryMainSection.productCount}} span" stepKey="assertProductCount"/>
</actionGroup>

<!-- Check simple product on the category page -->
<actionGroup name="StorefrontCheckCategorySimpleProduct">
<arguments>
<argument name="product"/>
</arguments>
<seeElement selector="{{StorefrontCategoryProductSection.ProductTitleByName(product.name)}}" stepKey="assertProductName"/>
<see userInput="${{product.price}}.00" selector="{{StorefrontCategoryProductSection.ProductPriceByName(product.name)}}" stepKey="AssertProductPrice"/>
<!-- @TODO: MAGETWO-80272 Move to Magento_Checkout -->
<moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(product.name)}}" stepKey="moveMouseOverProduct" />
<!-- @TODO: MAGETWO-80272 Move to Magento_Checkout -->
<seeElement selector="{{StorefrontCategoryProductSection.ProductAddToCartByName(product.name)}}" stepKey="AssertAddToCart" />
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?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">
<!-- Add Product to Compare from the category page and check message -->
<actionGroup name="StorefrontAddCategoryProductToCompareActionGroup">
<arguments>
<argument name="productVar"/>
</arguments>
<moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(productVar.name)}}" stepKey="moveMouseOverProduct" />
<click selector="{{StorefrontCategoryProductSection.ProductAddToCompareByName(productVar.name)}}" stepKey="clickAddProductToCompare"/>
<waitForElement selector="{{StorefrontMessagesSection.success}}" time="30" stepKey="waitForAddCategoryProductToCompareSuccessMessage"/>
<see selector="{{StorefrontMessagesSection.success}}" userInput="You added product {{productVar.name}} to the comparison list." stepKey="assertAddCategoryProductToCompareSuccessMessage"/>
</actionGroup>

<!-- Add Product to Compare from the product page and check message -->
<actionGroup name="StorefrontAddProductToCompareActionGroup">
<arguments>
<argument name="productVar"/>
</arguments>
<click selector="{{StorefrontProductInfoMainSection.productAddToCompare}}" stepKey="clickAddToCompare" />
<waitForElement selector="{{StorefrontMessagesSection.success}}" time="30" stepKey="waitForAddProductToCompareSuccessMessage"/>
<see selector="{{StorefrontMessagesSection.success}}" userInput="You added product {{productVar.name}} to the comparison list." stepKey="assertAddProductToCompareSuccessMessage"/>
</actionGroup>

<!-- Check the product in compare sidebar -->
<actionGroup name="StorefrontCheckCompareSidebarProductActionGroup">
<arguments>
<argument name="productVar"/>
</arguments>
<waitForElement selector="{{StorefrontComparisonSidebarSection.ProductTitleByName(productVar.name)}}" stepKey="waitForProduct"/>
</actionGroup>

<!-- Open and check comparison page -->
<actionGroup name="StorefrontOpenAndCheckComparisionActionGroup">
<click selector="{{StorefrontComparisonSidebarSection.Compare}}" stepKey="clickCompare"/>
<waitForLoadingMaskToDisappear stepKey="waitForComparePageloaded" />
<seeInCurrentUrl url="{{StorefrontProductComparePage.url}}" stepKey="checkUrl"/>
<seeInTitle userInput="Products Comparison List" stepKey="assertPageNameInTitle"/>
<see userInput="Compare Products" selector="{{StorefrontProductCompareMainSection.PageName}}" stepKey="assertPageName"/>
</actionGroup>

<!-- Check the simple product in comparison page -->
<actionGroup name="StorefrontCheckCompareSimpleProductActionGroup">
<arguments>
<argument name="productVar"/>
</arguments>
<seeElement selector="{{StorefrontProductCompareMainSection.ProductLinkByName(productVar.name)}}" stepKey="assertProductName"/>
<see userInput="${{productVar.price}}.00" selector="{{StorefrontProductCompareMainSection.ProductPriceByName(productVar.name)}}" stepKey="assertProductPrice"/>
<see userInput="{{productVar.sku}}" selector="{{StorefrontProductCompareMainSection.ProductAttributeByCodeAndProductName('SKU', productVar.name)}}" stepKey="assertProductPrice"/>
<!-- @TODO: MAGETWO-80272 Move to Magento_Checkout -->
<seeElement selector="{{StorefrontProductCompareMainSection.ProductAddToCartByName(productVar.name)}}" stepKey="assertProductAddToCart"/>
</actionGroup>

<!-- Clear the compare list -->
<actionGroup name="StorefrontClearCompareActionGroup">
<waitForElementVisible selector="{{StorefrontComparisonSidebarSection.ClearAll}}" time="30" stepKey="waitForClearAll"/>
<click selector="{{StorefrontComparisonSidebarSection.ClearAll}}" stepKey="clickClearAll"/>
<waitForElementVisible selector="{{ModalConfirmationSection.OkButton}}" time="30" stepKey="waitForClearOk"/>
<scrollTo selector="{{ModalConfirmationSection.OkButton}}" stepKey="scrollToClearOk"/>
<click selector="{{ModalConfirmationSection.OkButton}}" stepKey="clickClearOk"/>
<waitForElement selector="{{StorefrontMessagesSection.message('You cleared the comparison list.')}}" time="30" stepKey="AssertMessageCleared"/>
<waitForElement selector="{{StorefrontComparisonSidebarSection.NoItemsMessage}}" time="30" stepKey="assertNoItems"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?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">
<!-- Check the simple product on the product page -->
<actionGroup name="StorefrontCheckSimpleProduct">
<arguments>
<argument name="product"/>
</arguments>
<seeInCurrentUrl url="/{{product.custom_attributes[url_key]}}.html" stepKey="checkUrl"/>
<seeInTitle userInput="{{product.name}}" stepKey="AssertProductNameInTitle"/>
<see userInput="{{product.name}}" selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="assertProductName"/>
<see userInput="{{product.sku}}" selector="{{StorefrontProductInfoMainSection.productSku}}" stepKey="assertProductSku"/>
<see userInput="${{product.price}}.00" selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="assertProductPrice"/>
<see userInput="IN STOCK" selector="{{StorefrontProductInfoMainSection.productStockStatus}}" stepKey="assertInStock"/>
<seeElement selector="{{StorefrontProductInfoMainSection.AddToCart}}" stepKey="assertAddToCart" />
<see userInput="{{product.custom_attributes[description]}}" selector="{{StorefrontProductInfoMainSection.productDescription}}" stepKey="assertProductDescription"/>
<see userInput="{{product.custom_attributes[short_description]}}" selector="{{StorefrontProductInfoMainSection.productShortDescription}}" stepKey="assertProductShortDescription"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -13,6 +13,10 @@
<data key="name_lwr" unique="suffix">simplecategory</data>
<data key="is_active">true</data>
</entity>
<entity name="ApiCategory" type="category">
<data key="name" unique="suffix">Api Category</data>
<data key="is_active">true</data>
</entity>
<entity name="SimpleSubCategory" type="category">
<data key="name" unique="suffix">SimpleSubCategory</data>
<data key="name_lwr" unique="suffix">simplesubcategory</data>
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
/**
* Copyright © Magento, Inc. All rights reserved.
@@ -9,10 +8,9 @@

<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">
<entity name="_defaultCoupon" type="coupon">
<data key="rule_id">4</data>
<data key="code">FREESHIPPING123</data>
<data key="times_used">0</data>
<data key="is_primary">false</data>
<!-- @TODO: Get rid off this workaround and its usages after MQE-498 is implemented -->
<entity name="CONST" type="CONST">
<data key="one">1</data>
<data key="two">2</data>
</entity>
</entities>
Original file line number Diff line number Diff line change
@@ -23,7 +23,13 @@
<entity name="CustomAttributeProductAttribute" type="custom_attribute">
<var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/>
<var key="value" entityKey="value" entityType="ProductAttributeOption"/>
<data key="value">test product attribute</data>
<data key="attribute_code">test_product_attribute</data>
</entity>
<entity name="ApiProductDescription" type="custom_attribute">
<data key="attribute_code">description</data>
<data key="value" unique="suffix">API Product Description</data>
</entity>
<entity name="ApiProductShortDescription" type="custom_attribute">
<data key="attribute_code">short_description</data>
<data key="value" unique="suffix">API Product Short Description</data>
</entity>
</entities>
Loading

0 comments on commit 3d7b063

Please sign in to comment.