Skip to content

Commit

Permalink
Merge pull request #8776 from magento-gl/ACQE-6178_mainline_PR_develo…
Browse files Browse the repository at this point in the history
…pment

[Bengals Team] Test Fixes and Automation Tasks
  • Loading branch information
2 parents ba25af8 + df930d3 commit a98a64a
Show file tree
Hide file tree
Showing 14 changed files with 103 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
</arguments>

<!-- search for the name -->
<waitForElementClickable selector="{{AdminSecondaryGridSection.resetFilters}}" stepKey="waitForFiltersReset"/>
<click stepKey="resetFilters" selector="{{AdminSecondaryGridSection.resetFilters}}"/>
<fillField stepKey="fillIdentifier" selector="{{searchInput}}" userInput="{{name}}"/>
<click stepKey="searchForName" selector="{{AdminSecondaryGridSection.searchButton}}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@

<!--Place the order-->
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToShoppingCartPage"/>
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectPaymentMethod"/>
<actionGroup ref="PlaceOrderWithLoggedUserActionGroup" stepKey="placeOrder">
<argument name="shippingMethod" value="Flat Rate"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
<waitForElement selector="{{CheckoutPaymentSection.placeOrder}}" time="30" stepKey="waitForPlaceOrderButton"/>
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder"/>
<waitForPageLoad stepKey="waitForCheckout"/>
<see selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="waitForLoadSuccessPage"/>
<waitForText selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="waitForLoadSuccessPage"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@
<actionGroup ref="OpenStoreFrontCheckoutShippingPageActionGroup" stepKey="goToShippingPage"/>
<!-- Guest checkout -->
<actionGroup ref="FillGuestCheckoutShippingAddressFormActionGroup" stepKey="goToShippingAndFillDetails">
<argument name="customerAddress" value="US_CA_Address"/>
<argument name="customerAddress" value="US_Address_CA"/>
</actionGroup>
<selectOption selector="{{CheckoutShippingSection.region}}" userInput="California" stepKey="fillStateField"/>
<waitForPageLoad stepKey="waitForChangeAfterStateLoad"/>
<actionGroup ref="CheckForFlatRateShippingMethodAvailabilityActionGroup" stepKey="verifyShippingMethod"/>
<actionGroup ref="StorefrontCheckForFlatRateShippingMethodAvailabilityActionGroup" stepKey="verifyShippingMethod"/>
<waitForElementVisible selector="{{CheckoutShippingMethodsSection.shippingMethodDhlLabel}}" stepKey="waitForDHLLabelVisible"/>
<waitForElementNotVisible selector="{{CheckoutShippingMethodsSection.shippingMethodDhlWorldWideExpress}}" stepKey="waitForDHLPriceNotVisibleAfterStateChange"/>
<waitForElementNotVisible selector="{{CheckoutShippingMethodsSection.shippingMethodFreeShipping}}" stepKey="waitForFreeShippingNotVisible"/>
<waitForElementNotVisible selector="{{CheckoutShippingMethodsSection.shippingMethodFreeShippingLabel}}" stepKey="waitForFreeShippingLabelNotVisible"/>
<!-- Change country value -->
<selectOption selector="{{CheckoutShippingSection.country}}" userInput="Afghanistan" stepKey="fillCountryField"/>
<waitForPageLoad stepKey="waitForChangeAfterCountryLoad"/>
<actionGroup ref="CheckForFlatRateShippingMethodAvailabilityActionGroup" stepKey="verifyShippingMethodAfterCountryChange"/>
<actionGroup ref="StorefrontCheckForFlatRateShippingMethodAvailabilityActionGroup" stepKey="verifyShippingMethodAfterCountryChange"/>
<waitForElementVisible selector="{{CheckoutShippingMethodsSection.shippingMethodFreeShipping}}" stepKey="waitForFreeShippingVisibleAfterCountryChange"/>
<waitForElementVisible selector="{{CheckoutShippingMethodsSection.shippingMethodFreeShippingLabel}}" stepKey="waitForFreeShippingLabelVisibleAfterCountryChange"/>
<waitForElementVisible selector="{{CheckoutShippingMethodsSection.shippingMethodDhlLabel}}" stepKey="waitForDHLLabelVisibleAfterCountryChange"/>
Expand All @@ -79,10 +79,10 @@
<selectOption selector="{{CheckoutShippingSection.country}}" userInput="United Kingdom" stepKey="fillCountry"/>
<fillField selector="{{CheckoutShippingSection.city}}" userInput="London" stepKey="fillCity"/>
<fillField selector="{{CheckoutShippingSection.postcode}}" userInput="N14 5JP" stepKey="fillPostcode"/>
<actionGroup ref="CheckForFlatRateShippingMethodAvailabilityActionGroup" stepKey="verifyShippingMethodAfterNewData"/>
<actionGroup ref="StorefrontCheckForFlatRateShippingMethodAvailabilityActionGroup" stepKey="verifyShippingMethodAfterNewData"/>
<waitForElementNotVisible selector="{{CheckoutShippingMethodsSection.shippingMethodFreeShipping}}" stepKey="waitForFreeShippingVisibleAfterNewFormData"/>
<waitForElementNotVisible selector="{{CheckoutShippingMethodsSection.shippingMethodFreeShippingLabel}}" stepKey="waitForFreeShippingLabelVisibleAfterNewFormData"/>
<actionGroup ref="VerifyDHLShippingMethodIsVisibilityActionGroup" stepKey="dhlShippingVisibility"/>
<actionGroup ref="StorefrontVerifyDHLShippingMethodIsVisibilityActionGroup" stepKey="dhlShippingVisibility"/>
<after>
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
<deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/>
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Config/Test/Mftf/Data/DHLConfigData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<entity name="AdminCarriersDHLId">
<data key="path">carriers/dhl/id</data>
<data key="scope_id">1</data>
<data key="value">EvgeniyUSA</data>
<data key="value">{{_CREDS.magento/carriers_dhl_access_id}}</data>
</entity>
<entity name="AdminCarriersDHLPassword">
<data key="path">carriers/dhl/password</data>
Expand All @@ -33,7 +33,7 @@
<entity name="AdminCarriersDHLAccount">
<data key="path">carriers/dhl/account</data>
<data key="scope_id">1</data>
<data key="value">965269748</data>
<data key="value">{{_CREDS.magento/carriers_dhl_account_number}}</data>
</entity>
<entity name="AdminCarriersDHLAllowedAllCountries">
<data key="path">carriers/dhl/sallowspecific</data>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?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="AdminExpandCurrencyOptionsActionGroup">
<waitForElementClickable selector="{{CurrencySetupSection.currencyOptions}}" stepKey="waitForCurrencyOptionsSectionToBecomeClickable"/>
<click selector="{{CurrencySetupSection.currencyOptions}}" stepKey="openCurrencyOptions"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?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="AdminNavigateToCurrencySetupPageActionGroup">
<amOnPage url="{{ConfigCurrencySetupPage.url}}" stepKey="navigateToConfigCurrencySetupPage1"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<!-- Set base currency -->
<actionGroup name="AdminSetDefaultCurrencyActionGroup" extends="AdminSaveConfigActionGroup">
<annotations>
<description>Admin uncheck default currency option.</description>
</annotations>
<arguments>
<argument name="currency" type="string"/>
</arguments>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?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="UpdateCurrencyRateForQuotesInStatusesOrderedAndClosedTest">
<annotations>
<stories value="Currency Rates"/>
<title value="Update currency rate for quotes in statuses Ordered and Closed"/>
<description value="Update currency rate for created quotes in statuses Ordered and Closed"/>
<severity value="MAJOR"/>
<testCaseId value="B2B-1506"/>
</annotations>
<before>
<!--Login to backend-->
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
<!--Setup currencies -->
<actionGroup ref="AdminNavigateToCurrencySetupPageActionGroup" stepKey="navigateToConfigCurrencySetupPage"/>
<actionGroup ref="AdminExpandCurrencyOptionsActionGroup" stepKey="openCurrencyOptions"/>
<actionGroup ref="AdminSetBaseCurrencyActionGroup" stepKey="setBaseCurrencyUSD">
<argument name="currency" value="US Dollar"/>
</actionGroup>
<selectOption selector="{{CurrencySetupSection.baseCurrency}}" userInput="US Dollar" stepKey="setBaseCurrencyField"/>
<uncheckOption selector="{{CurrencySetupSection.allowcurrenciescheckbox}}" stepKey="UnCheckUseDefaultOptionForAllowedCurrencies"/>
<selectOption selector="{{CurrencySetupSection.allowCurrencies}}" parameterArray="['Euro', 'US Dollar']" stepKey="selectCurrencies"/>
<scrollToTopOfPage stepKey="scrollToTopOfPage" />
<actionGroup ref="AdminSetDefaultCurrencyActionGroup" stepKey="setDefaultCurrencyEUR">
<argument name="currency" value="Euro"/>
</actionGroup>
<actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveStoreConfiguration"/>
<!--<click stepKey="saveConfigs" selector="{{AdminConfigSection.saveButton}}"/>-->
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessage"/>
<waitForText selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeSuccessMessage"/>
<!--Go to Configuration -> Currency Setup-->
<actionGroup ref="AdminOpenCurrencyRatesPageActionGroup" stepKey="gotToCurrencyRatesPage"/>
<actionGroup ref="AdminImportCurrencyRatesActionGroup" stepKey="importCurrencyRates"/>
</before>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

<amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnStorefrontPage"/>
<waitForPageLoad stepKey="waitForNavigateToCustomersPageLoad"/>
<waitForElementClickable selector="{{StorefrontPanelHeaderSection.createAnAccountLink}}" stepKey="waitForCreateAnAccountLink"/>
<click stepKey="clickOnCreateAccountLink" selector="{{StorefrontPanelHeaderSection.createAnAccountLink}}"/>
<fillField stepKey="fillFirstName" userInput="{{customer.firstname}}" selector="{{StorefrontCustomerCreateFormSection.firstnameField}}"/>
<fillField stepKey="fillLastName" userInput="{{customer.lastname}}" selector="{{StorefrontCustomerCreateFormSection.lastnameField}}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@
<click selector="{{AdminCurrencySymbolsGridSection.saveCurrencySymbols}}" stepKey="clickSaveCurrencySymbols"/>
<waitForPageLoad stepKey="waitForSave"/>
<see selector="{{AdminMessagesSection.success}}" userInput="{{AdminSaveCurrencySymbolMessageData.success}}" stepKey="seeSuccessMessage"/>

<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
<argument name="tags" value="config full_page"/>
</actionGroup>
<!--Redirect back to admin dashboard screen-->
<actionGroup ref="AdminReloadDashboardDataActionGroup" stepKey="reloadDashboardData" />
<!--Verify there is a space between custom currency symbol respective amounts on admin dashboard-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@
<element name="orderId" type="text" selector="|Order # (\d+)|"/>
<element name="orderStatusUnderViewM" type="text" selector="//td//div[contains(text(),'{{product}}')]/../..//td[@class='col-status' and contains(text(),'{{status}}')]" parameterized="true" timeout="30"/>
<element name="orderStatusUnderViewS" type="text" selector="//tr//div[contains(text(),'{{product}}')]/../../..//td[@class='col-status' and contains(text(),'{{status}}')]" parameterized="true" timeout="30"/>
<element name="rateValue" type="text" selector="//table[contains(@class, 'order-information-table')]//th[contains(text(), 'rate:')]/following-sibling::td"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
</actionGroup>
<!-- Login as Admin -->
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
<actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="navigateToTaxRatesPage"/>
<actionGroup ref="AdminDeleteMultipleTaxRatesActionGroup" stepKey="deleteAllNonDefaultTaxRates"/>
<!-- change tax classes configuration -->
<actionGroup ref="SetTaxClassForShippingActionGroup" stepKey="setTaxClass"/>
<actionGroup ref="AdminChangeTaxAndFptConfigActionGroup" stepKey="changeTaxConfigs"/>
Expand Down
20 changes: 9 additions & 11 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a98a64a

Please sign in to comment.