Skip to content

Commit c1ff2c8

Browse files
committed
Merge remote-tracking branch 'github-magento/MC-18215' into EPAM-PR-83
2 parents ec8ea07 + d7acc36 commit c1ff2c8

File tree

12 files changed

+319
-1
lines changed

12 files changed

+319
-1
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="AdminGeneralSetStoreNameConfigData">
12+
<data key="path">general/store_information/name</data>
13+
<data key="value">New Store Information</data>
14+
</entity>
15+
<entity name="AdminGeneralSetStorePhoneConfigData">
16+
<data key="path">general/store_information/phone</data>
17+
</entity>
18+
<entity name="AdminGeneralSetCountryConfigData">
19+
<data key="path">general/store_information/country_id</data>
20+
</entity>
21+
<entity name="AdminGeneralSetCityConfigData">
22+
<data key="path">general/store_information/city</data>
23+
</entity>
24+
<entity name="AdminGeneralSetPostcodeConfigData">
25+
<data key="path">general/store_information/postcode</data>
26+
</entity>
27+
<entity name="AdminGeneralSetStreetAddressConfigData">
28+
<data key="path">general/store_information/street_line1</data>
29+
</entity>
30+
<entity name="AdminGeneralSetStreetAddress2ConfigData">
31+
<data key="path">general/store_information/street_line2</data>
32+
</entity>
33+
</entities>

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductActionGroup.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@
108108
<fillField selector="{{AdminProductFormSection.productName}}" userInput="{{product.name}}" stepKey="fillProductName"/>
109109
<fillField selector="{{AdminProductFormSection.productSku}}" userInput="{{product.sku}}" stepKey="fillProductSku"/>
110110
</actionGroup>
111+
<actionGroup name="AdminFillProductCountryOfManufactureActionGroup">
112+
<arguments>
113+
<argument name="countryId" type="string" defaultValue="US"/>
114+
</arguments>
115+
<selectOption selector="{{AdminProductFormBundleSection.countryOfManufactureDropDown}}" userInput="{{countryId}}" stepKey="countryOfManufactureDropDown"/>
116+
</actionGroup>
111117

112118
<!--Check that required fields are actually required-->
113119
<actionGroup name="checkRequiredFieldsInProductForm">

