forked from magento/magento2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EngCom] Public Pull Requests - 2.2-develop
- merged latest code from mainline branch
- Loading branch information
Showing
25 changed files
with
562 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
app/code/Magento/Cms/Test/Mftf/Test/AdminRestrictedUserOnlyAccessCmsBlockTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?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="AdminRestrictedUserOnlyAccessCmsBlockTest"> | ||
<annotations> | ||
<features value="Cms"/> | ||
<stories value="Check access for restricted admin user"/> | ||
<title value="Check: restricted admin with access only to CMS Block"/> | ||
<description value="Check that the system shows information only in Blocks"/> | ||
<severity value="MAJOR"/> | ||
<testCaseId value="MC-13814"/> | ||
<useCaseId value="MAGETWO-88612"/> | ||
<group value="Cms"/> | ||
</annotations> | ||
<before> | ||
<createData entity="restrictedWebUser" stepKey="createRestrictedAdmin"/> | ||
<actionGroup ref="LoginToAdminActionGroup" stepKey="loginToBackend"/> | ||
<actionGroup ref="AdminCreateUserRoleActionGroup" stepKey="createRestrictedAdminRole"> | ||
<argument name="roleName" value="{{RoleTest.roleName}}"/> | ||
<argument name="resourceAccess" value="Custom"/> | ||
<argument name="resource" value="Magento_Cms::block"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminAssignUserRoleActionGroup" stepKey="assignAdminRole"> | ||
<argument name="user_restricted" value="$$createRestrictedAdmin$$"/> | ||
<argument name="roleName" value="{{RoleTest.roleName}}"/> | ||
</actionGroup> | ||
<actionGroup ref="logout" stepKey="logOut"/> | ||
</before> | ||
<after> | ||
<actionGroup ref="LoginActionGroup" stepKey="loginAsAdminWithAllAccess"/> | ||
<actionGroup ref="AdminDeleteUserRoleActionGroup" stepKey="deleteRestrictedRole"> | ||
<argument name="roleName" value="{{RoleTest.roleName}}"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminDeleteUserActionGroup" stepKey="deleteRestrictedUser"> | ||
<argument name="user_restricted" value="$$createRestrictedAdmin$$"/> | ||
</actionGroup> | ||
<!--Log Out--> | ||
<actionGroup ref="logout" stepKey="logOut"/> | ||
</after> | ||
|
||
<!--login as restricted user--> | ||
<actionGroup ref="AdminLoginAsAnyUser" stepKey="logAsNewUser"> | ||
<argument name="login" value="$$createRestrictedAdmin.username$$"/> | ||
<argument name="password" value="$$createRestrictedAdmin.password$$"/> | ||
</actionGroup> | ||
|
||
<!--Verify that The system shows information included in "Blocks"--> | ||
<see userInput="Blocks" stepKey="seeBlocksPage"/> | ||
<seeInCurrentUrl url="{{AdminCmsBlockGridPage.url}}" stepKey="assertUrl"/> | ||
<!--Log Out--> | ||
<actionGroup ref="logout" stepKey="logOut"/> | ||
</test> | ||
</tests> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
135 changes: 135 additions & 0 deletions
135
...agento/ConfigurableProduct/Test/Mftf/Test/AdminCheckingProductQtyAfterOrderCancelTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
<?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="AdminCheckingProductQtyAfterOrderCancelTest"> | ||
<annotations> | ||
<features value="ConfigurableProduct"/> | ||
<stories value="Product quantity after order cancel"/> | ||
<title value="Products quantity return after order cancel"/> | ||
<description value="Checking product quantity after the order cancel"/> | ||
<severity value="CRITICAL"/> | ||
<testCaseId value="MC-13790"/> | ||
<group value="configurableProduct"/> | ||
</annotations> | ||
<before> | ||
<!--Create category--> | ||
<createData entity="ApiCategory" stepKey="createCategory"/> | ||
<!--Create configurable product and add it to the category--> | ||
<createData entity="ApiConfigurableProduct" stepKey="createConfigProduct"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<!--Create attribute--> | ||
<createData entity="productAttributeWithDropdownTwoOptions" stepKey="createConfigProductAttribute"/> | ||
<createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1"> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
</createData> | ||
<!--Add the attribute to default attribute set--> | ||
<createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet"> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
</createData> | ||
<!--Get the option of the attribute--> | ||
<getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption"> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
</getData> | ||
<!--Create simple product and give it the attribute with option--> | ||
<createData entity="ApiSimpleWithQty100" stepKey="createConfigChildProduct"> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
<requiredEntity createDataKey="getConfigAttributeOption"/> | ||
</createData> | ||
<!--Create configurable product--> | ||
<createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption"> | ||
<requiredEntity createDataKey="createConfigProduct"/> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
<requiredEntity createDataKey="getConfigAttributeOption"/> | ||
</createData> | ||
<!--Add simple product to the configurable product--> | ||
<createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild"> | ||
<requiredEntity createDataKey="createConfigProduct"/> | ||
<requiredEntity createDataKey="createConfigChildProduct"/> | ||
</createData> | ||
<!--Create customer--> | ||
<createData entity="Simple_US_Customer" stepKey="createCustomer"/> | ||
<!--Login--> | ||
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> | ||
</before> | ||
<after> | ||
<!--Clear grid filters--> | ||
<amOnPage url="{{AdminOrdersPage.url}}" stepKey="goToOrderGridPage"/> | ||
<actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearGridFilter"/> | ||
<!--Delete entities--> | ||
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> | ||
<deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> | ||
<deleteData createDataKey="createConfigChildProduct" stepKey="deleteConfigChildProduct"/> | ||
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> | ||
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/> | ||
<!--Logout--> | ||
<actionGroup ref="logout" stepKey="logoutFromAdmin"/> | ||
<actionGroup ref="CustomerLogoutStorefrontActionGroup" stepKey="logoutFromStorefront"/> | ||
</after> | ||
|
||
<!--Go to Storefront as Customer--> | ||
<actionGroup ref="CustomerLoginOnStorefront" stepKey="customerLogin"> | ||
<argument name="customer" value="$$createCustomer$$" /> | ||
</actionGroup> | ||
|
||
<!--Go to the configurable product page on Storefront--> | ||
<amOnPage url="{{StorefrontProductPage.url($$createConfigProduct.sku$$)}}" stepKey="goToProductPage"/> | ||
<!--Select option--> | ||
<selectOption selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" userInput="$$getConfigAttributeOption.label$$" stepKey="selectOption"/> | ||
<!--Add product to the Shopping cart--> | ||
<actionGroup ref="StorefrontAddProductToCartQuantityActionGroup" stepKey="addProductToCart"> | ||
<argument name="productName" value="$createConfigProduct.name$"/> | ||
<argument name="quantity" value="4"/> | ||
</actionGroup> | ||
|
||
<!--Open Shopping cart--> | ||
<actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="openShoppingCartFromMinicart"/> | ||
<!--Place order--> | ||
<actionGroup ref="PlaceOrderWithLoggedUserActionGroup" stepKey="placeOrder"> | ||
<argument name="shippingMethod" value="Flat Rate"/> | ||
<argument name="paymentMethod" value="Check / Money order"/> | ||
</actionGroup> | ||
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/> | ||
|
||
<!--Open order--> | ||
<actionGroup ref="OpenOrderById" stepKey="openOrderById"> | ||
<argument name="orderId" value="{$grabOrderNumber}"/> | ||
</actionGroup> | ||
|
||
<!--Start create invoice--> | ||
<actionGroup ref="StartCreateInvoiceFromOrderPage" stepKey="startCreateInvoice"/> | ||
<!--Create partial invoice--> | ||
<actionGroup ref="CreatePartialInvoice" stepKey="createPartialInvoice"> | ||
<argument name="productSku" value="$createConfigChildProduct.sku$"/> | ||
<argument name="qtyToInvoice" value="1"/> | ||
</actionGroup> | ||
<!--Submit Invoice--> | ||
<actionGroup ref="SubmitInvoice" stepKey="submitInvoice"/> | ||
<!--Create Shipment--> | ||
<actionGroup ref="StartCreateShipmentFromOrderPage" stepKey="startCreateShipment"/> | ||
<fillField selector="{{AdminShipmentItemsSection.itemQtyToShip('1')}}" userInput="1" stepKey="changeItemQtyToShip"/> | ||
<actionGroup ref="SubmitShipment" stepKey="submitShipment"/> | ||
|
||
<!--Cancel order--> | ||
<actionGroup ref="CancelProcessingOrder" stepKey="cancelOrder"/> | ||
<!--Check quantities in "Items Ordered" table--> | ||
<see selector="{{AdminOrderItemsOrderedSection.itemQty('1')}}" userInput="Invoiced 1" stepKey="seeInvoicedQuantity"/> | ||
<see selector="{{AdminOrderItemsOrderedSection.itemQty('1')}}" userInput="Shipped 1" stepKey="seeShippedQuantity"/> | ||
<see selector="{{AdminOrderItemsOrderedSection.itemQty('1')}}" userInput="Canceled 3" stepKey="seeCanceledQuantity"/> | ||
|
||
<!--Go to catalog products page on Admin--> | ||
<amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="goToCatalogProductPage"/> | ||
<actionGroup ref="filterProductGridBySku" stepKey="filterProductGrid"> | ||
<argument name="product" value="$$createConfigChildProduct$$"/> | ||
</actionGroup> | ||
|
||
<!--Check quantity of configurable child product--> | ||
<see selector="{{AdminProductGridSection.productGridCell('1', 'Quantity')}}" userInput="99" stepKey="seeProductSkuInGrid"/> | ||
</test> | ||
</tests> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
app/code/Magento/Indexer/Test/Mftf/ActionGroup/AdminIndexerActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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="UpdateIndexerMode"> | ||
<arguments> | ||
<argument name="indexerId" type="string"/> | ||
<argument name="indexerMode" type="string" defaultValue="Update on Save"/> | ||
</arguments> | ||
<amOnPage url="{{AdminIndexManagementPage.url}}" stepKey="amOnIndexManagementPage"/> | ||
<checkOption selector="{{AdminIndexManagementSection.indexerCheckbox(indexerId)}}" stepKey="selectIndexer"/> | ||
<selectOption selector="{{AdminIndexManagementSection.massActionSelect}}" userInput="{{indexerMode}}" stepKey="selectIndexerMode"/> | ||
<click selector="{{AdminIndexManagementSection.massActionSubmit}}" stepKey="submitIndexerForm"/> | ||
<see selector="{{AdminMessagesSection.success}}" userInput='1 indexer(s) are in "{{indexerMode}}" mode.' stepKey="seeSuccessMessage"/> | ||
</actionGroup> | ||
</actionGroups> |
13 changes: 13 additions & 0 deletions
13
app/code/Magento/Indexer/Test/Mftf/Page/AdminIndexManagementPage.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd"> | ||
<page name="AdminIndexManagementPage" url="indexer/indexer/list" module="Magento_Indexer" area="admin"> | ||
<section name="AdminIndexManagementSection"/> | ||
</page> | ||
</pages> |
Oops, something went wrong.