aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorCa-Phun Ung <pazu2k@gmail.com>2008-12-22 19:18:15 +0000
committerCa-Phun Ung <pazu2k@gmail.com>2008-12-22 19:18:15 +0000
commit80feca9864b360eeb26a2f8dae7aa0d9215496b4 (patch)
tree93364530960ee6c0e629a56bd36f73f31d469420 /tests
parent224ae23179569ebed8e5a9b8966ce7bcd2dad0a9 (diff)
downloadjquery-ui-80feca9864b360eeb26a2f8dae7aa0d9215496b4.tar.gz
jquery-ui-80feca9864b360eeb26a2f8dae7aa0d9215496b4.zip
Datepicker #3647: fixed disabled state for inline datepicker so it looks disabled visually and removed the erroneous cover div.
Diffstat (limited to 'tests')
-rw-r--r--tests/datepicker.js12
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/datepicker.js b/tests/datepicker.js
index 7ae71fc9e..1441399ef 100644
--- a/tests/datepicker.js
+++ b/tests/datepicker.js
@@ -425,19 +425,13 @@ test('enableDisable', function() {
var inl = init('#inl');
var dp = $('.ui-datepicker-inline', inl);
ok(!inl.datepicker('isDisabled'), 'Enable/disable inline - initially marked as enabled');
- ok($('.ui-datepicker-disabled', inl).length == 0, 'Enable/disable inline - cover initially absent');
+ ok(!dp.children().is('.ui-state-disabled'), 'Enable/disable inline - not visually disabled initially');
inl.datepicker('disable');
ok(inl.datepicker('isDisabled'), 'Enable/disable inline - now marked as disabled');
- var disabled = $('.ui-datepicker-disabled', inl);
- var dp = $('.ui-datepicker-inline', inl);
- ok(disabled.length == 1, 'Enable/disable inline - cover now present');
- ok(disabled.offset().top == dp.offset().top && disabled.offset().left == dp.offset().left,
- 'Enable/disable inline - cover positioning');
- ok(disabled.width() == dp.width() && disabled.height() == dp.height(),
- 'Enable/disable inline - cover sizing');
+ ok(dp.children().is('.ui-state-disabled'), 'Enable/disable inline - visually disabled');
inl.datepicker('enable');
ok(!inl.datepicker('isDisabled'), 'Enable/disable inline - now marked as enabled');
- ok($('.ui-datepicker-disabled', inl).length == 0, 'Enable/disable inline - cover now absent');
+ ok(!dp.children().is('.ui-state-disabled'), 'Enable/disable inline - not visiually disabled');
inl.datepicker('destroy');
});