Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/store-pickup' into MSI-2182-Sour…
Browse files Browse the repository at this point in the history
…ce-Entity-expansion-with-Pickup-Location-attributes
  • Loading branch information
novikor committed May 18, 2019
2 parents cefec09 + 58c66bf commit 73f3454
Show file tree
Hide file tree
Showing 216 changed files with 10,288 additions and 748 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
<argument name="filter_value" value="$$virtualProduct1.product[sku]$$"/>
</actionGroup>

<selectOption selector="{{AdminProductSourcesGrid.rowStatus('0')}}" userInput="In Stock" stepKey="selectStockStatus" />
<fillField selector="{{AdminProductSourcesGrid.rowQty('0')}}" userInput="10" stepKey="fillSourceQuantityField1"/>

<scrollToTopOfPage stepKey="scrollToTopOfPage1"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
<click selector="{{AdminGridColumnsControls.reset}}" stepKey="clickOnResetToRestoreDefaultColumns1"/>
<click selector="{{AdminProductGridSection.productGridXRowYColumnButton('1', '2')}}" stepKey="openProductEditPage1"/>

<selectOption selector="{{AdminProductSourcesGrid.rowStatus('0')}}" userInput="In Stock" stepKey="selectStockStatus" />
<fillField selector="{{AdminProductSourcesGrid.rowQty('0')}}" userInput="100" stepKey="fillSourceQuantityField1"/>

<scrollToTopOfPage stepKey="scrollToTopOfPage1"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@

