Skip to content

Commit eb4cb4b

Browse files
author
Dmytro Vilchynskyi
committed
MAGETWO-60185: Remove distinction in http/https for requirejs-config.js
- Changes after CR.
1 parent b98b04c commit eb4cb4b

File tree

3 files changed

+44
-33
lines changed

3 files changed

+44
-33
lines changed

dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/ConfigureSecureUrlsTest.php

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -16,40 +16,40 @@
1616
* Verify that Merchant can configure secure URLs for Storefront and/or Admin panel in order to improve Store security.
1717
*
1818
* Preconditions:
19-
* # SSL on server is configured.
20-
* # Secure URLs are disabled for Storefront & Admin (out-of-the-box Magento state).
19+
* 1. SSL on server is configured.
20+
* 2. Secure URLs are disabled for Storefront & Admin (out-of-the-box Magento state).
2121
*
2222
* Steps:
23-
* # Log in to Admin panel.
24-
* # Go to "Stores > Configuration" page.
25-
* # Select needed scope.
26-
* # Go to "General > Web > Base URLs (Secure)" section.
27-
* # Specify Base URL with Secure protocol in the same format as a Secure Base URL.
23+
* 1. Log in to Admin panel.
24+
* 2. Go to "Stores > Configuration" page.
25+
* 3. Select needed scope.
26+
* 4. Go to "General > Web > Base URLs (Secure)" section.
27+
* 5. Specify Base URL with Secure protocol in the same format as a Secure Base URL.
2828
* (i) Make sure that Secure Base URL ends with a "/".
29-
* # Enable Secure URLs for Storefront if there is a need.
30-
* # Enable Secure URLs for Admin if there is a need.
31-
* # Save the Config & refresh invalidated caches (Configuration, Page Cache).
32-
* # Deploy static view files.
29+
* 6. Enable Secure URLs for Storefront if there is a need.
30+
* 7. Enable Secure URLs for Admin if there is a need.
31+
* 8. Save the Config & refresh invalidated caches (Configuration, Page Cache).
32+
* 9. Deploy static view files.
3333
*
34-
* # If Secure URLs for Storefront were enabled:
35-
* # Assert that https is used all over the Storefront.
36-
* # Assert that static content is deployed validly (ex: JS functionality works on Storefront).
37-
* # Assert that Customer is redirected to https if trying to access the page directly via http.
38-
* # If secure URLs for Storefront were disabled:
39-
* # Assert that http is used all over the Storefront.
40-
* # Assert that static content is deployed validly (ex: JS functionality works on Storefront).
34+
* 10. If Secure URLs for Storefront were enabled:
35+
* 1. Assert that https is used all over the Storefront.
36+
* 2. Assert that static content is deployed validly (ex: JS functionality works on Storefront).
37+
* 3. Assert that Customer is redirected to https if trying to access the page directly via http.
38+
* 11. If secure URLs for Storefront were disabled:
39+
* 1. Assert that http is used all over the Storefront.
40+
* 2. Assert that static content is deployed validly (ex: JS functionality works on Storefront).
4141
*
42-
* # If secure URLs for Admin were enabled:
43-
* # Assert that https is used all over the Admin panel.
44-
* # Assert that static content is deployed validly (ex: JS functionality works in Admin panel).
45-
* # Assert that Merchant is redirected to https if trying to access the page directly via http.
46-
* # If secure URLs for Admin were disabled:
47-
* # Assert that http is used all over the Admin panel.
48-
* # Assert that static content is deployed validly (ex: JS functionality works in Admin panel).
49-
* # Assert that Merchant is redirected to http if trying to access the page directly via https.
42+
* 12. If secure URLs for Admin were enabled:
43+
* 1. Assert that https is used all over the Admin panel.
44+
* 2. Assert that static content is deployed validly (ex: JS functionality works in Admin panel).
45+
* 3. Assert that Merchant is redirected to https if trying to access the page directly via http.
46+
* 13. If secure URLs for Admin were disabled:
47+
* 1. Assert that http is used all over the Admin panel.
48+
* 2. Assert that static content is deployed validly (ex: JS functionality works in Admin panel).
49+
* 3. Assert that Merchant is redirected to http if trying to access the page directly via https.
5050
*
5151
* Postconditions:
52-
* # Turn the Secure URLs usage off (with further cache refreshing & static content deploying).
52+
* 1. Turn the Secure URLs usage off (with further cache refreshing & static content deploying).
5353
*
5454
* @ZephyrId MAGETWO-35408
5555
*/
@@ -112,8 +112,8 @@ public function __inject(
112112
/**
113113
* Test execution.
114114
*
115-
* @param $configData
116-
* @return $this
115+
* @param string $configData
116+
* @return void
117117
*/
118118
public function test($configData)
119119
{

dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/ConfigureSecureUrlsTest.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/variations.xsd">
9-
<testCase name="Magento\Backend\Test\TestCase\EnableSecureUrlsTest" summary="Configure secure URLs" ticketId="MAGETWO-35408">
10-
<variation name="http for Storefront, https for Admin" summary="http for Storefront, https for Admin" ticketId="MAGETWO-35408">
9+
<testCase name="Magento\Backend\Test\TestCase\ConfigureSecureUrlsTest" summary="Configure secure URLs" ticketId="MAGETWO-35408">
10+
<variation name="ConfigureSecureUrlsHttpForStorefrontHttpsForAdmin" summary="http for Storefront, https for Admin" ticketId="MAGETWO-35408">
1111
<data name="configData" xsi:type="string">disable_https_frontend_admin</data>
12-
<constraint name="Magento\Backend\Test\Constraint\AssertHttpUsedOnFrontend"/>
13-
<constraint name="Magento\Backend\Test\Constraint\AssertHttpsUsedOnBackend"/>
12+
<data name="navMenuPath" xsi:type="string">Marketing>Catalog Price Rule</data>
13+
<constraint name="Magento\Backend\Test\Constraint\AssertHttpUsedOnFrontend" />
14+
<constraint name="Magento\Backend\Test\Constraint\AssertHttpsUsedOnBackend" />
1415
</variation>
1516
</testCase>
1617
</config>

dev/tests/functional/tests/app/Magento/Backend/Test/etc/di.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@
1111
<argument name="severity" xsi:type="string">high</argument>
1212
</arguments>
1313
</type>
14+
<type name="Magento\Backend\Test\Constraint\AssertHttpsUsedOnBackend">
15+
<arguments>
16+
<argument name="severity" xsi:type="string">high</argument>
17+
</arguments>
18+
</type>
19+
<type name="Magento\Backend\Test\Constraint\AssertHttpsUsedOnFrontend">
20+
<arguments>
21+
<argument name="severity" xsi:type="string">middle</argument>
22+
</arguments>
23+
</type>
1424
<type name="Magento\Backend\Test\Constraint\AssertStoreCanBeLocalized">
1525
<arguments>
1626
<argument name="severity" xsi:type="string">high</argument>

0 commit comments

Comments
 (0)