bug/bug/bug.js | 9 +++++---- bug/bug/test.js | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-)
New commits: commit 8a19cf7ea488f6b16989e7e49d18bef2452785af Author: Kate Goss <katherine.g...@gmail.com> Date: Sat Feb 18 20:49:17 2012 +0000 fdo#42006: Make Bugzilla Assistant tests pass in IE8 diff --git a/bug/bug/bug.js b/bug/bug/bug.js index b2e4ed6..d670092 100644 --- a/bug/bug/bug.js +++ b/bug/bug/bug.js @@ -208,10 +208,11 @@ element.show(); } }, - - state_submit_error_regexps: [/CLASS="THROW_ERROR">([^<]*)/i, /FONT SIZE=\"\+2\">([^<]*)/i, // bugzilla < 4 - /<DIV CLASS=\"BOX\">\s+<P>([^<]+)/i], // bugzilla >= 4 - state_submit_success_regexp: /TITLE>Bug ([0-9]+)/i, + // Making the double quotes optional caters for differing browser + // behaviour with jquery .text() - IE8 removes double quotes. + state_submit_error_regexps: [/CLASS="?THROW_ERROR"?>([^<]*)/i, /FONT SIZE=\"?\+2\"?>([^<]*)/i, // bugzilla < 4 + /<DIV CLASS=\"?BOX\"?>\s+<P>([^<]+)/i], // bugzilla >= 4 + state_submit_success_regexp: /Bug ([0-9]+)/i, state_submit_element: 'html', state_submit: function() { diff --git a/bug/bug/test.js b/bug/bug/test.js index 93daea0..73b194b 100644 --- a/bug/bug/test.js +++ b/bug/bug/test.js @@ -274,12 +274,13 @@ test("state_submit", function() { $.bug.state_submit_element = 'div'; // because <html> can't be inserted in the dom - $('#submissionoutput').html('<div><div><title>Bug ' + bug + ' Submitted</title></div></div>'); + // <title> cannot be inserted by IE8 + $('#submissionoutput').html('<div><div>Bug ' + bug + ' Submitted</div></div>'); $('#submissionoutput').load(); equal($('.bug', element).text(), bug, 'bug number'); ok(!element.hasClass('inprogress'), 'is no longer progress'); - var error = ' ERROR '; + var error = 'ERROR'; equal($('.error').text(), '', 'error is not set'); // make sure you enclose the useful elements with <div><div> ... </div></div> _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits