fix tests for ie7
This commit is contained in:
@ -15,8 +15,8 @@ $(function () {
|
||||
|
||||
e.click();
|
||||
var p = tip(e);
|
||||
equal(p.find('input[type=text]').val(), '', 'input val is empty string')
|
||||
p.find('button[type=button]').click();
|
||||
equal(p.find('input[type="text"]').val(), '', 'input val is empty string')
|
||||
p.find('.editable-cancel').click();
|
||||
ok(!p.is(':visible'), 'popover was removed')
|
||||
})
|
||||
|
||||
@ -26,7 +26,7 @@ $(function () {
|
||||
e.click();
|
||||
var p = tip(e);
|
||||
equal(p.find('input[type=text]').attr('placeholder'), 'abc', 'placeholder exists');
|
||||
p.find('button[type=button]').click();
|
||||
p.find('.editable-cancel').click();
|
||||
ok(!p.is(':visible'), 'popover was removed');
|
||||
});
|
||||
|
||||
@ -36,7 +36,7 @@ $(function () {
|
||||
e.click();
|
||||
var p = tip(e);
|
||||
ok(p.find('input[type=text]').hasClass('span4'), 'class set correctly');
|
||||
p.find('button[type=button]').click();
|
||||
p.find('.editable-cancel').click();
|
||||
ok(!p.is(':visible'), 'popover was removed');
|
||||
});
|
||||
|
||||
@ -104,9 +104,9 @@ $(function () {
|
||||
setTimeout(function() {
|
||||
ok(p.is(':visible'), 'popover still shown');
|
||||
ok(p.find('.editable-error-block').length, 'class "editable-error-block" exists');
|
||||
equal(p.find('.editable-error-block').text(), msg.replace('\n', ''), 'error msg shown');
|
||||
equal(p.find('.editable-error-block').html(), msg.replace('\n', '<br>'), 'newline replaced with br');
|
||||
p.find('button[type=button]').click();
|
||||
equal(p.find('.editable-error-block').text().toLowerCase(), msg.replace('\n', ''), 'error msg shown');
|
||||
equal(p.find('.editable-error-block').html().toLowerCase(), msg.replace('\n', '<br>'), 'newline replaced with br');
|
||||
p.find('.editable-cancel').click();
|
||||
ok(!p.is(':visible'), 'popover was removed');
|
||||
e.remove();
|
||||
start();
|
||||
@ -137,7 +137,7 @@ $(function () {
|
||||
ok(p.is(':visible'), 'popover still shown');
|
||||
ok(p.find('.error').length, 'class "error" exists');
|
||||
equal(p.find('.editable-error-block').text(), 'required1', 'error msg shown');
|
||||
p.find('button[type=button]').click();
|
||||
p.find('.editable-cancel').click();
|
||||
ok(!p.is(':visible'), 'popover was removed');
|
||||
|
||||
e = e1;
|
||||
@ -148,7 +148,7 @@ $(function () {
|
||||
ok(p.is(':visible'), 'popover still shown');
|
||||
ok(p.find('.error').length, 'class "error" exists');
|
||||
equal(p.find('.editable-error-block').text(), 'required2', 'error msg shown');
|
||||
p.find('button[type=button]').click();
|
||||
p.find('.editable-cancel').click();
|
||||
ok(!p.is(':visible'), 'popover was removed');
|
||||
});
|
||||
*/
|
||||
@ -174,7 +174,7 @@ $(function () {
|
||||
ok(p.is(':visible'), 'popover still shown');
|
||||
ok(p.find('.editable-error-block').length, 'class "editable-error-block" exists');
|
||||
equal(p.find('.editable-error-block').text(), 'error', 'error msg shown');
|
||||
p.find('button[type=button]').click();
|
||||
p.find('.editable-cancel').click();
|
||||
ok(!p.is(':visible'), 'popover was removed');
|
||||
e.remove();
|
||||
start();
|
||||
@ -204,7 +204,7 @@ $(function () {
|
||||
equal(e.data('editable').value, 'xyz', 'value ok');
|
||||
equal(e.text(), 'xyz', 'text ok');
|
||||
|
||||
p.find('button[type=button]').click();
|
||||
p.find('.editable-cancel').click();
|
||||
ok(!p.is(':visible'), 'popover was removed');
|
||||
e.remove();
|
||||
start();
|
||||
@ -309,7 +309,7 @@ $(function () {
|
||||
ok(p.find('.editable-error-block').length, 'class "error" exists')
|
||||
equal(p.find('.editable-error-block').text(), 'customtext', 'error shown')
|
||||
|
||||
p.find('button[type=button]').click();
|
||||
p.find('.editable-cancel').click();
|
||||
ok(!p.is(':visible'), 'popover was removed')
|
||||
|
||||
e.remove();
|
||||
@ -339,7 +339,7 @@ $(function () {
|
||||
ok(p.find('.error').length, 'class "error" exists')
|
||||
equal(p.find('.editable-error-block').text(), 'Internal server error', 'error shown')
|
||||
|
||||
p.find('button[type=button]').click();
|
||||
p.find('.editable-cancel').click();
|
||||
ok(!p.is(':visible'), 'popover was removed')
|
||||
|
||||
e.remove();
|
||||
|
Reference in New Issue
Block a user