/
StorefrontVerifySecureURLRedirectMultishippingTest.xml
57 lines (56 loc) · 3.47 KB
/
StorefrontVerifySecureURLRedirectMultishippingTest.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?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="StorefrontVerifySecureURLRedirectMultishipping">
<!--todo MC-5858: some urls don't redirect to https-->
<annotations>
<features value="Multishipping"/>
<stories value="Storefront Secure URLs"/>
<title value="Verify Secure URLs For Storefront Multishipping Pages"/>
<description value="Verify that the Secure URL configuration applies to the Multishipping pages on the Storefront"/>
<severity value="MAJOR"/>
<testCaseId value="MC-15611"/>
<group value="multishipping"/>
<group value="configuration"/>
<group value="secure_storefront_url"/>
</annotations>
<before>
<createData entity="_defaultCategory" stepKey="category"/>
<createData entity="_defaultProduct" stepKey="product">
<requiredEntity createDataKey="category"/>
</createData>
<createData entity="Simple_US_Customer" stepKey="customer"/>
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefront">
<argument name="Customer" value="$$customer$$"/>
</actionGroup>
<amOnPage url="{{StorefrontCategoryPage.url($$category.name$$)}}" stepKey="goToCategoryPage"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
<moveMouseOver selector="{{StorefrontCategoryMainSection.ProductItemInfo}}" stepKey="moveMouseOverProduct"/>
<click selector="{{StorefrontCategoryMainSection.AddToCartBtn}}" stepKey="clickAddToCartButton"/>
<waitForPageLoad stepKey="waitForAddToCart"/>
<waitForElementVisible selector="{{StorefrontCategoryMainSection.SuccessMsg}}" time="30" stepKey="waitForAddedToCartSuccessMessage"/>
<see selector="{{StorefrontCategoryMainSection.SuccessMsg}}" userInput="You added $$product.name$$ to your shopping cart." stepKey="seeAddedToCartSuccessMessage"/>
<see selector="{{StorefrontMinicartSection.quantity}}" userInput="1" stepKey="seeCartQuantity"/>
<executeJS function="return window.location.host" stepKey="hostname"/>
<magentoCLI command="config:set web/secure/base_url https://{$hostname}/" stepKey="setSecureBaseURL"/>
<magentoCLI command="config:set web/secure/use_in_frontend 1" stepKey="useSecureURLsOnStorefront"/>
<magentoCLI command="cache:flush" stepKey="flushCache"/>
</before>
<after>
<magentoCLI command="config:set web/secure/use_in_frontend 0" stepKey="dontUseSecureURLsOnStorefront"/>
<magentoCLI command="cache:flush" stepKey="flushCache"/>
<deleteData createDataKey="customer" stepKey="deleteCustomer"/>
<deleteData createDataKey="product" stepKey="deleteProduct"/>
<deleteData createDataKey="category" stepKey="deleteCategory"/>
</after>
<executeJS function="return window.location.host" stepKey="hostname"/>
<amOnUrl url="http://{$hostname}/multishipping/checkout" stepKey="goToUnsecureMultishippingCheckoutURL"/>
<seeInCurrentUrl url="https://{$hostname}/multishipping/checkout" stepKey="seeSecureMultishippingCheckoutURL"/>
</test>
</tests>