Skip to content

Commit 661dbff

Browse files
merge magento/2.3-develop into magento-qwerty/MAGETWO-96975
2 parents c3a5e4d + 49b62a4 commit 661dbff

File tree

34 files changed

+1048
-242
lines changed

34 files changed

+1048
-242
lines changed

app/code/Magento/Backend/Test/Mftf/Section/LocaleOptionsSection.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
<section name="LocaleOptionsSection">
1212
<element name="sectionHeader" type="text" selector="#general_locale-head"/>
1313
<element name="timezone" type="select" selector="#general_locale_timezone"/>
14+
<element name="locale" type="select" selector="#general_locale_code"/>
15+
<element name="localeEnabled" type="select" selector="#general_locale_code:enabled"/>
16+
<element name="localeDisabled" type="select" selector="#general_locale_code[disabled=disabled]"/>
1417
<element name="useDefault" type="checkbox" selector="#general_locale_timezone_inherit"/>
1518
</section>
1619
</sections>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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="AdminCheckLocaleAndDeveloperConfigInDeveloperModeTest">
12+
<annotations>
13+
<features value="Backend"/>
14+
<title value="Check locale dropdown and developer configuration page are available in developer mode"/>
15+
<description value="Check locale dropdown and developer configuration page are available in developer mode"/>
16+
<group value="backend"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-20374"/>
19+
<group value="developer_mode_only"/>
20+
<group value="mtf_migrated"/>
21+
</annotations>
22+
<before>
23+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
24+
</before>
25+
26+
<!-- Go to the general configuration and make sure the locale dropdown is available and enabled -->
27+
<actionGroup ref="AdminOpenStoreConfigPageActionGroup" stepKey="openStoreConfigPage" />
28+
<scrollTo selector="{{LocaleOptionsSection.sectionHeader}}" stepKey="scrollToLocaleSection" x="0" y="-80" />
29+
<conditionalClick selector="{{LocaleOptionsSection.sectionHeader}}" dependentSelector="{{LocaleOptionsSection.timezone}}" visible="false" stepKey="openLocaleSection"/>
30+
<seeElement selector="{{LocaleOptionsSection.localeEnabled}}" stepKey="seeEnabledLocaleDropdown"/>
31+
32+
<!-- Go to the developer configuration and make sure the page is available -->
33+
<actionGroup ref="AdminOpenStoreConfigDeveloperPageActionGroup" stepKey="goToDeveloperConfigPage"/>
34+
<seeInCurrentUrl url="{{AdminConfigDeveloperPage.url}}" stepKey="seeDeveloperConfigUrl"/>
35+
<seeElement selector="{{AdminConfigSection.navItemByTitle('Developer')}}" stepKey="assertDeveloperNavItemPresent" />
36+
</test>
37+
</tests>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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="AdminCheckLocaleAndDeveloperConfigInProductionModeTest">
12+
<annotations>
13+
<features value="Backend"/>
14+
<title value="Check locale dropdown and developer configuration page are not available in production mode"/>
15+
<description value="Check locale dropdown and developer configuration page are not available in production mode"/>
16+
<testCaseId value="MC-14106" />
17+
<severity value="MAJOR"/>
18+
<group value="backend"/>
19+
<group value="production_mode_only"/>
20+
<group value="mtf_migrated"/>
21+
</annotations>
22+
<before>
23+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
24+
</before>
25+
26+
<!-- Go to the general configuration and make sure the locale dropdown is disabled -->
27+
<actionGroup ref="AdminOpenStoreConfigPageActionGroup" stepKey="openStoreConfigPage" />
28+
<scrollTo selector="{{LocaleOptionsSection.sectionHeader}}" stepKey="scrollToLocaleSection" x="0" y="-80" />
29+
<conditionalClick selector="{{LocaleOptionsSection.sectionHeader}}" dependentSelector="{{LocaleOptionsSection.timezone}}" visible="false" stepKey="openLocaleSection"/>
30+
<assertElementContainsAttribute selector="{{LocaleOptionsSection.locale}}" attribute="disabled" stepKey="seeDisabledLocaleDropdown" />
31+
32+
<!-- Go to the developer configuration and make sure the redirect to the configuration page takes place -->
33+
<actionGroup ref="AdminOpenStoreConfigDeveloperPageActionGroup" stepKey="goToDeveloperConfigPage"/>
34+
<seeInCurrentUrl url="{{AdminConfigPage.url}}index/" stepKey="seeConfigurationIndexUrl"/>
35+
36+
<actionGroup ref="AdminExpandConfigTabActionGroup" stepKey="expandAdvancedTab">
37+
<argument name="tabName" value="Advanced" />
38+
</actionGroup>
39+
<dontSeeElement selector="{{AdminConfigSection.navItemByTitle('Developer')}}" stepKey="assertDeveloperNavItemAbsent" />
40+
</test>
41+
</tests>