app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
<fillField selector="{{CheckoutShippingSection.postcode}}" userInput="{{customerAddressVar.postcode}}" stepKey="enterPostcode"/>
6565
<fillField selector="{{CheckoutShippingSection.telephone}}" userInput="{{customerAddressVar.telephone}}" stepKey="enterTelephone"/>
6666
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/>
67+
<waitForElement selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('shippingMethod')}}" stepKey="waitForShippingMethod"/>
6768
<click selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('shippingMethod')}}" stepKey="selectShippingMethod"/>
6869
<waitForElement selector="{{CheckoutShippingSection.next}}" time="30" stepKey="waitForNextButton"/>
6970
<click selector="{{CheckoutShippingSection.next}}" stepKey="clickNext"/>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="AdminGeneralSetVatNumberConfigData">
12+
<data key="path">general/store_information/merchant_vat_number</data>
13+
<data key="value">111607872</data>
14+
</entity>
15+
</entities>
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
9+
<entity name="AdminFedexEnableForCheckoutConfigData" type="fedex_config">
10+
<data key="path">carriers/fedex/active</data>
11+
<data key="value">1</data>
12+
<data key="label">Yes</data>
13+
</entity>
14+
<entity name="AdminFedexEnableSandboxModeConfigData" type="fedex_config">
15+
<data key="path">carriers/fedex/sandbox_mode</data>
16+
<data key="value">1</data>
17+
<data key="label">Yes</data>
18+
</entity>
19+
<entity name="AdminFedexEnableDebugConfigData" type="fedex_config">
20+
<data key="path">carriers/fedex/debug</data>
21+
<data key="value">1</data>
22+
<data key="label">Yes</data>
23+
</entity>
24+
<entity name="AdminFedexEnableShowMethodConfigData" type="fedex_config">
25+
<data key="path">carriers/fedex/showmethod</data>
26+
<data key="value">1</data>
27+
<data key="label">Yes</data>
28+
</entity>
29+
<entity name="AdminFedexDisableShowMethodConfigData" type="fedex_config">
30+
<data key="path">carriers/fedex/showmethod</data>
31+
<data key="value">0</data>
32+
<data key="label">No</data>
33+
</entity>
34+
<entity name="AdminFedexDisableDebugConfigData" type="fedex_config">
35+
<data key="path">carriers/fedex/debug</data>
36+
<data key="value">0</data>
37+
<data key="label">No</data>
38+
</entity>
39+
<entity name="AdminFedexDisableSandboxModeConfigData" type="fedex_config">
40+
<data key="path">carriers/fedex/sandbox_mode</data>
41+
<data key="value">0</data>
42+
<data key="label">No</data>
43+
</entity>
44+
<entity name="AdminFedexDisableForCheckoutConfigData" type="fedex_config">
45+
<data key="path">carriers/fedex/active</data>
46+
<data key="value">0</data>
47+
<data key="label">No</data>
48+
</entity>
49+
</entities>
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminCreatingShippingLabelTest">
12+
<annotations>
13+
<features value="Fedex"/>
14+
<stories value="Shipping label"/>
15+
<title value="Creating shipping label"/>
16+
<description value="Creating shipping label"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-20287"/>
19+
<useCaseId value="MC-18215"/>
20+
<group value="shipping"/>
21+
<skip>
22+
<issueId value="MQE-1578"/>
23+
</skip>
24+
</annotations>
25+
<before>
26+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
27+
<!-- Create product -->
28+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
29+
<createData entity="SimpleProduct" stepKey="createProduct">
30+
<requiredEntity createDataKey="createCategory"/>
31+
</createData>
32+
<!--Set Fedex configs data-->
33+
<magentoCLI command="config:set {{AdminFedexEnableForCheckoutConfigData.path}} {{AdminFedexEnableForCheckoutConfigData.value}}" stepKey="enableCheckout"/>
34+
<magentoCLI command="config:set {{AdminFedexEnableSandboxModeConfigData.path}} {{AdminFedexEnableSandboxModeConfigData.value}}" stepKey="enableSandbox"/>
35+
<magentoCLI command="config:set {{AdminFedexEnableDebugConfigData.path}} {{AdminFedexEnableDebugConfigData.value}}" stepKey="enableDebug"/>
36+
<magentoCLI command="config:set {{AdminFedexEnableShowMethodConfigData.path}} {{AdminFedexEnableShowMethodConfigData.value}}" stepKey="enableShowMethod"/>
37+
<!--TODO: add fedex credentials-->
38+
<!--Set StoreInformation configs data-->
39+
<magentoCLI command="config:set {{AdminGeneralSetStoreNameConfigData.path}} '{{AdminGeneralSetStoreNameConfigData.value}}'" stepKey="setStoreInformationName"/>
40+
<magentoCLI command="config:set {{AdminGeneralSetStorePhoneConfigData.path}} {{DE_Address_Berlin_Not_Default_Address.telephone}}" stepKey="setStoreInformationPhone"/>
41+
<magentoCLI command="config:set {{AdminGeneralSetCountryConfigData.path}} {{DE_Address_Berlin_Not_Default_Address.country_id}}" stepKey="setStoreInformationCountry"/>
42+
<magentoCLI command="config:set {{AdminGeneralSetCityConfigData.path}} {{DE_Address_Berlin_Not_Default_Address.city}}" stepKey="setStoreInformationCity"/>
43+
<magentoCLI command="config:set {{AdminGeneralSetPostcodeConfigData.path}} {{DE_Address_Berlin_Not_Default_Address.postcode}}" stepKey="setStoreInformationPostcode"/>
44+
<magentoCLI command="config:set {{AdminGeneralSetStreetAddressConfigData.path}} '{{DE_Address_Berlin_Not_Default_Address.street[0]}}'" stepKey="setStoreInformationStreetAddress"/>
45+
<magentoCLI command="config:set {{AdminGeneralSetStreetAddress2ConfigData.path}} '{{US_Address_California.street[0]}}'" stepKey="setStoreInformationStreetAddress2"/>
46+
<magentoCLI command="config:set {{AdminGeneralSetVatNumberConfigData.path}} {{AdminGeneralSetVatNumberConfigData.value}}" stepKey="setStoreInformationVatNumber"/>
47+
<!--Set Shipping settings origin data-->
48+
<magentoCLI command="config:set {{AdminShippingSettingsOriginCountryConfigData.path}} {{DE_Address_Berlin_Not_Default_Address.country_id}}" stepKey="setOriginCountry"/>
49+
<magentoCLI command="config:set {{AdminShippingSettingsOriginCityConfigData.path}} {{DE_Address_Berlin_Not_Default_Address.city}}" stepKey="setOriginCity"/>
50+
<magentoCLI command="config:set {{AdminShippingSettingsOriginZipCodeConfigData.path}} {{DE_Address_Berlin_Not_Default_Address.postcode}}" stepKey="setOriginZipCode"/>
51+
<magentoCLI command="config:set {{AdminShippingSettingsOriginStreetAddressConfigData.path}} '{{DE_Address_Berlin_Not_Default_Address.street[0]}}'" stepKey="setOriginStreetAddress"/>
52+
<magentoCLI command="config:set {{AdminShippingSettingsOriginStreetAddress2ConfigData.path}} '{{US_Address_California.street[0]}}'" stepKey="setOriginStreetAddress2"/>
53+
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
54+
<magentoCLI command="cache:flush" stepKey="flushCache"/>
55+
</before>
56+
<after>
57+
<!--Reset configs-->
58+
<magentoCLI command="config:set {{AdminFedexDisableForCheckoutConfigData.path}} {{AdminFedexDisableForCheckoutConfigData.value}}" stepKey="disableCheckout"/>
59+
<magentoCLI command="config:set {{AdminFedexDisableSandboxModeConfigData.path}} {{AdminFedexDisableSandboxModeConfigData.value}}" stepKey="disableSandbox"/>
60+
<magentoCLI command="config:set {{AdminFedexDisableDebugConfigData.path}} {{AdminFedexDisableDebugConfigData.value}}" stepKey="disableDebug"/>
61+
<magentoCLI command="config:set {{AdminFedexDisableShowMethodConfigData.path}} {{AdminFedexDisableShowMethodConfigData.value}}" stepKey="disableShowMethod"/>
62+
<magentoCLI command="config:set {{AdminGeneralSetStoreNameConfigData.path}} ''" stepKey="setStoreInformationName"/>
63+
<magentoCLI command="config:set {{AdminGeneralSetStorePhoneConfigData.path}} ''" stepKey="setStoreInformationPhone"/>
64+
<magentoCLI command="config:set {{AdminGeneralSetCityConfigData.path}} ''" stepKey="setStoreInformationCity"/>
65+
<magentoCLI command="config:set {{AdminGeneralSetPostcodeConfigData.path}} ''" stepKey="setStoreInformationPostcode"/>
66+
<magentoCLI command="config:set {{AdminGeneralSetStreetAddressConfigData.path}} ''" stepKey="setStoreInformationStreetAddress"/>
67+
<magentoCLI command="config:set {{AdminGeneralSetStreetAddress2ConfigData.path}} ''" stepKey="setStoreInformationStreetAddress2"/>
68+
<magentoCLI command="config:set {{AdminGeneralSetVatNumberConfigData.path}} ''" stepKey="setStoreInformationVatNumber"/>
69+
<magentoCLI command="config:set {{AdminShippingSettingsOriginCityConfigData.path}} ''" stepKey="setOriginCity"/>
70+
<magentoCLI command="config:set {{AdminShippingSettingsOriginZipCodeConfigData.path}} ''" stepKey="setOriginZipCode"/>
71+
<magentoCLI command="config:set {{AdminShippingSettingsOriginStreetAddressConfigData.path}} ''" stepKey="setOriginStreetAddress"/>
72+
<magentoCLI command="config:set {{AdminShippingSettingsOriginStreetAddress2ConfigData.path}} ''" stepKey="setOriginStreetAddress2"/>
73+
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
74+
<magentoCLI command="cache:flush" stepKey="flushCache"/>
75+
<!--Delete created data-->
76+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
77+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
78+
<actionGroup ref="logout" stepKey="logout"/>
79+
</after>
80+
<!--Add country of manufacture to product-->
81+
<amOnPage url="{{AdminProductEditPage.url($$createProduct.id$$)}}" stepKey="amOnEditPage"/>
82+
<waitForPageLoad stepKey="waitForEditPage"/>
83+
<actionGroup ref="AdminFillProductCountryOfManufactureActionGroup" stepKey="fillCountryOfManufacture">
84+
<argument name="countryId" value="DE"/>
85+
</actionGroup>
86+
<actionGroup ref="saveProductForm" stepKey="saveSimpleProduct"/>
87+
<!--Place for order using FedEx shipping method-->
88+
<amOnPage url="{{StorefrontProductPage.url($$createProduct.custom_attributes[url_key]$$)}}" stepKey="amOnStorefrontProductPage"/>
89+
<actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="addProductToCart">
90+
<argument name="product" value="$$createProduct$$"/>
91+
<argument name="productCount" value="1"/>
92+
</actionGroup>
93+
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/>
94+
<actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="addAddress">
95+
<argument name="customerVar" value="Simple_US_Utah_Customer"/>
96+
<argument name="customerAddressVar" value="US_Address_California"/>
97+
<argument name="shippingMethod" value="Federal Express"/>
98+
</actionGroup>
99+
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectPaymentMethod"/>
100+
<actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="customerPlaceOrder">
101+
<argument name="orderNumberMessage" value="CONST.successGuestCheckoutOrderNumberMessage"/>
102+
<argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage"/>
103+
</actionGroup>
104+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/>
105+
<!--Open created order in admin-->
106+
<amOnPage url="{{AdminOrdersPage.url}}" stepKey="onOrdersPage"/>
107+
<actionGroup ref="searchAdminDataGridByKeyword" stepKey="searchOrder">
108+
<argument name="keyword" value="$grabOrderNumber"/>
109+
</actionGroup>
110+
<click selector="{{AdminOrdersGridSection.firstRow}}" stepKey="clickOrderRow"/>
111+
<!--Create Invoice-->
112+
<actionGroup ref="AdminCreateInvoiceActionGroup" stepKey="createInvoice"/>
113+
<!--Create shipping label-->
114+
<actionGroup ref="goToShipmentIntoOrder" stepKey="goToShipmentIntoOrder"/>
115+
<checkOption selector="{{AdminShipmentTotalSection.createShippingLabel}}" stepKey="checkCreateShippingLabel"/>
116+
<click selector="{{AdminShipmentMainActionsSection.submitShipment}}" stepKey="clickSubmitShipment"/>
117+
<actionGroup ref="AdminShipmentCreateShippingLabelActionGroup" stepKey="createPackage">
118+
<argument name="productName" value="$$createProduct.name$$"/>
119+
</actionGroup>
120+
<actionGroup ref="AdminGoToShipmentTabActionGroup" stepKey="goToShipmentTab"/>
121+
<click selector="{{AdminOrderShipmentsTabSection.viewGridRow('1')}}" stepKey="clickRowToViewShipment"/>
122+
<waitForPageLoad stepKey="waitForShipmentItemsSection"/>
123+
<seeElement selector="{{AdminShipmentTrackingInformationShippingSection.shippingInfoTable}}" stepKey="seeInformationTable"/>
124+
<seeElement selector="{{AdminShipmentTrackingInformationShippingSection.shippingNumber}}" stepKey="seeShippingNumberElement"/>
125+
<grabTextFrom selector="{{AdminShipmentTrackingInformationShippingSection.shippingMethod}}" stepKey="grabShippingMethod"/>
126+
<grabTextFrom selector="{{AdminShipmentTrackingInformationShippingSection.shippingMethodTitle}}" stepKey="grabShippingMethodTitle"/>
127+
<assertEquals actual="$grabShippingMethod" expectedType="string" expected="Federal Express" stepKey="assertShippingMethodIsFedEx"/>
128+
<assertEquals actual="$grabShippingMethodTitle" expectedType="string" expected="Federal Express" stepKey="assertShippingMethodTitleIsFedEx"/>
129+
</test>
130+
</tests>

