Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issue #27095 - In Floating cart delete pop-up, When user click on out side of OK button than button color is changed #27096

Closed
2 changes: 1 addition & 1 deletion app/code/Magento/Ui/view/base/web/js/modal/confirm.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ define([
}
}, {
text: $t('OK'),
class: 'action-primary action-accept',
class: 'action primary action-primary action-accept',

/**
* Click handler.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,21 @@ define([
'use strict';

describe('ui/js/modal/confirm', function () {
var element = $('<div>some element</div>'),

var widget,
element,
confirm;

beforeEach(function () {
element = $('<div id="element">some element</div>');
confirm = element.confirm({});
widget = element.confirm({}).data('mage-confirm');
});

afterEach(function () {
$('element').remove();

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we remove this extra empty line, please?

});

it('Check for modal definition', function () {
expect(confirm).toBeDefined();
Expand All @@ -23,5 +36,11 @@ define([
it('Integration: modal created on page', function () {
expect(confirm.length).toEqual(1);
});
it('Check confirm class button', function () {
var expectedClassResult = 'action primary action-primary action-accept',
expectedClass = widget.options.buttons[1].class;

expect($(expectedClass).selector).toContain(expectedClassResult);
});
});
});