Skip to content

Commit

Permalink
Merge pull request #3804 from magento-pangolin/mtf-eol-pr
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBKozan authored Mar 1, 2019
2 parents 062662d + 5b2dc82 commit 1514eeb
Show file tree
Hide file tree
Showing 78 changed files with 2,085 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,18 @@
<click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveCategory"/>
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="assertSuccessMessage"/>
</actionGroup>

<actionGroup name="OpenCategoryFromCategoryTree">
<arguments>
<argument name="category" type="string"/>
</arguments>
<amOnPage url="{{AdminCategoryPage.url}}" stepKey="openAdminCategoryIndexPage"/>
<waitForPageLoad stepKey="waitForCategoryPageToLoad"/>
<click selector="{{AdminCategorySidebarTreeSection.expandAll}}" stepKey="clickOnExpandTree"/>
<waitForPageLoad stepKey="waitForCategoryToLoad"/>
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree(category)}}" stepKey="selectCategory"/>
<waitForPageLoad stepKey="waitForPageToLoad"/>
<waitForElementVisible selector="{{AdminCategoryContentSection.categoryPageTitle}}" stepKey="waitForCategoryTitle"/>
</actionGroup>
<actionGroup name="AdminAssignProductToCategory">
<arguments>
<argument name="productId" type="string"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,4 +272,20 @@
<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/>
<waitForPageLoad stepKey="waitForGridLoad"/>
</actionGroup>
<!--Filter and select the the product -->
<actionGroup name="filterAndSelectProduct">
<arguments>
<argument name="productSku" type="string"/>
</arguments>
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage"/>
<waitForPageLoad stepKey="waitForProductIndexPageToLoad"/>
<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/>
<click selector="{{AdminProductGridFilterSection.filters}}" stepKey="openProductFilters"/>
<fillField selector="{{AdminProductGridFilterSection.skuFilter}}" userInput="{{productSku}}" stepKey="fillProductSkuFilter"/>
<click selector="{{AdminProductGridFilterSection.applyFilters}}" stepKey="clickApplyFilters"/>
<waitForElementNotVisible selector="{{AdminProductGridSection.loadingMask}}" stepKey="waitForFilteredGridLoad" time="30"/>
<click stepKey="openSelectedProduct" selector="{{AdminProductGridSection.productRowBySku(productSku)}}"/>
<waitForPageLoad stepKey="waitForProductToLoad"/>
<waitForElementVisible selector="{{AdminHeaderSection.pageTitle}}" stepKey="waitForProductTitle"/>
</actionGroup>
</actionGroups>
17 changes: 17 additions & 0 deletions app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -852,4 +852,21 @@
<data key="attributeGroupId">13</data>
<data key="sortOrder">0</data>
</entity>
<entity name="simpleProductDefault" type="product">
<data key="sku" unique="suffix">sku_simple_product_</data>
<data key="type_id">simple</data>
<data key="attribute_set_id">4</data>
<data key="visibility">4</data>
<data key="name" unique="suffix">Simple Product </data>
<data key="price">560</data>
<data key="urlKey" unique="suffix">simple-product-</data>
<data key="status">1</data>
<data key="quantity">25</data>
<data key="weight">1</data>
<data key="product_has_weight">1</data>
<data key="is_in_stock">1</data>
<data key="tax_class_id">2</data>
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
<requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity>
</entity>
</entities>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.z
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="ClearShippingAddressActionGroup">
<clearField selector="{{CheckoutShippingSection.firstName}}" stepKey="clearFieldFirstName"/>
<clearField selector="{{CheckoutShippingSection.company}}" stepKey="clearFieldCompany"/>
<clearField selector="{{CheckoutShippingSection.street}}" stepKey="clearFieldStreetAddress"/>
<clearField selector="{{CheckoutShippingSection.city}}" stepKey="clearFieldCityName"/>
<selectOption selector="{{CheckoutShippingSection.region}}" userInput="" stepKey="clearFieldRegion"/>
<clearField selector="{{CheckoutShippingSection.postcode}}" stepKey="clearFieldZip"/>
<selectOption selector="{{CheckoutShippingSection.country}}" userInput="" stepKey="clearFieldCounty"/>
<clearField selector="{{CheckoutShippingSection.telephone}}" stepKey="clearFieldPhoneNumber"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?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="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="FillShippingAddressOneStreetActionGroup">
<arguments>
<argument name="address" type="entity"/>
</arguments>
<fillField stepKey="fillFirstName" selector="{{CheckoutShippingSection.firstName}}" userInput="{{address.firstname}}"/>
<fillField stepKey="fillLastName" selector="{{CheckoutShippingSection.lastName}}" userInput="{{address.lastname}}"/>
<fillField stepKey="fillCompany" selector="{{CheckoutShippingSection.company}}" userInput="{{address.company}}"/>
<fillField stepKey="fillPhoneNumber" selector="{{CheckoutShippingSection.telephone}}" userInput="{{address.telephone}}"/>
<fillField stepKey="fillStreetAddress" selector="{{CheckoutShippingSection.street}}" userInput="{{address.street[0]}}"/>
<fillField stepKey="fillCityName" selector="{{CheckoutShippingSection.city}}" userInput="{{address.city}}"/>
<selectOption stepKey="selectCounty" selector="{{CheckoutShippingSection.country}}" userInput="{{address.country_id}}"/>
<fillField stepKey="fillZip" selector="{{CheckoutShippingSection.postcode}}" userInput="{{address.postcode}}"/>
</actionGroup>
</actionGroups>
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.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<!-- Add Product to Cart from the category page and check message -->
<actionGroup name="StorefrontAddSimpleProductToCartActionGroup">
<arguments>
<argument name="product" type="entity"/>
</arguments>
<moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(product.name)}}" stepKey="moveMouseOverProduct" />
<click selector="{{StorefrontCategoryProductSection.ProductAddToCartByName(product.name)}}" stepKey="clickAddToCart" />
<waitForElementVisible selector="{{StorefrontCategoryMainSection.SuccessMsg}}" stepKey="waitForSuccessMessage" />
<see selector="{{StorefrontCategoryMainSection.SuccessMsg}}" userInput="You added {{product.name}} to your shopping cart." stepKey="assertSuccessMessage"/>
</actionGroup>
</actionGroups>

Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<element name="country" type="select" selector="select[name=country_id]"/>
<element name="telephone" type="input" selector="input[name=telephone]"/>
<element name="saveAddress" type="button" selector=".action-save-address"/>
<element name="cancelChangeAddress" type="button" selector=".action-hide-popup"/>
<element name="updateAddress" type="button" selector=".action-update"/>
<element name="next" type="button" selector="button.button.action.continue.primary" timeout="30"/>
<element name="firstShippingMethod" type="radio" selector="//*[@id='checkout-shipping-method-load']//input[@class='radio']"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="EditShippingAddressOnePageCheckoutTest">
<annotations>
<features value="Checkout"/>
<stories value="Edit Shipping Address"/>
<title value="Edit Shipping Address on Checkout Page."/>
<description value="Edit Shipping Address on Checkout Page."/>
<severity value="MAJOR"/>
<testCaseId value="MC-14680"/>
<group value="shoppingCart"/>
<group value="mtf_migrated"/>
</annotations>
<before>
<createData entity="_defaultCategory" stepKey="createCategory"/>
<createData entity="simpleProductDefault" stepKey="createProduct">
<requiredEntity createDataKey="createCategory"/>
</createData>
<createData entity="Simple_US_Customer_NY" stepKey="createCustomer"/>
</before>
<after>
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
</after>