app/code/Magento/CatalogSearch/Model/ResourceModel/Advanced/Collection.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ private function getSearchResultApplier(SearchResultInterface $searchResult): Se
393393
/** This variable sets by serOrder method, but doesn't have a getter method. */
394394
'orders' => $this->_orders,
395395
'size' => $this->getPageSize(),
396+
'currentPage' => (int)$this->_curPage,
396397
]
397398
);
398399
}

app/code/Magento/CatalogSearch/Test/Unit/Model/ResourceModel/Advanced/CollectionTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ public function testLike()
183183
'searchResult' => $searchResult,
184184
'orders' => [],
185185
'size' => $pageSize,
186+
'currentPage' => 0,
186187
]
187188
)
188189
->willReturn($searchResultApplier);
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="AdminExpandConfigTabActionGroup">
12+
<annotations>
13+
<description>Goes to the 'Configuration' page and expands main level configuration tab passed via argument as Tab Name.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="tabName" type="string"/>
17+
</arguments>
18+
19+
<scrollTo stepKey="scrollToTab" selector="{{AdminConfigSection.collapsibleTabByTitle(tabName)}}" x="0" y="-80"/>
20+
<conditionalClick selector="{{AdminConfigSection.collapsibleTabByTitle(tabName)}}" dependentSelector="{{AdminConfigSection.expandedTabByTitle(tabName)}}" visible="false" stepKey="expandTab" />
21+
<waitForElement selector="{{AdminConfigSection.expandedTabByTitle(tabName)}}" stepKey="waitOpenedTab" />
22+
</actionGroup>
23+
</actionGroups>
Lines changed: 24 additions & 0 deletions
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="AdminOpenConfigNavItemActionGroup">
12+
<annotations>
13+
<description>Clicks on config nav item selected by passed argument.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="navItem" type="string"/>
17+
</arguments>
18+
19+
<scrollTo stepKey="scrollToNavItem" selector="{{AdminConfigSection.navItemByTitle(navItem)}}" x="0" y="-80"/>
20+
<click selector="{{AdminConfigSection.navItemByTitle(navItem)}}" stepKey="openNavItem" />
21+
<waitForElement selector="{{AdminConfigSection.activeNavItemByTitle(navItem)}}" stepKey="waitActiveNavItem" />
22+
<waitForPageLoad stepKey="waitForPageLoad" />
23+
</actionGroup>
24+
</actionGroups>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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="AdminOpenStoreConfigDeveloperPageActionGroup">
12+
<annotations>
13+
<description>Go to admin store configuration developer page.</description>
14+
</annotations>
15+
16+
<amOnPage url="{{AdminConfigDeveloperPage.url}}" stepKey="openAdminStoreConfigDeveloperPage" />
17+
<waitForPageLoad stepKey="waitForPageLoad" />
18+
</actionGroup>
19+
</actionGroups>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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="AdminOpenStoreConfigPageActionGroup">
12+
<annotations>
13+
<description>Go to admin store configuration page.</description>
14+
</annotations>
15+
16+
<amOnPage url="{{AdminConfigPage.url}}" stepKey="openAdminStoreConfigPage" />
17+
<waitForPageLoad stepKey="waitForPageLoad" />
18+
</actionGroup>
19+
</actionGroups>

app/code/Magento/Config/Test/Mftf/ActionGroup/GeneralConfigurationActionGroup.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
<amOnPage url="{{AdminConfigGeneralPage.url}}" stepKey="navigateToConfigGeneralPage"/>
2828
<waitForPageLoad stepKey="waitForConfigPageLoad"/>
2929
</actionGroup>
30-
3130
<actionGroup name="SelectTopDestinationsCountry">
3231
<annotations>
3332
<description>Selects the provided Countries under 'Top destinations' on the 'General' section of the 'Configuration' page. Clicks on the Save button.</description>

0 commit comments

Comments
 (0)