Skip to content

Commit

Permalink
Merge pull request magento#9457 from magento-gl/functional-test-mainl…
Browse files Browse the repository at this point in the history
…ine-deployment-ver3

[Bengals ] Functional Tests Mainline Test Deployment
  • Loading branch information
2 parents e586f40 + 784c1dd commit 971142b
Show file tree
Hide file tree
Showing 15 changed files with 176 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
<remove keyForRemoval="waitForPageLoad2"/>
<remove keyForRemoval="clickCheckbox"/>
<scrollTo selector="{{AdminEditRoleInfoSection.blockName('restrictedRole')}}" x="0" y="-120" stepKey="scrollToResourceElement" after="selectResourceAccessCustom"/>
<click stepKey="clickTFACheckbox" selector="{{AdminEditRoleInfoSection.checkboxByRole('Magento_TwoFactorAuth::tfa')}}" after="waitForTfaRole"/>
<scrollTo selector="{{AdminEditRoleInfoSection.checkboxByRole('Magento_User::acl_users')}}" stepKey="scrollToTwoFactor" after="clickContentBlockCheckbox"/>
<waitForElementClickable selector="{{AdminEditRoleInfoSection.checkboxByRole('Magento_TwoFactorAuth::tfa')}}" stepKey="waitForTwoFactorToBeClickable" after="waitForTfaRole"/>
<click selector="{{AdminEditRoleInfoSection.checkboxByRole('Magento_TwoFactorAuth::tfa')}}" stepKey="clickTFACheckbox"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2024 Adobe
* All Rights Reserved.
*/
-->
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand All @@ -14,5 +14,6 @@
<element name="dropdownSelectOption" type="select" selector="//div[@class='control']/select"/>
<element name="dropdownProductSelection" type="select" selector="//div[@class='control']/select/option[contains(.,'{{productName}}')]" parameterized="true"/>
<element name="customOptionField" type="select" selector="[class='input-text product-custom-option']"/>
<element name="bundleOption" type="text" selector="//*[@id='product-options-wrapper']//div[@class='control']//span[text()='{{productName}}']" parameterized="true"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<requiredEntity createDataKey="createCategory"/>
</createData>
<!-- Create SimpleProductwithPrice100 -->
<createData entity="SimpleProductQty100" stepKey="simpleProductOne">
<createData entity="ApiSimpleProduct" stepKey="simpleProductOne">
<requiredEntity createDataKey="createSubcategory"/>
</createData>
<!-- Go To Subcategory Page-->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2024 Adobe
* All Rights Reserved.
*/
-->

Expand Down Expand Up @@ -75,32 +75,36 @@
</after>
<!--Navigate to home page-->
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/>
<!--Search for word "5127S"-->
<!--Search for word "5127AB"-->
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="search1">
<argument name="phrase" value="5127S"/>
<argument name="phrase" value="5127AB"/>
</actionGroup>
<!--Assert that product1 is present in the search result-->
<actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeProduct1">
<comment userInput="BIC workaround" stepKey="seeProduct1"/>
<actionGroup ref="AssertStorefrontProductNameIsNotOnProductMainPageActionGroup" stepKey="dontSeeProduct1inAB">
<argument name="productName" value="$$product1.name$$"/>
</actionGroup>
<!--Assert that product2 is not present in the search result-->
<actionGroup ref="AssertStorefrontProductNameIsNotOnProductMainPageActionGroup" stepKey="dontSeeProduct2">
<argument name="productName" value="$$product2.name$$"/>
</actionGroup>
<!--Assert that product2 is not present in the search result-->
<actionGroup ref="AssertStorefrontProductNameIsNotOnProductMainPageActionGroup" stepKey="dontSeeProduct3">
<comment userInput="BIC workaround" stepKey="dontSeeProduct3"/>
<actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeProduct3inAB">
<argument name="productName" value="$$product3.name$$"/>
</actionGroup>
<!--Assert that product4 is present in the search result-->
<actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeProduct4">
<comment userInput="BIC workaround" stepKey="seeProduct4"/>
<actionGroup ref="AssertStorefrontProductNameIsNotOnProductMainPageActionGroup" stepKey="dontSeeProduct4inAB">
<argument name="productName" value="$$product4.name$$"/>
</actionGroup>
<!--Assert that product5 is not present in the search result-->
<actionGroup ref="AssertStorefrontProductNameIsNotOnProductMainPageActionGroup" stepKey="dontSeeProduct5">
<argument name="productName" value="$$product5.name$$"/>
</actionGroup>
<!--Assert that product6 is not present in the search result-->
<actionGroup ref="AssertStorefrontProductNameIsNotOnProductMainPageActionGroup" stepKey="dontSeeProduct6">
<comment userInput="BIC workaround" stepKey="dontSeeProduct6"/>
<actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeProduct6inAB">
<argument name="productName" value="$$product6.name$$"/>
</actionGroup>

Expand Down Expand Up @@ -163,4 +167,3 @@
</actionGroup>
</test>
</tests>

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2024 Adobe
* All Rights Reserved.
*/
-->

Expand All @@ -23,7 +23,7 @@
<magentoCLI stepKey="addDownloadableDomain" command="downloadable:domains:add static.magento.com"/>
<!-- Create category -->
<createData entity="_defaultCategory" stepKey="createCategory"/>

<!-- Create Configurable Product -->
<createData entity="ApiConfigurableProduct" stepKey="createConfigProduct">
<requiredEntity createDataKey="createCategory"/>
Expand Down Expand Up @@ -120,7 +120,6 @@
<argument name="indices" value=""/>
</actionGroup>
</after>

<!-- Add Simple Product to cart -->
<amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct.custom_attributes[url_key]$$)}}" stepKey="navigateToSimpleProductPage"/>
<waitForPageLoad stepKey="waitForSimpleProductPageLoad"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2024 Adobe
* All Rights Reserved.
*/
-->
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand All @@ -20,6 +20,15 @@
<before>
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/>
<actionGroup ref="AdminOpenShippingMethodsConfigPageActionGroup" stepKey="openShippingMethodConfigPage"/>
<actionGroup ref="AdminSwitchWebsiteActionGroup" stepKey="switchDefaultWebsite">
<argument name="website" value="_defaultWebsite"/>
</actionGroup>
<actionGroup ref="AdminChangeTableRatesShippingMethodStatusActionGroup" stepKey="enableTableRatesShippingMethodForDefaultWebsite">
<argument name="status" value="0"/>
</actionGroup>
<actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfigs"/>

<magentoCLI command="config:set {{EnablePaymentBankTransferConfigData.path}} {{EnablePaymentBankTransferConfigData.value}}" stepKey="enableBankTransferPayment"/>
<createData entity="SimpleProduct2" stepKey="simpleProduct">
<field key="price">50.00</field>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2024 Adobe
* All Rights Reserved.
*/
-->

Expand All @@ -19,6 +19,8 @@
<useCaseId value="MC-14824"/>
<group value="downloadable"/>
<group value="catalog"/>
<!-- Will be fixed in the scope of ACQE-7464 -->
<group value="pr_exclude"/>
</annotations>
<before>
<!-- Add downloadable domains -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2024 Adobe
* All Rights Reserved.
*/
-->