<conditionalClick selector="{{AdminGridFilterControls.clearAll}}" dependentSelector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] .admin__data-grid-filters-current._show" visible="true" stepKey="clearTheFiltersIfPresent"/>
<waitForPageLoad stepKey="waitForPageLoad" time="5"/>
<scrollToTopOfPage stepKey="scrollToGridFilterControls"/>
<click selector="{{AdminGridFilterControls.filters}}" stepKey="clickOnFilters1"/>
<fillField userInput="{{filter_value}}" selector="{{filter_selector}}" stepKey="fillCodeField2"/>
<click selector="{{AdminGridFilterControls.applyFilters}}" stepKey="clickOnApplyFilters1"/>
Expand Down
11 changes: 11 additions & 0 deletions InventoryAdminUi/Test/Mftf/Data/MsiProductData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,15 @@
<data key="attribute_set_id">4</data>
<data key="visibility">4</data>
</entity>
<entity name="MsiDownloadableProduct" type="product">
<data key="name" unique="suffix">Downloadable MSI Product </data>
<data key="sku" unique="suffix">Downloadable-MSI-Product-</data>
<data key="type_id">downloadable</data>
<data key="price">100</data>
<data key="quantity">100</data>
<data key="urlKey" unique="suffix">Downloadable-MSI-Product-</data>
<data key="attribute_set_id">4</data>
<data key="visibility">4</data>
<requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity>
</entity>
</entities>
14 changes: 2 additions & 12 deletions InventoryAdminUi/Test/Mftf/Suite/msi-suite.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
xsi:noNamespaceSchemaLocation="../../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Suite/etc/suiteSchema.xsd">
<suite name="MSI_Single_Mode">
<before>
<magentoCLI stepKey="enableBackup" command = "config:set system/backup/functionality_enabled 1" />
<magentoCLI stepKey="dbBackup" command="setup:backup" arguments="--db" />
<magentoCLI stepKey="maintenanceDisable" command="maintenance:disable"/>
<magentoCLI stepKey="disableWYSYWYG" command="config:set cms/wysiwyg/enabled disabled"/>
<magentoCLI stepKey="enableStockManagement" command="config:set cataloginventory/item_options/manage_stock 1"/>
Expand All @@ -24,17 +22,14 @@
<group name="multi_mode"/>
</exclude>
<after>
<magentoCLI stepKey="dbRollback" command="setup:rollback" arguments="--db-file%3D%24%28ls%20..%2F..%2F..%2F..%2Fvar%2Fbackups%29%20-n" />
<magentoCLI stepKey="maintenanceDisable" command="maintenance:disable"/>
<magentoCLI stepKey="disableBackup" command = "config:set system/backup/functionality_enabled 0" />
</after>
</suite>
<suite name="MSI_Multi_Mode">
<before>
<magentoCLI stepKey="enableBackup" command = "config:set system/backup/functionality_enabled 1" />
<magentoCLI stepKey="dbBackup" command="setup:backup" arguments="--db" />
<magentoCLI stepKey="maintenanceDisable" command="maintenance:disable"/>
<magentoCLI stepKey="disableWYSYWYG" command="config:set cms/wysiwyg/enabled disabled"/>
<magentoCLI stepKey="enableStockManagement" command="config:set cataloginventory/item_options/manage_stock 1"/>
</before>
<include>
<group name="multi_mode"/>
Expand All @@ -44,17 +39,14 @@
<group name="single_mode"/>
</exclude>
<after>
<magentoCLI stepKey="dbRollback" command="setup:rollback" arguments="--db-file%3D%24%28ls%20..%2F..%2F..%2F..%2Fvar%2Fbackups%29%20-n" />
<magentoCLI stepKey="maintenanceDisable" command="maintenance:disable"/>
<magentoCLI stepKey="disableBackup" command = "config:set system/backup/functionality_enabled 0" />
</after>
</suite>
<suite name="MSI_Sort_Order_Tests">
<before>
<magentoCLI stepKey="enableBackup" command = "config:set system/backup/functionality_enabled 1" />
<magentoCLI stepKey="dbBackup" command="setup:backup" arguments="--db" />
<magentoCLI stepKey="maintenanceDisable" command="maintenance:disable"/>
<magentoCLI stepKey="disableWYSYWYG" command="config:set cms/wysiwyg/enabled disabled"/>
<magentoCLI stepKey="enableStockManagement" command="config:set cataloginventory/item_options/manage_stock 1"/>
</before>
<include>
<group name="sort_order_test"/>
Expand All @@ -65,9 +57,7 @@
<group name="multi_mode"/>
</exclude>
<after>
<magentoCLI stepKey="dbRollback" command="setup:rollback" arguments="--db-file%3D%24%28ls%20..%2F..%2F..%2F..%2Fvar%2Fbackups%29%20-n" />
<magentoCLI stepKey="maintenanceDisable" command="maintenance:disable"/>
<magentoCLI stepKey="disableBackup" command = "config:set system/backup/functionality_enabled 0" />
</after>
</suite>
</suites>
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<click selector="{{AdminGridMainControls.saveAndContinue}}" stepKey="saveCustomStock"/>
</before>
<after>
<magentoCLI command="config:set cataloginventory/item_options/manage_stock 1" stepKey="reenableManageStock"/>
<deleteData createDataKey="category" stepKey="deleteCategory"/>
<actionGroup ref="logout" stepKey="logoutFromAdminArea"/>
</after>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@

<comment userInput="Assign category to product." stepKey="assignCategoryComment"/>
<searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="[$$simpleCategory1.name$$]" requiredAction="true" stepKey="searchAndSelectCategory"/>

<selectOption selector="{{AdminProductSourcesGrid.rowStatus('0')}}" userInput="In Stock" stepKey="selectStockStatus" />
<fillField selector="{{AdminProductSourcesGrid.rowQty('0')}}" userInput="100" stepKey="fillDefaultSourceQtyField"/>
<click selector="{{AdminProductDownloadableSection.sectionHeader}}" stepKey="openDownloadableSection1"/>
<checkOption selector="{{AdminProductDownloadableSection.isDownloadableProduct}}" stepKey="checkIsDownloadable1"/>
<fillField userInput="{{downloadableData.link_title}}" selector="{{AdminProductDownloadableSection.linksTitleInput}}" stepKey="fillDownloadableLinkTitle1"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,5 +188,4 @@
<see selector="{{AdminGridRow.rowOne}}" userInput="Enabled" stepKey="seeProductStatusInGrid"/>
<see selector="{{AdminGridRow.rowOne}}" userInput="Main Website" stepKey="seeProductWebsiteInGrid"/>
</test>
</tests>