<!-- Go to Frontend as Customer -->
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin">
<argument name="Customer" value="$$createCustomer$$" />
</actionGroup>

<!-- Add product to cart -->
<amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="onCategoryPage"/>
<actionGroup ref="StorefrontAddSimpleProductToCartActionGroup" stepKey="addProductToCart">
<argument name="product" value="$$createProduct$$"/>
</actionGroup>

<!-- Go to checkout page -->
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="customerGoToCheckoutFromMinicart" />

<!-- *New Address* button on 1st checkout step -->
<click selector="{{CheckoutShippingSection.newAddressButton}}" stepKey="addNewAddress"/>

<!--Fill in required fields and click *Save address* button-->
<actionGroup ref="FillShippingAddressOneStreetActionGroup" stepKey="changeAddress">
<argument name="address" value="UK_Not_Default_Address"/>
</actionGroup>
<click selector="{{CheckoutShippingSection.saveAddress}}" stepKey="saveNewAddress"/>

<!--Select Shipping Rate-->
<scrollTo selector="{{CheckoutShippingMethodsSection.next}}" stepKey="scrollToShippingRate"/>
<click selector="{{CheckoutShippingMethodsSection.shippingMethodFlatRate}}" stepKey="selectShippingMethod"/>

<!-- Click *Edit* button for the new address -->
<click selector="{{CheckoutShippingSection.editActiveAddress}}" stepKey="editNewAddress"/>

<!--Remove values from required fields and click *Cancel* button -->
<actionGroup ref="ClearShippingAddressActionGroup" stepKey="clearRequiredFields"/>
<click selector="{{CheckoutShippingSection.cancelChangeAddress}}" stepKey="cancelEditAddress"/>

<!-- Go to *Next* -->
<scrollTo selector="{{CheckoutShippingMethodsSection.next}}" stepKey="scrollToButtonNext"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="goNext"/>

<!-- Select payment solution -->
<checkOption selector="{{CheckoutPaymentSection.billingAddressNotSameCheckbox}}" stepKey="selectPaymentSolution" />

<!--Refresh Page and Place Order-->
<reloadPage stepKey="reloadPage"/>
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="placeOrder"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,14 @@
<executeJS function="(el = document.querySelector('[name=\'identifier\']')) &amp;&amp; el['se' + 'tAt' + 'tribute']('data-value', el.value.split('-')[0]);" stepKey="setAttribute" />
<seeElement selector="{{CmsNewPagePageBasicFieldsSection.duplicatedURLKey(_duplicatedCMSPage.title)}}" stepKey="see"/>
</actionGroup>
<actionGroup name="AssertStoreFrontCMSPage">
<arguments>
<argument name="cmsTitle" type="string"/>
<argument name="cmsContent" type="string"/>
<argument name="cmsContentHeading" type="string"/>
</arguments>
<see selector="{{StorefrontCMSPageSection.title}}" userInput="{{cmsTitle}}" stepKey="seeTitle"/>
<see selector="{{StorefrontCMSPageSection.mainTitle}}" userInput="{{cmsContentHeading}}" stepKey="seeContentHeading"/>
<see selector="{{StorefrontCMSPageSection.mainContent}}" userInput="{{cmsContent}}" stepKey="seeContent"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
<element name="mainTitle" type="text" selector="#maincontent .page-title"/>
<element name="mainContent" type="text" selector="#maincontent"/>
<element name="footerTop" type="text" selector="footer.page-footer"/>
<element name="title" type="text" selector="//div[@class='breadcrumbs']//ul/li[@class='item cms_page']"/>
</section>
</sections>
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="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<!-- Check configurable product attribute options on the category page -->
<actionGroup name="SelectStorefrontSideBarAttributeOption">
<arguments>
<argument name="categoryName" type="string"/>
<argument name="attributeDefaultLabel" type="string"/>
</arguments>
<amOnPage url="{{categoryName}}" stepKey="openCategoryStoreFrontPage"/>
<waitForPageLoad stepKey="waitForCategoryPageToLoad"/>
<seeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName(categoryName)}}" stepKey="seeCategoryInFrontPage"/>
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName(categoryName)}}" stepKey="clickOnCategory"/>
<waitForPageLoad stepKey="waitForCategoryPageToLoad1"/>
<seeElement selector="{{StorefrontCategorySidebarSection.filterOptionsTitle(attributeDefaultLabel)}}" stepKey="seeAttributeOptionsTitle"/>
<click selector="{{StorefrontCategorySidebarSection.filterOptionsTitle(attributeDefaultLabel)}}" stepKey="clickAttributeOptions"/>
<waitForPageLoad stepKey="waitForPageToLoad"/>
</actionGroup>
</actionGroups>
Loading

0 comments on commit 1514eeb

Please sign in to comment.