Skip to content

Commit 3e39b6d

Browse files
committed
Fixing tests / datepicker
1 parent 2e62269 commit 3e39b6d

File tree

6 files changed

+8
-7
lines changed

6 files changed

+8
-7
lines changed

addon/mixins/jqui-widget.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ export default Ember.Mixin.create({
1717
_this._gatherEvents(options);
1818

1919
// Workaround for bug in jQuery UI datepicker
20+
// $.ui.datepicker is not a function
2021
var ui;
2122
var uiType = _this.get('uiType');
22-
if ((typeof Ember.$.ui[uiType] !== "function") && uiType === "datepicker") {
23-
_this.$().datepicker();
23+
if (uiType === "datepicker") {
24+
_this.$().datepicker(options);
2425
ui = _this.$(uiType)['widget'];
2526
} else {
2627

tests/unit/components/jqui-accordion-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ test('it renders', function() {
1616
equal(component._state, 'preRender');
1717

1818
// appends the component to the page
19-
this.append();
19+
this.render();
2020
equal(component._state, 'inDOM');
2121
});

tests/unit/components/jqui-button-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ test('it renders', function() {
1616
equal(component._state, 'preRender');
1717

1818
// appends the component to the page
19-
this.append();
19+
this.render();
2020
equal(component._state, 'inDOM');
2121
});

tests/unit/components/jqui-progress-bar-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ test('it renders', function() {
1616
equal(component._state, 'preRender');
1717

1818
// appends the component to the page
19-
this.append();
19+
this.render();
2020
equal(component._state, 'inDOM');
2121
});

tests/unit/components/jqui-slider-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ test('it renders', function() {
1616
equal(component._state, 'preRender');
1717

1818
// appends the component to the page
19-
this.append();
19+
this.render();
2020
equal(component._state, 'inDOM');
2121
});

tests/unit/components/jqui-spinner-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ test('it renders', function() {
1616
equal(component._state, 'preRender');
1717

1818
// appends the component to the page
19-
this.append();
19+
this.render();
2020
equal(component._state, 'inDOM');
2121
});

0 commit comments

Comments
 (0)