</tests>
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
<?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="CreditMemoCreatedForWholeOrderWithSimpleProductOnDefaultStockAfterFullInvoiceAndShipmentInAdminTest">
<annotations>
<stories value="MSI Credit Memo"/>
<title value="Credit memo created for whole order with Simple product on Default stock after full invoice and shipment in Admin"/>
<description value="Credit memo created for whole order with Simple product on Default stock after full invoice and shipment in Admin"/>
<testCaseId value="MSI-1949"/>
<severity value="BLOCKER"/>
<group value="msi"/>
<group value="multi_mode"/>
</annotations>

<before>
<createData entity="MsiCustomer1" stepKey="createCustomer"/>
<createData entity="BasicMsiStock1" stepKey="createStock"/>
<createData entity="FullSource1" stepKey="createSource"/>
<createData entity="SourceStockLinked1" stepKey="linkSourceStock">
<requiredEntity createDataKey="createStock"/>
<requiredEntity createDataKey="createSource"/>
</createData>
<createData entity="SimpleSubCategory" stepKey="simpleCategory"/>
<createData entity="SimpleProduct" stepKey="simpleProduct">
<field key="qty">100.00</field>
<requiredEntity createDataKey="simpleCategory"/>
</createData>
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
<waitForPageLoad stepKey="waitForDashboardLoad"/>
</before>
<after>
<actionGroup ref="logout" stepKey="logoutOfAdmin"/>
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
<deleteData createDataKey="createStock" stepKey="deleteStock"/>
<deleteData createDataKey="simpleCategory" stepKey="deleteCategory"/>
<deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/>
</after>

<!--Login To storefront as Customer-->
<comment userInput="Login to storefront as customer." stepKey="loginToStorefrontComment"/>
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefront">
<argument name="Customer" value="$$createCustomer$$"/>
</actionGroup>

<!--Purchase product once logged in-->
<comment userInput="Purchase 5 simple product" stepKey="purchaseSimpleProductComment"/>
<amOnPage url="{{StorefrontCategoryPage.url($$simpleCategory.name$$)}}" stepKey="navigateToCategoryPage"/>
<moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName($$simpleProduct.name$$)}}" stepKey="moveMouseOverProduct" />
<click selector="{{StorefrontCategoryProductSection.ProductAddToCartByName($$simpleProduct.name$$)}}" stepKey="clickAddToCart" />
<waitForElement selector="{{StorefrontMessagesSection.messageProductAddedToCart($$simpleProduct.name$$)}}" time="30" stepKey="assertMessage"/>
<waitForText userInput="1" selector="{{StorefrontMinicartSection.productCount}}" time="30" stepKey="assertProductCount"/>
<conditionalClick selector="{{StorefrontMinicartSection.showCart}}" dependentSelector="{{StorefrontMinicartSection.miniCartOpened}}" visible="false" stepKey="openMiniCart"/>
<waitForElementVisible selector="{{StorefrontMinicartSection.viewAndEditCart}}" stepKey="waitForViewAndEditCartVisible"/>
<clearField selector="{{StorefrontMinicartSection.itemQuantity($$simpleProduct.name$$)}}" stepKey="clearField"/>
<fillField selector="{{StorefrontMinicartSection.itemQuantity($$simpleProduct.name$$)}}" userInput="5" stepKey="setProductQtyToFiftyInMiniCart"/>
<click selector="{{StorefrontMinicartSection.itemQuantityUpdate($$simpleProduct.name$$)}}" stepKey="updateQtyInMiniCart"/>
<click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="goToCheckout"/>
<waitForPageLoad stepKey="waitForPaymentSelectionPageLoad"/>
<click selector=".continue" stepKey="clickOnNextCheckout"/>
<waitForPageLoad stepKey="waitForPageLoadCheckout"/>
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyOrderPayment"/>
<waitForElement selector="{{CheckoutPaymentSection.placeOrder}}" time="30" stepKey="waitForPlaceOrderButtonVisible"/>
<see selector="{{CheckoutPaymentSection.billingAddress}}" userInput="{{US_Address_TX.street[0]}}" stepKey="chooseBillingAddress"/>
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="placeOrder"/>
<waitForPageLoad stepKey="waitUntilOrderPlaced"/>
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/>
<see selector="{{CheckoutSuccessMainSection.success}}" userInput="Your order number is:" stepKey="checkOrderPlaceSuccessMessage"/>