app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminShipmentActionGroup.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,24 @@
6262
<seeInCurrentUrl url="{{AdminOrderDetailsPage.url}}" stepKey="seeViewOrderPageShipping"/>
6363
<see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="The shipment has been created." stepKey="seeShipmentCreateSuccess"/>
6464
</actionGroup>
65+
<actionGroup name="AdminShipmentCreateShippingLabelActionGroup">
66+
<arguments>
67+
<argument name="productName" type="string" defaultValue="{{SimpleProduct.name}}"/>
68+
</arguments>
69+
<waitForElementVisible selector="{{AdminShipmentCreatePackageMainSection.addProductsToPackage}}" stepKey="waitForAddProductElement"/>
70+
<click selector="{{AdminShipmentCreatePackageMainSection.addProductsToPackage}}" stepKey="clickAddProducts"/>
71+
<waitForElementVisible selector="{{AdminShipmentCreatePackageProductGridSection.concreteProductCheckbox('productName')}}" stepKey="waitForProductBeVisible"/>
72+
<checkOption selector="{{AdminShipmentCreatePackageProductGridSection.concreteProductCheckbox('productName')}}" stepKey="checkProductCheckbox"/>
73+
<waitForElementVisible selector="{{AdminShipmentCreatePackageMainSection.addSelectedProductToPackage}}" stepKey="waitForAddSelectedProductElement"/>
74+
<click selector="{{AdminShipmentCreatePackageMainSection.addSelectedProductToPackage}}" stepKey="clickAddSelectedProduct"/>
75+
<waitForElementNotVisible selector="{{AdminShipmentCreatePackageMainSection.saveButtonDisabled}}" stepKey="waitForBeEnabled"/>
76+
<click selector="{{AdminShipmentCreatePackageMainSection.save}}" stepKey="clickSave"/>
77+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskDisappear"/>
78+
<waitForPageLoad stepKey="waitForSaving"/>
79+
<see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="The shipment has been created. You created the shipping label." stepKey="seeShipmentCreateSuccess"/>
80+
</actionGroup>
81+
<actionGroup name="AdminGoToShipmentTabActionGroup">
82+
<click selector="{{AdminOrderDetailsOrderViewSection.shipments}}" stepKey="clickOrderShipmentsTab"/>
83+
<waitForLoadingMaskToDisappear stepKey="waitForShipmentTabLoad" after="clickOrderShipmentsTab"/>
84+
</actionGroup>
6585
</actionGroups>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="AdminShippingSettingsOriginCountryConfigData">
12+
<data key="path">shipping/origin/country_id</data>
13+
</entity>
14+
<entity name="AdminShippingSettingsOriginZipCodeConfigData">
15+
<data key="path">shipping/origin/postcode</data>
16+
</entity>
17+
<entity name="AdminShippingSettingsOriginCityConfigData">
18+
<data key="path">shipping/origin/city</data>
19+
</entity>
20+
<entity name="AdminShippingSettingsOriginStreetAddressConfigData">
21+
<data key="path">shipping/origin/street_line1</data>
22+
</entity>
23+
<entity name="AdminShippingSettingsOriginStreetAddress2ConfigData">
24+
<data key="path">shipping/origin/street_line2</data>
25+
</entity>
26+
</entities>

0 commit comments

Comments
 (0)