Skip to content

Commit

Permalink
Merge pull request #105 from magento-pangolin/MC-4459
Browse files Browse the repository at this point in the history
MC-4459
  • Loading branch information
tomreece authored Jun 13, 2019
2 parents 861e63c + 39c7aa6 commit cb30dd8
Show file tree
Hide file tree
Showing 32 changed files with 1,667 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,10 @@
<waitForPageLoad time="60" stepKey="WaitForProductSave1"/>
<see userInput="You saved the product." stepKey="seeSaveConfirmation"/>
</actionGroup>
<actionGroup name="ProductSetAdvancedTierFixedPricing" extends="ProductSetAdvancedPricing">
<remove keyForRemoval="selectProductTierPricePriceInput"/>
<fillField selector="{{AdminProductFormAdvancedPricingSection.productTierPriceFixedPriceInput('0')}}" userInput="{{amount}}" stepKey="selectProductTierPricePriceInput" after="selectProductTierPriceValueType"/>
</actionGroup>

<!--Assert text in Related, Up-Sell or Cross-Sell section in Admin Product page-->
<actionGroup name="AssertTextInAdminProductRelatedUpSellCrossSellSection">
Expand Down
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">
<actionGroup name="CheckoutFillEstimateShippingAndTaxActionGroup">
<arguments>
<argument name="address" defaultValue="US_Address_TX" type="entity"/>
</arguments>
<conditionalClick selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" dependentSelector="{{CheckoutCartSummarySection.estimateShippingAndTaxSummary}}" visible="false" stepKey="openShippingDetails"/>
<selectOption selector="{{CheckoutCartSummarySection.country}}" userInput="{{address.country_id}}" stepKey="selectCountry"/>
<selectOption selector="{{CheckoutCartSummarySection.stateProvince}}" userInput="{{address.state}}" stepKey="selectState"/>
<waitForElementVisible selector="{{CheckoutCartSummarySection.postcode}}" stepKey="waitForPostCodeVisible"/>
<fillField selector="{{CheckoutCartSummarySection.postcode}}" userInput="{{address.postcode}}" stepKey="selectPostCode"/>
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDiappear"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?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="FillGuestCheckoutShippingAddressFormActionGroup">
<arguments>
<argument name="customer" defaultValue="Simple_US_Customer" type="entity"/>
<argument name="customerAddress" defaultValue="US_Address_TX" type="entity"/>
</arguments>
<fillField selector="{{CheckoutShippingSection.emailAddress}}" userInput="{{customer.email}}" stepKey="setCustomerEmail"/>
<fillField selector="{{CheckoutShippingSection.firstName}}" userInput="{{customer.firstname}}" stepKey="SetCustomerFirstName"/>
<fillField selector="{{CheckoutShippingSection.lastName}}" userInput="{{customer.lastname}}" stepKey="SetCustomerLastName"/>
<fillField selector="{{CheckoutShippingSection.street}}" userInput="{{customerAddress.street[0]}}" stepKey="SetCustomerStreetAddress"/>
<fillField selector="{{CheckoutShippingSection.city}}" userInput="{{customerAddress.city}}" stepKey="SetCustomerCity"/>
<fillField selector="{{CheckoutShippingSection.postcode}}" userInput="{{customerAddress.postcode}}" stepKey="SetCustomerZipCode"/>
<fillField selector="{{CheckoutShippingSection.telephone}}" userInput="{{customerAddress.telephone}}" stepKey="SetCustomerPhoneNumber"/>
</actionGroup>
<actionGroup name="FillGuestCheckoutShippingAddressWithCountryActionGroup" extends="FillGuestCheckoutShippingAddressFormActionGroup">
<selectOption selector="{{CheckoutShippingSection.country}}" userInput="{{customerAddress.country_id}}" stepKey="selectCustomerCountry" after="SetCustomerCity"/>
</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">
<actionGroup name="StorefrontCustomerSignInPopUpActionGroup">
<arguments>
<argument name="customerEmail" type="string"/>
<argument name="customerPwd" type="string"/>
</arguments>
<waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.email}}" stepKey="waitForElementToBeVisible"/>
<fillField stepKey="fillEmail" userInput="{{customerEmail}}" selector="{{StorefrontCustomerSignInPopupFormSection.email}}"/>
<fillField stepKey="fillPassword" userInput="{{customerPwd}}" selector="{{StorefrontCustomerSignInPopupFormSection.password}}"/>
<click stepKey="clickSignInAccountButton" selector="{{StorefrontCustomerSignInPopupFormSection.signIn}}"/>
<waitForPageLoad stepKey="waitForPageToLoad"/>
</actionGroup>
</actionGroups>
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.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StorefrontRegisterCustomerAfterCheckoutActionGroup">
<arguments>
<argument name="customerPassword" defaultValue="UKCustomer.password" type="string"/>
</arguments>
<click selector="{{CheckoutSuccessRegisterSection.createAccountButton}}" stepKey="clickOnCreateAnAccountButton"/>
<fillField selector="{{StorefrontCustomerAccountInformationSection.newPassword}}" userInput="{{customerPassword}}" stepKey="fillPassword"/>
<fillField selector="{{StorefrontCustomerAccountInformationSection.confirmNewPassword}}" userInput="{{customerPassword}}" stepKey="reconfirmPassword"/>
<click selector="{{StorefrontCustomerCreateFormSection.createAccountButton}}" stepKey="clickOnCreateAnAccount"/>
<seeElement selector="{{StorefrontCustomerMessagesSection.successMessage}}" stepKey="seeSuccessMessage1"/>
</actionGroup>
</actionGroups>
35 changes: 35 additions & 0 deletions app/code/Magento/Checkout/Test/Mftf/Data/CheckoutConfigData.xml
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.
*/
-->

<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
<entity name="EnableGuestCheckoutConfigData">
<data key="path">checkout/options/guest_checkout</data>
<data key="scope_id">0</data>
<data key="label">Yes</data>
<data key="value">1</data>
</entity>
<entity name="DisableGuestCheckoutConfigData">
<data key="path">checkout/options/guest_checkout</data>
<data key="scope_id">0</data>
<data key="label">No</data>
<data key="value">0</data>
</entity>
<entity name="EnableHttpsFrontendConfigData">
<data key="path">web/secure/use_in_frontend</data>
<data key="scope_id">0</data>
<data key="label">Yes</data>
<data key="value">1</data>
</entity>
<entity name="DisableHttpsFrontendConfigData">
<data key="path">web/secure/use_in_frontend</data>
<data key="scope_id">0</data>
<data key="label">No</data>
<data key="value">0</data>
</entity>
</entities>
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<element name="countryParameterized" type="select" selector="select[name='country_id'] > option:nth-child({{var}})" timeout="10" parameterized="true"/>
<element name="estimateShippingAndTax" type="text" selector="#block-shipping-heading" timeout="5"/>
<element name="flatRateShippingMethod" type="input" selector="#s_method_flatrate_flatrate" timeout="30"/>
<element name="estimateShippingAndTaxSummary" type="text" selector="#block-summary"/>
<element name="shippingMethodLabel" type="text" selector="#co-shipping-method-form dl dt span"/>
<element name="shippingMethodElementId" type="radio" selector="#s_method_{{carrierCode}}_{{methodCode}}" parameterized="true"/>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
<element name="productOptionsByProductItemPrice" type="text" selector="//div[@class='product-item-inner']//div[@class='subtotal']//span[@class='price'][contains(.,'{{price}}')]//ancestor::div[@class='product-item-details']//div[@class='product options']" parameterized="true"/>
<element name="productOptionsActiveByProductItemPrice" type="text" selector="//div[@class='subtotal']//span[@class='price'][contains(.,'{{price}}')]//ancestor::div[@class='product-item-details']//div[@class='product options active']" parameterized="true"/>
<element name="productItemPriceByName" type="text" selector="//div[@class='product-item-details'][contains(., '{{ProductName}}')]//span[@class='price']" parameterized="true"/>

<element name="tax" type="text" selector="[data-th='Tax'] span" timeout="30"/>
<element name="taxPercentage" type="text" selector=".totals-tax-details .mark"/>
<element name="orderSummaryTotalIncluding" type="text" selector="//tr[@class='grand totals incl']//span[@class='price']" />
Expand All @@ -56,6 +55,8 @@
<element name="addressBook" type="button" selector="//a[text()='Address Book']"/>
<element name="noQuotes" type="text" selector=".no-quotes-block"/>
<element name="paymentMethodByName" type="text" selector="//*[@id='checkout-payment-method-load']//*[contains(@class, 'payment-group')]//label[normalize-space(.)='{{var1}}']" parameterized="true"/>
<element name="bankTransfer" type="radio" selector="#banktransfer"/>
<element name="billingAddressNotSameBankTransferCheckbox" type="checkbox" selector="#billing-address-same-as-shipping-banktransfer"/>
<element name="billingAddressSelectShared" type="select" selector=".checkout-billing-address select[name='billing_address_id']"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
<element name="stateInput" type="input" selector="input[name=region]"/>
<element name="regionOptions" type="select" selector="select[name=region_id] option"/>
<element name="editActiveAddress" type="button" selector="//div[@class='shipping-address-item selected-item']//span[text()='Edit']" timeout="30"/>
<element name="loginButton" type="button" selector=".action.login" timeout="30"/>
<element name="loginButton" type="button" selector="//button[@data-action='checkout-method-login']" timeout="30"/>
<element name="editActiveAddressButton" type="button" selector="//div[contains(@class,'payment-method _active')]//button[contains(@class,'action action-edit-address')]" timeout="30"/>
<element name="emailAddress" type="input" selector="#checkout-customer-email"/>
<element name="shipHereButton" type="button" selector="//div[text()='{{street}}']/button[@class='action action-select-shipping-item']" parameterized="true" timeout="30"/>
<element name="textFieldAttrRequireMessage" type="text" selector="//input[@name='custom_attributes[{{attribute}}]']/ancestor::div[contains(@class, 'control')]/div/span" parameterized="true" timeout="30"/>
<element name="textFieldAttribute" type="input" selector="[name*='custom_attributes[{{attribute}}]']" parameterized="true" timeout="30"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
<element name="continueShoppingButton" type="button" selector=".action.primary.continue" timeout="30"/>
<element name="createAnAccount" type="button" selector="[data-bind*=&quot;i18n: 'Create an Account'&quot;]" timeout="30"/>
<element name="printLink" type="button" selector=".print" timeout="30"/>
<element name="orderNumberWithoutLink" type="text" selector="//div[contains(@class, 'checkout-success')]//p/span"/>
</section>
</sections>
Loading

0 comments on commit cb30dd8

Please sign in to comment.