<!--Admin Area Check ordered quantity-->
<comment userInput="Admin - Check ordered quantity" stepKey="AdminCheckOrderedQuantity"/>
<amOnPage url="{{AdminOrdersPage.url}}" stepKey="navigateToOrderListPage"/>
<waitForLoadingMaskToDisappear stepKey="waitOrderListPageLoad"/>
<fillField selector="{{AdminOrdersGridSection.search}}" userInput="{$grabOrderNumber}" stepKey="searchOrder"/>
<click selector="{{AdminOrdersGridSection.submitSearch}}" stepKey="submitSearch"/>
<waitForLoadingMaskToDisappear stepKey="waitFilteredOrderListPageLoad"/>
<click selector="{{AdminOrdersGridSection.firstRow}}" stepKey="navigateToOrderViewPage"/>
<waitForElementVisible selector="{{AdminOrderItemsOrderedSection.itemQty('1')}}" stepKey="waitForViewOrderedQuantity"/>
<see selector="{{AdminOrderItemsOrderedSection.itemQty('1')}}" userInput="Ordered 5" stepKey="orderedQuantity"/>

<!--Admin Area Check source quantity and salable quantity-->
<comment userInput="Admin - Check Source quantity and salable quantity after order placed" stepKey="AdminCheckQuantityAfterOrderPlaced"/>
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndexPageForCheckProductQtyAfterPlaceOrder"/>
<actionGroup ref="AdminGridFilterSearchResultsByInput" stepKey="findVirtualProductBySkuToCheckQtyAfterPlaceOrder">
<argument name="selector" value="AdminProductGridFilterSection.skuFilter"/>
<argument name="value" value="$$simpleProduct.sku$$"/>
</actionGroup>
<see selector="{{AdminProductGridSection.productQtyPerSource('1',_defaultSource.name)}}" userInput="100" stepKey="checkProductSourceQtyAfterPlaceOrder"/>
<see selector="{{AdminProductGridSection.productSalableQty('1',_defaultStock.name)}}" userInput="95" stepKey="checkSalableQtyAfterPlaceOrder"/>

<!--Admin Area Process Shipping-->
<comment userInput="Admin - Ship order" stepKey="AdminShipOrder"/>
<amOnPage url="{{AdminOrdersPage.url}}" stepKey="onOrdersPageToCreateShipment"/>
<waitForLoadingMaskToDisappear stepKey="waitForOrdersPageLoadingMask"/>
<fillField selector="{{AdminOrdersGridSection.search}}" userInput="{$grabOrderNumber}" stepKey="searchOrderNum"/>
<click selector="{{AdminOrdersGridSection.submitSearch}}" stepKey="submitSearchShipping"/>
<waitForLoadingMaskToDisappear stepKey="waitForSubmitSearchLoadingMask"/>
<click selector="{{AdminOrdersGridSection.firstRow}}" stepKey="clickOrderRow"/>
<click selector="{{AdminOrderDetailsMainActionsSection.ship}}" stepKey="clickShip"/>
<waitForLoadingMaskToDisappear stepKey="waitForShipLoadingMask"/>
<click selector="{{AdminShipmentMainActionsSection.submitShipment}}" stepKey="submitShipment"/>
<see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="The shipment has been created." stepKey="seeShipmentCreateSuccess"/>

