Skip to content

Commit 6677e66

Browse files
author
Anna Bukatar
committed
Merge branch '2.4-develop' of https://github.com/magento-l3/magento2ce into ACP2E-963
2 parents a1f7583 + 2e45de7 commit 6677e66

File tree

8 files changed

+272
-27
lines changed

8 files changed

+272
-27
lines changed

app/code/Magento/Elasticsearch/Test/Mftf/Test/StorefrontProductQuickSearchUsingElasticSearchWithSynonymsTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@
8181

8282
<!-- Create 3rd synonym -->
8383
<actionGroup ref="AdminNavigateToNewSearchSynonymsPageActionGroup" stepKey="navigateToNewThirdSearchSynonym"/>
84-
<actionGroup ref="AdminFillNewSearchSynonymsActionGroup" stepKey="fillThirdSearchSynonym">
85-
<argument name="scope_id" value="1:3"/>
84+
<actionGroup ref="AdminFillNewSearchSynonymsForCustomScopeActionGroup" stepKey="fillThirdSearchSynonym">
85+
<argument name="scopeName" value="{{customStore.name}}"/>
8686
<argument name="synonyms" value="customview,simple"/>
8787
</actionGroup>
8888
<click selector="{{AdminSearchSynonymsNewSection.save}}" stepKey="clickSaveSynonymThreeButton"/>

app/code/Magento/Integration/Test/Unit/Oauth/OauthTest.php

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
namespace Magento\Integration\Test\Unit\Oauth;
99

10+
use Laminas\OAuth\Http\Utility;
1011
use Magento\Framework\DataObject;
1112
use Magento\Framework\Math\Random;
1213
use Magento\Framework\Oauth\Helper\Oauth;
@@ -31,6 +32,8 @@
3132
*/
3233
class OauthTest extends TestCase
3334
{
35+
private const TIMESTAMP_STUB = 1657789046;
36+
3437
/** @var ConsumerFactory */
3538
private $_consumerFactory;
3639

@@ -145,24 +148,26 @@ protected function setUp(): void
145148
)
146149
->addMethods(
147150
[
148-
'getType',
149-
'getToken',
150-
'getSecret',
151-
'getConsumerId',
152-
'getRevoked'
151+
'getType',
152+
'getToken',
153+
'getSecret',
154+
'getConsumerId',
155+
'getRevoked'
153156
]
154157
)
155158
->getMock();
156159
$this->_tokenFactory->expects($this->any())->method('create')->willReturn($this->_tokenMock);
157160
$this->_oauthHelperMock = $this->getMockBuilder(Oauth::class)
158161
->setConstructorArgs([new Random()])
159162
->getMock();
160-
$this->_httpUtilityMock = $this->getMockBuilder(\Zend_Oauth_Http_Utility::class)
163+
$this->_httpUtilityMock = $this->getMockBuilder(Utility::class)
161164
->onlyMethods(['sign'])
162165
->getMock();
163166
$this->_dateMock = $this->getMockBuilder(DateTime::class)
164167
->disableOriginalConstructor()
165168
->getMock();
169+
$this->_dateMock->method('timestamp')
170+
->willReturn(self::TIMESTAMP_STUB);
166171
$this->_loggerMock = $this->getMockBuilder(LoggerInterface::class)
167172
->disableOriginalConstructor()
168173
->getMockForAbstractClass();
@@ -821,7 +826,7 @@ public function testBuildAuthorizationHeader()
821826
$oauthHeader = $this->_oauth->buildAuthorizationHeader($request, $requestUrl);
822827

823828
$expectedHeader = 'OAuth oauth_nonce="tyukmnjhgfdcvxstyuioplkmnhtfvert",' .
824-
'oauth_timestamp="",' .
829+
'oauth_timestamp="' . self::TIMESTAMP_STUB . '",' .
825830
'oauth_version="1.0",oauth_consumer_key="edf957ef88492f0a32eb7e1731e85da2",' .
826831
'oauth_consumer_secret="asdawwewefrtyh2f0a32eb7e1731e85d",' .
827832
'oauth_token="7c0709f789e1f38a17aa4b9a28e1b06c",' .
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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="AdminFillNewSearchSynonymsForCustomScopeActionGroup">
12+
<annotations>
13+
<description>Fills the search synonyms form field with a custom Scope.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="scopeName" type="string"/>
17+
<argument name="synonyms" type="string"/>
18+
</arguments>
19+
20+
<click selector="{{AdminSearchSynonymsNewSection.scope}}" stepKey="clickScopeSelector"/>
21+
<waitForElementVisible selector="{{AdminSearchSynonymsNewSection.selectScope(scopeName)}}" stepKey="waitForScopesList"/>
22+
<click selector="{{AdminSearchSynonymsNewSection.selectScope(scopeName)}}" stepKey="clickStoreView"/>
23+
<fillField selector="{{AdminSearchSynonymsNewSection.synonyms}}" userInput="{{synonyms}}" stepKey="fillSynonyms"/>
24+
<checkOption selector="{{AdminSearchSynonymsNewSection.merge}}" stepKey="checkCheckbox"/>
25+
</actionGroup>
26+
</actionGroups>

app/code/Magento/Search/Test/Mftf/Section/AdminSearchSynonymsNewSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
<element name="scope" type="select" selector="//select[@name='scope_id']"/>
1515
<element name="synonyms" type="textarea" selector="//textarea[@name='synonyms']"/>
1616
<element name="merge" type="checkbox" selector="//input[@name='mergeOnConflict']"/>
17+
<element name="selectScope" type="select" selector="//option[contains(text(),'{{scopeName}}')]" parameterized="true"/>
1718
</section>
1819
</sections>

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,10 @@
5555
"laminas/laminas-mime": "^2.9.1",
5656
"laminas/laminas-modulemanager": "^2.11.0",
5757
"laminas/laminas-mvc": "^3.3.3",
58+
"laminas/laminas-oauth": "^2.4",
5859
"laminas/laminas-servicemanager": "^3.11.0",
5960
"laminas/laminas-soap": "^2.10.0",
60-
"laminas/laminas-stdlib": "^3.7.1",
61+
"laminas/laminas-stdlib": "^3.10.0",
6162
"laminas/laminas-uri": "^2.9.1",
6263
"laminas/laminas-validator": "^2.17.0",
6364
"league/flysystem": "~2.4.5",

composer.lock

Lines changed: 221 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)