Skip to content

Commit a1d1ace

Browse files
committed
ACP2E-1369: clear previous error message if ajax request completed on subsequent try; fix jasmine test
1 parent 18564ed commit a1d1ace

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

dev/tests/js/jasmine/tests/lib/mage/backend/bootstrap.test.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,20 @@ define([
2222

2323
describe('"sendPostponeRequest" method', function () {
2424
it('should insert "Error" notification if request failed', function () {
25+
var data = {
26+
jqXHR: {
27+
responseText: 'error',
28+
status: '503',
29+
readyState: 4
30+
},
31+
textStatus: 'error'
32+
};
33+
2534
$pageMainActions.appendTo('body');
2635
$('body').notification();
2736

2837
// eslint-disable-next-line jquery-no-event-shorthand
29-
$.ajaxSettings.error();
38+
$.ajaxSettings.error(data.jqXHR, data.textStatus);
3039

3140
expect($('.message-error').length).toBe(1);
3241
expect(

0 commit comments

Comments
 (0)