Expand All @@ -18,6 +18,8 @@
<testCaseId value="MC-35639"/>
<group value="downloadable"/>
<group value="catalog"/>
<!-- Will be fixed in the scope of ACQE-7465 -->
<group value="pr_exclude"/>
</annotations>
<before>
<!-- Enable show out of stock product -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@
<!-- Check Use Default checkbox for Default Condition and Active -->
<checkOption selector="{{AdminShippingMethodTableRatesSection.carriersTableRateConditionName}}" stepKey="enableUseDefaultCondition"/>
<checkOption selector="{{AdminShippingMethodTableRatesSection.enabledUseSystemValue}}" stepKey="enableUseDefaultActive"/>
<actionGroup ref="AdminSwitchWebsiteActionGroup" stepKey="AdminSwitchStoreView">
<argument name="website" value="_defaultWebsite"/>
</actionGroup>
<actionGroup ref="AdminChangeTableRatesShippingMethodStatusActionGroup" stepKey="disableTableRatesShippingMethod">
<argument name="status" value="0"/>
</actionGroup>
<actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfigs"/>
<!-- Log out -->
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/>
<waitForPageLoad stepKey="waitForPageLoad1"/>
<!-- Because of in-product messaging in Payment Services extension, Paypal config is within the Additional Payment Solutions we need to uncollapse -->
<conditionalClick selector="{{OtherPayPalPaymentsConfigSection.expandedTab(countryCode)}}" stepKey="clickPayPalTabConfigure" dependentSelector="{{PayPalExpressCheckoutConfigSection.configureBtn(countryCode)}}" visible="false"/>
<conditionalClick selector="{{OtherPayPalPaymentsConfigSection.expandTab(countryCode)}}" stepKey="clickPayPalTabConfigure" dependentSelector="{{PayPalExpressCheckoutConfigSection.configureBtn(countryCode)}}" visible="false"/>
<click selector="{{PayPalExpressCheckoutConfigSection.configureBtn(countryCode)}}" stepKey="clickPayPalConfigureBtn"/>
<selectOption selector="{{PayPalExpressCheckoutConfigSection.enablePayLater(countryCode)}}" userInput="Yes" stepKey="enablePayLater"/>
<waitForText selector="{{PayPalExpressCheckoutConfigSection.verifyPaylaterText(countryCode)}}" userInput="Advertise PayPal Pay Later" stepKey="verifyAdvertisePayPalPayLaterText"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2024 Adobe
* All Rights Reserved.
*/
-->