<!--Admin Area Process Full Invoice-->
<comment userInput="Admin - Process invoice for full order" stepKey="InvoiceFullOrder"/>
<amOnPage url="{{AdminOrdersPage.url}}" stepKey="onOrdersPageToProcessInvoice"/>
<waitForLoadingMaskToDisappear stepKey="waitForOrdersPageLoadingMaskInvoice"/>
<fillField selector="{{AdminOrdersGridSection.search}}" userInput="{$grabOrderNumber}" stepKey="searchOrderNumInvoice"/>
<click selector="{{AdminOrdersGridSection.submitSearch}}" stepKey="submitSearchInvoice"/>
<waitForLoadingMaskToDisappear stepKey="waitForSubmitSearchLoadingMaskGridForInvoice"/>
<click selector="{{AdminOrdersGridSection.firstRow}}" stepKey="clickOrderRowInvoice"/>
<click selector="{{AdminOrderDetailsMainActionsSection.invoice}}" stepKey="clickInvoice"/>
<click selector="{{AdminInvoiceMainActionsSection.submitInvoice}}" stepKey="clickSubmitInvoice"/>
<waitForPageLoad time="60" stepKey="waitForPageLoadSubmitInvoice"/>
<scrollToTopOfPage stepKey="scrollToTopMessage"/>
<waitForPageLoad stepKey="waitForPageLoadSuccessMessage"/>
<see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="The invoice has been created." stepKey="checkSuccessMessage"/>


<!--Admin Area Create Full Credit Memo-->
<comment userInput="Admin - Create credit memo for full order" stepKey="AdminCreateCreditMemoFullOrder"/>
<amOnPage url="{{AdminOrdersPage.url}}" stepKey="onOrdersPageToCreateCreditMemo"/>
<waitForLoadingMaskToDisappear stepKey="waitForOrdersPageLoadingMaskCreditMemo"/>
<fillField selector="{{AdminOrdersGridSection.search}}" userInput="{$grabOrderNumber}" stepKey="searchOrderNumCreditMemo"/>
<click selector="{{AdminOrdersGridSection.submitSearch}}" stepKey="submitSearchCreditMemo"/>
<waitForLoadingMaskToDisappear stepKey="waitForSubmitSearchLoadingMaskCreditMemo"/>
<click selector="{{AdminOrdersGridSection.firstRow}}" stepKey="clickOrderRowCreditMemo"/>
<click selector="{{AdminOrderDetailsMainActionsSection.creditMemo}}" stepKey="clickCreditMemo"/>
<click selector="{{AdminCreditMemoItemsSection.itemReturnToStock('1')}}" stepKey="returnToStockCheckbox"/>
<click selector="{{AdminCreditMemoTotalSection.submitRefundOffline}}" stepKey="clickSubmit"/>


<!--Admin Area Check quantities after Credit Memo-->
<comment userInput="Admin - Check Source quantity and salable quantity after credit memo" stepKey="AdminCheckQuantityAfterCreditMemo"/>
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndexPageForCheckProductQtyAfterCreditMemo"/>
<actionGroup ref="AdminGridFilterSearchResultsByInput" stepKey="findVirtualProductBySkuToCheckQtyAfterCreditMemo">
<argument name="selector" value="AdminProductGridFilterSection.skuFilter"/>
<argument name="value" value="$$simpleProduct.sku$$"/>
</actionGroup>
<see selector="{{AdminProductGridSection.productQtyPerSource('1',_defaultSource.name)}}" userInput="100" stepKey="checkProductSourceQtyAfterCreditMemo"/>
<see selector="{{AdminProductGridSection.productSalableQty('1',_defaultStock.name)}}" userInput="100" stepKey="checkSalableQtyAfterCreditMemo"/>
</test>
</tests>
Loading

0 comments on commit 73f3454

Please sign in to comment.