Skip to content

Commit 488fb58

Browse files
merge magento/2.3-develop into magento-chaika/Chaika-PR-2019-09-20
2 parents d297088 + 502abab commit 488fb58

8 files changed

+389
-0
lines changed

app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontOpenCustomerAccountCreatePageActionGroup.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,15 @@
1616
<amOnPage url="{{StorefrontCustomerCreatePage.url}}" stepKey="goToCustomerAccountCreatePage"/>
1717
<waitForPageLoad stepKey="waitForPageLoaded"/>
1818
</actionGroup>
19+
20+
<actionGroup name="StorefrontOpenCustomerAccountCreatePageUsingStoreCodeInUrlActionGroup">
21+
<annotations>
22+
<description>Goes to the Storefront Customer Create page using Store code in URL option.</description>
23+
</annotations>
24+
<arguments>
25+
<argument name="storeView" type="string" defaultValue="{{customStore.code}}"/>
26+
</arguments>
27+
28+
<amOnPage url="{{StorefrontStoreHomePage.url(storeView)}}{{StorefrontCustomerCreatePage.url}}" stepKey="goToCustomerAccountCreatePage"/>
29+
</actionGroup>
1930
</actionGroups>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminAssertProductInShoppingCartSectionActionGroup">
12+
<annotations>
13+
<description>Assert product in Shopping cart section in Customer's Activities block on Create Order Page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="product" type="string"/>
17+
</arguments>
18+
19+
<see selector="{{AdminCreateOrderShoppingCartSection.shoppingCartBlock}}" userInput="{{product}}" stepKey="seeProductInShoppingCart"/>
20+
</actionGroup>
21+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminMoveProductToItemsOrderedFromShoppingCartActionGroup">
12+
<annotations>
13+
<description>Move product to the "Items Ordered" section from shopping cart.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="product" type="string"/>
17+
</arguments>
18+
19+
<waitForElementVisible selector="{{AdminCreateOrderShoppingCartSection.addToOrderCheckBox(product)}}" stepKey="waitForAddToOrderCheckBox"/>
20+
<click selector="{{AdminCreateOrderShoppingCartSection.addToOrderCheckBox(product)}}" stepKey="selectProduct"/>
21+
<click selector="{{AdminCustomerCreateNewOrderSection.updateChangesBtn}}" stepKey="clickOnUpdateButton"/>
22+
<waitForPageLoad stepKey="waitForAdminCreateOrderShoppingCartSectionPageLoad"/>
23+
</actionGroup>
24+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
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="AdminProductInTheShoppingCartCouldBeReachedByAdminDuringOrderCreationWithMultiWebsiteConfigTest">
12+
<annotations>
13+
<stories value="Admin create order"/>
14+
<title value="Product in the shopping cart could be reached by admin during order creation with multi website config"/>
15+
<description value="Product in the shopping cart could be reached by admin during order creation with multi website config"/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="MC-6353"/>
18+
<group value="sales"/>
19+
<skip>
20+
<issueId value="MC-20129"/>
21+
</skip>
22+
</annotations>
23+
<before>
24+
<magentoCLI command="config:set {{StorefrontEnableAddStoreCodeToUrls.path}} {{StorefrontEnableAddStoreCodeToUrls.value}}" stepKey="addStoreCodeToUrlEnable"/>
25+
<createData entity="SimpleProduct2" stepKey="createProduct"/>
26+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
27+
<actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createWebsite">
28+
<argument name="newWebsiteName" value="{{customWebsite.name}}"/>
29+
<argument name="websiteCode" value="{{customWebsite.code}}"/>
30+
</actionGroup>
31+
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createNewStore">
32+
<argument name="website" value="{{customWebsite.name}}"/>
33+
<argument name="storeGroupName" value="{{customStoreGroup.name}}"/>
34+
<argument name="storeGroupCode" value="{{customStoreGroup.code}}"/>
35+
</actionGroup>
36+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createCustomStoreView">
37+
<argument name="StoreGroup" value="customStoreGroup"/>
38+
<argument name="customStore" value="customStore"/>
39+
</actionGroup>
40+
<actionGroup ref="goToProductPageViaID" stepKey="goToProductEditPage">
41+
<argument name="productId" value="$$createProduct.id$$"/>
42+
</actionGroup>
43+
<actionGroup ref="ProductSetWebsite" stepKey="assignProductToSecondWebsite">
44+
<argument name="website" value="{{customWebsite.name}}"/>
45+
</actionGroup>
46+
</before>
47+
<after>
48+
<magentoCLI command="config:set {{StorefrontDisableAddStoreCodeToUrls.path}} {{StorefrontDisableAddStoreCodeToUrls.value}}" stepKey="addStoreCodeToUrlDisable"/>
49+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
50+
<actionGroup ref="AdminDeleteCustomerActionGroup" stepKey="deleteCustomer">
51+
<argument name="customerEmail" value="Simple_US_Customer.email"/>
52+
</actionGroup>
53+
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite">
54+
<argument name="websiteName" value="{{customWebsite.name}}"/>
55+
</actionGroup>
56+
<actionGroup ref="logout" stepKey="logout"/>
57+
</after>
58+
59+
<!--Create customer account for Second Website-->
60+
<actionGroup ref="StorefrontOpenCustomerAccountCreatePageUsingStoreCodeInUrlActionGroup" stepKey="goToCreateCustomerPage"/>
61+
<actionGroup ref="StorefrontFillCustomerAccountCreationFormActionGroup" stepKey="fillCreateAccountForm">
62+
<argument name="customer" value="Simple_US_Customer"/>
63+
</actionGroup>
64+
<actionGroup ref="StorefrontClickCreateAnAccountCustomerAccountCreationFormActionGroup" stepKey="submitCreateAccountForm"/>
65+
<actionGroup ref="AssertMessageCustomerCreateAccountActionGroup" stepKey="assertSuccessMessage">
66+
<argument name="message" value="Thank you for registering with {{customStoreGroup.name}}." />
67+
</actionGroup>
68+
69+
<!--Open product page and add to cart-->
70+
<actionGroup ref="StorefrontOpenProductPageUsingStoreCodeInUrlActionGroup" stepKey="openProductPageUsingStoreCodeInUrl">
71+
<argument name="product" value="$$createProduct$$"/>
72+
<argument name="storeView" value="customStore"/>
73+
</actionGroup>
74+
<actionGroup ref="StorefrontAddToTheCartActionGroup" stepKey="addProductToCart"/>
75+
76+
<!--Create new order for existing Customer And Store-->
77+
<actionGroup ref="navigateToNewOrderPageExistingCustomer" stepKey="createNewOrder">
78+
<argument name="customer" value="Simple_US_Customer"/>
79+
<argument name="storeView" value="customStore"/>
80+
</actionGroup>
81+
82+
<!--Assert product in Shopping cart section-->
83+
<actionGroup ref="AdminAssertProductInShoppingCartSectionActionGroup" stepKey="seeProductInShoppingCart">
84+
<argument name="product" value="$$createProduct.name$$"/>
85+
</actionGroup>
86+
87+
<!--Move product to the order from shopping cart-->
88+
<actionGroup ref="AdminMoveProductToItemsOrderedFromShoppingCartActionGroup" stepKey="addProductToItemsOrderedFromShoppingCart">
89+
<argument name="product" value="$$createProduct.name$$"/>
90+
</actionGroup>
91+
92+
<!--Fill customer address information-->
93+
<actionGroup ref="fillOrderCustomerInformation" stepKey="fillCustomerAddress">
94+
<argument name="customer" value="Simple_US_Customer"/>
95+
<argument name="address" value="US_Address_TX"/>
96+
</actionGroup>
97+
98+
<!--Select shipping method-->
99+
<actionGroup ref="orderSelectFlatRateShipping" stepKey="selectFlatRateShipping"/>
100+
101+
<!--Checkout select Check/Money Order payment-->
102+
<actionGroup ref="SelectCheckMoneyPaymentMethod" stepKey="selectCheckMoneyPayment"/>
103+
104+
<!--Submit Order and verify information-->
105+
<actionGroup ref="AdminSubmitOrderActionGroup" stepKey="submitOrder"/>
106+
</test>
107+
</tests>
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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="StorefrontButtonsInlineTranslationTest">
12+
<annotations>
13+
<features value="Translation"/>
14+
<stories value="Inline Translation"/>
15+
<title value="[Inline Translation] Buttons inline translation"/>
16+
<description value="[Inline Translation] Buttons inline translation"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MC-12735"/>
19+
<group value="translation"/>
20+
<skip>
21+
<issueId value="MC-20127"/>
22+
</skip>
23+
</annotations>
24+
<before>
25+
<!-- Create Simple Product -->
26+
<createData entity="SimpleProduct2" stepKey="createProduct"/>
27+
<!-- Enable Translate Inline For Storefront-->
28+
<magentoCLI
29+
command="config:set {{EnableTranslateInlineForStorefront.path}} {{EnableTranslateInlineForStorefront.value}}"
30+
stepKey="enableTranslateInlineForStorefront"/>
31+
<!-- Set developer mode -->
32+
<magentoCLI command="deploy:mode:set developer" stepKey="setDeveloperMode"/>
33+
<magentoCLI command="cache:flush" stepKey="flushCache"/>
34+
</before>
35+
<after>
36+
<!-- Disable Translate Inline For Storefront -->
37+
<magentoCLI
38+
command="config:set {{DisableTranslateInlineForStorefront.path}} {{DisableTranslateInlineForStorefront.value}}"
39+
stepKey="disableTranslateInlineForStorefront"/>
40+
<!-- Set production mode -->
41+
<magentoCLI command="deploy:mode:set production" stepKey="setProductionMode"/>
42+
43+
<!-- Delete Simple Product -->
44+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
45+
</after>
46+
47+
<!-- Add product to cart on storefront -->
48+
<actionGroup ref="AddSimpleProductToCart" stepKey="addProductToCart">
49+
<argument name="product" value="$$createProduct$$"/>
50+
</actionGroup>
51+
52+
<!-- Click on cart button on the top -->
53+
<click selector="{{StorefrontMiniCartSection.show}}" stepKey="showMiniCart"/>
54+
55+
<!-- Small cart popup appeared. -->
56+
<waitForElementVisible selector="{{StorefrontMinicartSection.productName}}" stepKey="seeProductNameAppeared"/>
57+
58+
<!-- Check button "Proceed to Checkout". There must be red borders and "book" icons on labels that can be translated. -->
59+
<actionGroup ref="AssertElementInTranslateInlineModeActionGroup" stepKey="assertRedBordersAndBookIcon">
60+
<argument name="elementSelector" value="{{StorefrontMinicartSection.goToCheckout}}"/>
61+
</actionGroup>
62+
63+
<actionGroup ref="AdminTranslateElementActionGroup" stepKey="translateProceedToCheckoutButtonText">
64+
<argument name="elementSelector" value="{{StorefrontMinicartSection.goToCheckout}}"/>
65+
<argument name="translateText" value="Proceed to Checkout Translated"/>
66+
</actionGroup>
67+
</test>
68+
</tests>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminProductFormUpdateUrlKeyActionGroup">
12+
<annotations>
13+
<description>Update UrlKey for Product on Custom Store View.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="newUrlKey" defaultValue="newUrlKey" type="string"/>
17+
</arguments>
18+
<conditionalClick selector="{{AdminProductSEOSection.sectionHeader}}" dependentSelector="{{AdminProductSEOSection.useDefaultUrl}}" visible="false" stepKey="clickOnSearchEngineOptimization"/>
19+
<waitForLoadingMaskToDisappear stepKey="waitLoadProductForm"/>
20+
<uncheckOption selector="{{AdminProductSEOSection.useDefaultUrl}}" stepKey="uncheckDefaultUrl"/>
21+
<fillField selector="{{AdminProductSEOSection.urlKeyInput}}" userInput="{{newUrlKey}}" stepKey="changeUrlKey"/>
22+
</actionGroup>
23+
</actionGroups>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<!-- Check the simple product Url on the product page -->
12+
<actionGroup name="StorefrontCheckProductUrlActionGroup">
13+
<annotations>
14+
<description>Validates that the provided Simple Product Url is correct.</description>
15+
</annotations>
16+
<arguments>
17+
<argument name="productUrl" type="string"/>
18+
</arguments>
19+
<seeInCurrentUrl url="{{StorefrontProductPage.url(productUrl)}}" stepKey="checkUrl"/>
20+
</actionGroup>
21+
</actionGroups>

0 commit comments

Comments
 (0)