Expand All @@ -11,5 +11,6 @@
<section name="AdminShipmentMainActionsSection">
<element name="submitShipment" type="button" selector="button.action-default.save.submit-button" timeout="60"/>
<element name="notifyCustomerByEmail" type="checkbox" selector="input#history_notify"/>
<element name="printShippingLabelButton" type="button" selector="//span[text()='Print Shipping Label']"/>
</section>
</sections>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright 2024 Adobe
* All Rights Reserved.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminPrintShippingLabelForFedexShipmentTest">
<annotations>
<stories value="Print Shipping label"/>
<title value="Admin Should be Able to print Shipping label"/>
<description value="Admin Print Shipping Labels from Actions dropdown from the FedEx submitted shipment"/>
<severity value="MAJOR"/>
<testCaseId value="AC-2832"/>
<group value="pr_exclude"/>
<group value="3rd_party_integration"/>
</annotations>
<before>
<!-- Create category -->
<createData entity="_defaultCategory" stepKey="createCategory"/>
<!-- Simple product is created -->
<createData entity="SimpleProductWithWeight" stepKey="createProduct">
<requiredEntity createDataKey="createCategory"/>
</createData>
<!-- US Customer is created -->
<createData entity="Simple_US_Customer_CA" stepKey="createCustomer"/>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
<actionGroup ref="AdminEnableFedExConfigurationActionGroup" stepKey="enableFedEx"/>
<!--Set US Shipping settings origin data-->
<actionGroup ref="AdminSetShippingOriginConfigActionGroup" stepKey="setShippingOriginConfigurationData">
<argument name="country" value="United States"/>
<argument name="state" value="California"/>
<argument name="postcode" value="90001"/>
</actionGroup>
<actionGroup ref="AdminSetShippingOriginOtherConfigActionGroup" stepKey="setShippingOriginOtherConfigurationData"/>
<!--Go to configuration general page-->
<actionGroup ref="NavigateToConfigurationGeneralPageActionGroup" stepKey="navigateToConfigurationGeneralPage"/>
<actionGroup ref="SelectEuropeanUnionCountryActionGroup" stepKey="setEuropeanUnionCountry">
<argument name="countries" value="EuropeanCountry"/>
</actionGroup>
<conditionalClick selector="{{StoreConfigSection.StoreInformation}}" dependentSelector="{{StoreConfigSection.CheckIfTabExpand}}" stepKey="checkIfTabOpen" visible="true"/>
<fillField selector="{{StoreConfigSection.storeName}}" userInput="Test" stepKey="fillStoreName" />
<fillField selector="{{StoreConfigSection.storePhoneNumber}}" userInput="9876543210" stepKey="fillStorePhone" />
<click selector="{{StoreConfigSection.Save}}" stepKey="saveConfig"/>
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
<argument name="tags" value="config full_page"/>
</actionGroup>
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="runIndexCronJob">
<argument name="indices" value="cataloginventory_stock"/>
</actionGroup>
<!-- Login to StoreFront -->
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="storefrontCustomerLogin">
<argument name="Customer" value="$$createCustomer$$"/>
</actionGroup>
</before>
<after>
<!-- Reset shipping origin -->
<actionGroup ref="AdminResetShippingOriginConfigurationActionGroup" stepKey="ResetCaliforniaShippingOrigin"/>
<magentoCLI command="config:set {{AdminFedexEnableForCheckoutConfigData.path}} 0" stepKey="disableCheckout"/>
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
<!-- Delete category -->
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>
<!-- Add product to cart -->
<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addSimpleProductToCart">
<argument name="product" value="$$createProduct$$"/>
</actionGroup>
<!-- Go to Checkout Page -->
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="goToCheckout"/>
<waitForElementClickable selector="{{CheckoutShippingMethodsSection.smartPostShippingMethod}}" stepKey="waitForSelectFedexShippingMethod"/>
<click selector="{{CheckoutShippingMethodsSection.smartPostShippingMethod}}" stepKey="selectFedexShippingMethod"/>
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="clickNext"/>
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyPayment"/>
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickPlaceOrder"/>
<!-- I see order successful Page -->
<actionGroup ref="AssertStorefrontCheckoutSuccessActionGroup" stepKey="assertOrderSuccess"/>
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="orderNumber"/>
<!--Open created order in admin-->
<actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrderGridById">
<argument name="orderId" value="$orderNumber"/>
</actionGroup>
<actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/>
<!--Create order invoice-->
<actionGroup ref="StartCreateInvoiceFromOrderPageActionGroup" stepKey="startInvoice"/>
<actionGroup ref="SubmitInvoiceActionGroup" stepKey="submitInvoice"/>
<!--Create shipping label-->
<actionGroup ref="GoToShipmentIntoOrderActionGroup" stepKey="goToShipmentIntoOrder"/>
<waitForElementVisible selector="{{AdminShipmentTotalSection.createShippingLabel}}" stepKey="waitForCreateShippingLabel"/>
<checkOption selector="{{AdminShipmentTotalSection.createShippingLabel}}" stepKey="checkCreateShippingLabel"/>
<waitForElementClickable selector="{{AdminShipmentMainActionsSection.submitShipment}}" stepKey="waitForSubmitShipment"/>
<click selector="{{AdminShipmentMainActionsSection.submitShipment}}" stepKey="clickSubmitShipment"/>
<actionGroup ref="AdminShipmentCreateShippingLabelActionGroup" stepKey="createPackage">
<argument name="productName" value="$$createProduct.name$$"/>
</actionGroup>
<!-- Print shipping Label -->
<actionGroup ref="FilterShipmentGridByOrderIdActionGroup" stepKey="filterShipmentGridByOrderId">
<argument name="orderId" value="$orderNumber"/>
</actionGroup>
<waitForElementClickable selector="{{AdminShipmentGridSection.firstRow}}" stepKey="waitForShipmentRow"/>
<click selector="{{AdminShipmentGridSection.firstRow}}" stepKey="openCreatedShipment"/>
<waitForPageLoad stepKey="waitForShipmentDetailsPageToLoad"/>
<waitForElementClickable selector="{{AdminShipmentMainActionsSection.printShippingLabelButton}}" stepKey="waitForPrintShippingButton"/>
<click selector="{{AdminShipmentMainActionsSection.printShippingLabelButton}}" stepKey="clickOnPrintShippingButton"/>
</test>
</tests>
Loading

0 comments on commit 971142b

Please sign in to comment.