bug/bug/bug.js | 2 +- bug/bug/test.html | 8 ++++---- bug/bug/test.js | 17 +++++++++-------- 3 files changed, 14 insertions(+), 13 deletions(-)
New commits: commit 43f0a28aa4f6376d4d84445eb43f49f6183a086b Author: Loic Dachary <l...@dachary.org> Date: Thu Sep 22 12:24:30 2011 +0200 The component must be submitted to bugzilla with the space, not converted with an underscore. diff --git a/bug/bug/bug.js b/bug/bug/bug.js index 0940d31..a3c5e1a 100644 --- a/bug/bug/bug.js +++ b/bug/bug/bug.js @@ -179,7 +179,7 @@ if(!element.hasClass('initialized')) { $('.go', element).click(function() { var version = $('.state_version .chosen').attr('data'); - var component = $('.state_component .chosen').attr('data'); + var component = $('.state_component .chosen').text(); var short_desc = $('.state_subcomponent .active_subcomponent .chosen').attr('data') + ': ' + $('.state_description .short').val(); var comment = $('.state_description .long').val(); $("body").css("cursor", "progress"); diff --git a/bug/bug/test.html b/bug/bug/test.html index 15a9659..9c08786 100644 --- a/bug/bug/test.html +++ b/bug/bug/test.html @@ -57,14 +57,14 @@ </div> <div class="choices"> <ul> - <li data="BASIC" class="choice">BASIC</li> + <li data="Formula_editor" class="choice">Formula editor</li> <li data="OTHER" class="choice">OTHER</li> </ul> </div> </div> <div class="comments"> <div class="comment OTHER"></div> - <div class="comment BASIC"></div> + <div class="comment Formula_editor"></div> </div> </div> @@ -74,7 +74,7 @@ <div class="state_subcomponent"> <div class="subcomponents"> - <div xmlns="" class="BASIC"> + <div xmlns="" class="Formula_editor"> <div class="subcomponent select"> <div class="select-header"> <div class="chosen">(chose one)</div> @@ -83,7 +83,7 @@ <ul> <li class="choice" data="">(all other problems)</li> <li data="Macros" class="choice">Macros</li> - <li data="BASIC" class="choice">BASIC</li> + <li data="Formula_editor" class="choice">Formula editor</li> <li data="IDE" class="choice">IDE</li> </ul> </div> diff --git a/bug/bug/test.js b/bug/bug/test.js index 70785f8..3a60319 100644 --- a/bug/bug/test.js +++ b/bug/bug/test.js @@ -128,11 +128,11 @@ test("state_component", function() { $.bug.state_component(); equal(element.css('display'), 'block'); equal($('.component .chosen', element).attr('data'), undefined, 'initialy nothing selected'); - equal($('.comment.BASIC', element).css('display'), 'none', 'BASIC hidden'); + equal($('.comment.Formula_editor', element).css('display'), 'none', 'Formula_editor hidden'); equal($('.comment.OTHER', element).css('display'), 'none', 'OTHER hidden'); - $(".component .choice[data='BASIC']", element).click(); - $(".component .choice[data='BASIC']", element).mouseenter(); - equal($('.comment.BASIC', element).css('display'), 'block', 'BASIC is visible'); + $(".component .choice[data='Formula_editor']", element).click(); + $(".component .choice[data='Formula_editor']", element).mouseenter(); + equal($('.comment.Formula_editor', element).css('display'), 'block', 'Formula_editor is visible'); equal($('.comment.OTHER', element).css('display'), 'none', 'OTHER hidden'); $.bug.state_subcomponent = state_subcomponent; @@ -149,11 +149,11 @@ test("state_subcomponent", function() { var element = $('.state_subcomponent'); equal(element.css('display'), 'none'); equal($('.active_subcomponent .select', element).length, 0, 'no .select element'); - $(".component .chosen").attr('data', 'BASIC'); + $(".component .chosen").attr('data', 'Formula_editor'); $.bug.state_subcomponent(); equal($('.active_subcomponent .select', element).length, 1, 'one .select element'); equal(element.css('display'), 'block'); - $(".active_subcomponent .subcomponent .choice[data='BASIC']", element).click(); + $(".active_subcomponent .subcomponent .choice[data='Formula_editor']", element).click(); $.bug.state_version = state_version; $.bug.refresh_related_bugs = refresh_related_bugs; @@ -213,8 +213,9 @@ test("state_submit", function() { equal(element.css('display'), 'block'); ok(element.hasClass('initialized'), 'is initialized'); $.bug.state_component(); - var component = 'BASIC'; + var component = 'Formula_editor'; $(".state_component .choice[data='" + component + "']").click(); + var component_text = $(".state_component .chosen").text(); var subcomponent = 'SUBCOMPONENT'; $('.state_subcomponent .active_subcomponent .chosen').attr('data', subcomponent); $.bug.state_version(); @@ -226,7 +227,7 @@ test("state_submit", function() { $('.state_description .long').val(comment); var bug = '40763'; $.bug.ajax = function(type, url, data) { - if(data.component == component && + if(data.component == component_text && data.version == version && data.short_desc == subcomponent + ': ' + short_desc && data.comment == comment) { _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits