Skip to content

Commit 10d5906

Browse files
committed
MAGETWO-37598: Cover code w. unit tests
1 parent 0b38f7a commit 10d5906

File tree

1 file changed

+33
-0
lines changed
  • dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/dialog

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/**
2+
* Copyright © 2015 Magento. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
6+
define([
7+
'jquery',
8+
'Magento_Ui/js/dialog/dialog'
9+
], function ($) {
10+
'use strict';
11+
12+
describe('ui/js/dialog/dialog', function () {
13+
var element = $('<div>some element</div>'),
14+
dialog = element.dialog({}).data('mage-dialog');
15+
16+
beforeEach(function () {
17+
});
18+
19+
afterEach(function () {
20+
});
21+
22+
it('Check for dialog definition', function () {
23+
expect(dialog).toBeDefined();
24+
});
25+
it('Show/hide function check', function () {
26+
expect(element.trigger('openDialog')).toBe(element);
27+
expect(element.trigger('closeDialog')).toBe(element);
28+
});
29+
it('Check for transition support', function () {
30+
expect(dialog.whichTransitionEvent()).toBe('webkitTransitionEnd');
31+
});
32+
});
33+
});

0 commit comments

Comments
 (0)