Skip to content

Commit b4fe70c

Browse files
committed
Correct unit tests
1 parent d811f9a commit b4fe70c

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/form/element/image-uploader.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ define([
7575

7676
expect(browser.openDialog).toHaveBeenCalledWith(
7777
'http://example.com/target_element_id/theTargetId/store/3/type/image/' +
78-
'?isAjax=true&current_tree_path=d3lzaXd5Zw,,',
78+
'?isAjax=true/tree_path/wysiwyg&current_tree_path=d3lzaXd5Zw,,',
7979
null,
8080
null,
8181
'Hello world',

dev/tests/js/jasmine/tests/lib/mage/browser.test.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ define([
99
], function (browser, $) {
1010
'use strict';
1111

12-
var obj;
12+
var obj,
13+
openUrl = 'http://example.com/target_element_id/theTargetId/tree_path/wysiwyg&current_tree_path=d3lzaXd5Zw,';
1314

1415
beforeEach(function () {
1516
/**
@@ -41,8 +42,8 @@ define([
4142
}
4243
};
4344
});
44-
obj.openDialog('instance/url', 100, 100, 'title', options);
45-
obj.openDialog('instance/url', 100, 100, 'title', options);
45+
obj.openDialog(openUrl, 100, 100, 'title', options);
46+
obj.openDialog(openUrl, 100, 100, 'title', options);
4647
expect($.ajax.calls.count()).toBe(1);
4748
});
4849

@@ -59,8 +60,8 @@ define([
5960
}
6061
};
6162
});
62-
obj.openDialog('instance/url/target_element_id/YDW2424/', 100, 100, 'title', undefined);
63-
obj.openDialog('instance/target_element_id/Y45GDRg/', 100, 100, 'title', undefined);
63+
obj.openDialog(openUrl, 100, 100, 'title', undefined);
64+
obj.openDialog(openUrl, 100, 100, 'title', undefined);
6465
expect($.ajax.calls.count()).toBe(1);
6566
});
6667
});

0 commit comments

Comments
 (0)