Skip to content

Commit 73b67ee

Browse files
committed
Merge remote-tracking branch 'adobe-commerce-tier-4/ACP2E-3364' into Tier4-Kings-PR-11-22-2024
2 parents 8187bf7 + 3333273 commit 73b67ee

File tree

3 files changed

+35
-7
lines changed

3 files changed

+35
-7
lines changed

app/code/Magento/Search/Test/Mftf/Test/AdminNewSearchSynonymsFormResetTest.xml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
6-
*/
3+
/************************************************************************
4+
*
5+
* Copyright 2020 Adobe
6+
* All Rights Reserved.
7+
*
8+
* ************************************************************************
9+
*/
710
-->
811

912
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -39,7 +42,7 @@
3942
</actionGroup>
4043

4144
<click selector="{{AdminSearchSynonymsNewSection.resetButton}}" stepKey="clickResetButton"/>
42-
45+
<waitForPageLoad stepKey="waitForPageLoaded"/>
4346
<grabValueFrom selector="{{AdminSearchSynonymsNewSection.scope}}" stepKey="grabScopeValue"/>
4447
<assertEquals stepKey="assertScopeDefaultValue">
4548
<expectedResult type="string">0:0</expectedResult>
@@ -53,7 +56,7 @@
5356

5457
<grabValueFrom selector="{{AdminSearchSynonymsNewSection.merge}}" stepKey="grabMergeValue"/>
5558
<assertEquals stepKey="assertMergeDefaultValue">
56-
<expectedResult type="string">false</expectedResult>
59+
<expectedResult type="string">0</expectedResult>
5760
<actualResult type="string">$grabMergeValue</actualResult>
5861
</assertEquals>
5962
</test>

app/code/Magento/Ui/view/base/web/js/form/adapter/buttons.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ define(function () {
1010
'use strict';
1111

1212
return {
13-
'reset': '#reset',
13+
'reset': '#reset_ui_form',
1414
'save': '#save',
1515
'saveAndContinue': '#save_and_continue'
1616
};
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* Copyright © Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
6+
/*eslint max-nested-callbacks: 0*/
7+
define(['Magento_Ui/js/form/adapter/buttons'], function (uiFormSelectors) {
8+
'use strict';
9+
describe('UI Form Selectors Module', function () {
10+
11+
it('should define reset, save, and saveAndContinue selectors', function () {
12+
// Check that the properties are defined
13+
expect(uiFormSelectors).toBeDefined();
14+
expect(uiFormSelectors.reset).toBeDefined();
15+
expect(uiFormSelectors.save).toBeDefined();
16+
expect(uiFormSelectors.saveAndContinue).toBeDefined();
17+
18+
// Verify that each selector matches the expected value
19+
expect(uiFormSelectors.reset).toBe('#reset_ui_form');
20+
expect(uiFormSelectors.save).toBe('#save');
21+
expect(uiFormSelectors.saveAndContinue).toBe('#save_and_continue');
22+
});
23+
24+
});
25+
});

0 commit comments

Comments
 (0)