From 07658fa91da4748712929f7644fdb027472f39d9 Mon Sep 17 00:00:00 2001 From: "ccooper%deadsquid.com" Date: Tue, 14 Aug 2007 17:41:23 +0000 Subject: [PATCH] b=384365 - enable new testcases by default b=384366 - change link text to "view/search tests" b=387475 - add query to footer to show ungrouped testcases b=389013 - prefill product and branch on new testcases b=344703 - remember filter state after submitting testcase changes in manage_*.cgi b=363001 - add query option to advanced_search to search for results with/without bugs specified b=363293 - add testcase preview to results page --- webtools/litmus/Litmus/DB/Testcase.pm | 6 + webtools/litmus/Litmus/DB/Testresult.pm | 10 ++ webtools/litmus/advanced_search.cgi | 13 +++ webtools/litmus/js/ManageSubgroups.js | 26 ++++- webtools/litmus/js/ManageTestRuns.js | 21 +++- webtools/litmus/js/ManageTestcases.js | 107 +++++++++++++++++- webtools/litmus/js/ManageTestgroups.js | 20 +++- webtools/litmus/js/MochiKit/MochiKit.js | 4 +- webtools/litmus/js/SelectBoxes.js | 13 ++- webtools/litmus/manage_subgroups.cgi | 8 ++ webtools/litmus/manage_test_runs.cgi | 62 +++++----- webtools/litmus/manage_testcases.cgi | 10 ++ webtools/litmus/manage_testgroups.cgi | 6 + .../manage_testcases_add_testcase.html | 6 +- .../manage_testcases_clone_testcase.html | 2 +- .../manage_testcases_edit_testcase.html | 6 +- .../manage_testcases_load_testcase.html | 6 +- webtools/litmus/show_test.cgi | 6 + .../en/default/admin/edit_subgroup.tmpl | 5 +- .../en/default/admin/edit_test_run.tmpl | 2 + .../en/default/admin/edit_testcase.tmpl | 6 +- .../en/default/admin/edit_testgroup.tmpl | 2 + .../en/default/admin/manage_subgroups.tmpl | 19 +++- .../en/default/admin/manage_test_runs.tmpl | 16 ++- .../en/default/admin/manage_testcases.tmpl | 23 +++- .../en/default/admin/manage_testgroups.tmpl | 13 ++- .../en/default/global/litmus_footer.tmpl | 3 +- .../reporting/advanced_search_form.tmpl | 4 + .../en/default/reporting/result_display.tmpl | 13 +++ .../en/default/show/testcase_list.tmpl | 4 +- .../en/default/sidebar/widget_testing.tmpl | 2 +- 31 files changed, 367 insertions(+), 77 deletions(-) diff --git a/webtools/litmus/Litmus/DB/Testcase.pm b/webtools/litmus/Litmus/DB/Testcase.pm index a483703bdac..9857dd0459a 100755 --- a/webtools/litmus/Litmus/DB/Testcase.pm +++ b/webtools/litmus/Litmus/DB/Testcase.pm @@ -143,6 +143,12 @@ WHERE tc.community_enabled=1 }); +__PACKAGE__->set_sql(Ungrouped => qq{ +SELECT tc.* +FROM testcases tc LEFT JOIN testcase_subgroups tcsg ON (tc.testcase_id=tcsg.testcase_id) +WHERE tcsg.subgroup_id IS NULL +}); + ######################################################################### # isCompleted($$$$$) # diff --git a/webtools/litmus/Litmus/DB/Testresult.pm b/webtools/litmus/Litmus/DB/Testresult.pm index bd42a6c91dd..626c97ab28b 100755 --- a/webtools/litmus/Litmus/DB/Testresult.pm +++ b/webtools/litmus/Litmus/DB/Testresult.pm @@ -261,6 +261,16 @@ sub getTestResults($\@\@$) { $where .= " AND tr.is_automated_result="; $where .= $criterion->{'value'} == 1 ? '1' : '0'; } + } elsif ($criterion->{'field'} eq 'withbugs') { + if ($criterion->{'value'} ne 'all') { + if ($criterion->{'value'} eq '1') { + $from .= ", test_result_bugs trb"; + $where .= " AND tr.testresult_id=trb.test_result_id"; + } else { + $from =~ s/test_results tr,/test_results tr LEFT JOIN test_result_bugs trb ON (tr.testresult_id=trb.test_result_id),/; + $where .= " AND trb.bug_id IS NULL"; + } + } } elsif ($criterion->{'field'} eq 'user_id') { if ($from !~ /users u/) { $from .= ", users u"; diff --git a/webtools/litmus/advanced_search.cgi b/webtools/litmus/advanced_search.cgi index b557b9b3d35..d78fb03af68 100755 --- a/webtools/litmus/advanced_search.cgi +++ b/webtools/litmus/advanced_search.cgi @@ -172,6 +172,19 @@ if ($c->param) { $limit_criteria .= "Display manual results only
"; } } + } elsif ($param eq 'withbugs') { + my $value = $c->param($param); + if ($value ne 'all') { + if ($value eq '1') { + push @where, {field => 'withbugs', + value => 1}; + $limit_criteria .= "Results with associated bugs
"; + } else { + push @where, {field => 'withbugs', + value => '0E0'}; + $limit_criteria .= "Results without associated bugs
"; + } + } } elsif ($param eq 'my_results_only') { push @where, {field => 'user_id', value => $cookie->{'user_id'}}; diff --git a/webtools/litmus/js/ManageSubgroups.js b/webtools/litmus/js/ManageSubgroups.js index 089c3288e7b..d69b74c006f 100644 --- a/webtools/litmus/js/ManageSubgroups.js +++ b/webtools/litmus/js/ManageSubgroups.js @@ -182,6 +182,7 @@ function populateSubgroup(data) { function blankSubgroupForm(formid) { blankForm(formid); + updatePersistVars(); document.getElementById('subgroup_id_display').innerHTML = ''; var selectBoxAll = document.getElementById('testcases_for_product'); selectBoxAll.options.length = 0; @@ -203,10 +204,10 @@ function blankSubgroupForm(formid) { function switchToAdd() { disableModeButtons(); blankSubgroupForm('edit_subgroup_form'); - document.getElementById('subgroup_id_display').innerHTML = 'Automatically generated for a new subgroup'; + document.getElementById('subgroup_id_display_edit').innerHTML = 'Automatically generated for a new subgroup'; document.getElementById('testgroups_link_display').innerHTML = 'A new subgroup does not belong to any testgroups by default.
Use the Manage Testgroups interface to assign the subgroup to testgroups after the new subgroup is created.
'; - document.getElementById('testrunner_group_id').innerHTML = 'Not Applicable'; - document.getElementById('submit').value = 'Add Subgroup'; + document.getElementById('testrunner_group_id').innerHTML = 'Not Applicable'; + document.getElementById('submit').value = 'Add Subgroup'; document.getElementById('mode').value = 'add'; enableForm('edit_subgroup_form'); document.getElementById('subgroup_display_div').style.display = 'none'; @@ -279,5 +280,24 @@ function previewTestcase(selectID) { } } +function updatePersistVars() { + var productBox = document.getElementById('product_filter'); + var branchBox = document.getElementById('branch_filter'); + var testgroupBox = document.getElementById('testgroup_filter'); + if (productBox.selectedIndex) { + var productPersist = document.getElementById('product_persist'); + productPersist.value = productBox.options[productBox.selectedIndex].value; + } + if (branchBox.selectedIndex) { + var branchPersist = document.getElementById('branch_persist'); + branchPersist.value = branchBox.options[branchBox.selectedIndex].value; + } + if (testgroupBox.selectedIndex) { + var testgroupPersist = document.getElementById('testgroup_persist'); + testgroupPersist.value = testgroupBox.options[testgroupBox.selectedIndex].value; + } +} + + var manageTestcasesHelpTitle="Help with Managing Testcases"; var manageTestcasesHelpText="

The select box on the left contains all the testcases for the chosen product, INCLUDING any testcases already contained in the subgroup. You can use the button to add testcases to the subgroup, and the button to remove testcases from the subgroup. NOTE: neither of the actions will alter the list of testcases on the left.

You can preview any testcase from the left-hand select box by selecting the testcase, and then clicking on the 'Preview Testcase' link below the select box. If more than one testcase is selected, only the first testcase will be previewed.

You can change the display order of testcases within the subgroup using the and buttons to the right of the right-hand select box. Testcases can be re-ordered singly or in groups by selecting multiple testcases in the right-hand select box.

"; diff --git a/webtools/litmus/js/ManageTestRuns.js b/webtools/litmus/js/ManageTestRuns.js index ffca39b1bbd..d4dbc16fee5 100755 --- a/webtools/litmus/js/ManageTestRuns.js +++ b/webtools/litmus/js/ManageTestRuns.js @@ -67,7 +67,7 @@ function filterList() { filter_req = doSimpleXMLHttpRequest('manage_test_runs.cgi', { searchTestRunList: 1, product: (productfilter.options[productfilter.selectedIndex].value == '' ? '' : productfilter.options[productfilter.selectedIndex].value), - branch: (branchfilter.options[branchfilter.selectedIndex].value == '' ? '' : branchfilter.options[branchfilter.selectedIndex].value), + branch: (branchfilter.options[branchfilter.selectedIndex].value == '' ? '' : branchfilter.options[branchfilter.selectedIndex].value) }); // if something went wrong, just show all the tests: @@ -112,7 +112,7 @@ function loadTestRun(silent) { toggleMessage('loading','Loading Test Run ID# ' + test_run_id + '...'); } var url = 'json.cgi?test_run_id=' + test_run_id; - fetchJSON(url,populateTestRun,silent); + return fetchJSON(url,populateTestRun,silent); } function populateTestRun(data) { @@ -142,7 +142,7 @@ function populateTestRun(data) { } } - changeProduct(); + changeProduct(''); var branchBox = document.getElementById('branch'); populateBranches(branchBox,productBox); var found_branch = setSelected(branchBox,test_run.branch_id.branch_id); @@ -257,6 +257,7 @@ function populateAllTestgroups() { function blankTestRunForm(formid) { blankForm(formid); + updatePersistVars(); resetTable('tblNewCriteria'); addRowToTable('tblNewCriteria'); document.getElementById('test_run_id_display').innerHTML = ''; @@ -276,7 +277,7 @@ function blankTestRunForm(formid) { test_run = new Object(); - changeProduct(); + changeProduct(''); var productBox = document.getElementById('product'); var branchBox = document.getElementById('branch'); populateBranches(branchBox,productBox); @@ -439,3 +440,15 @@ function previewTestgroup(selectID) { } } +function updatePersistVars() { + var productBox = document.getElementById('product_filter'); + var branchBox = document.getElementById('branch_filter'); + if (productBox.selectedIndex) { + var productPersist = document.getElementById('product_persist'); + productPersist.value = productBox.options[productBox.selectedIndex].value; + } + if (branchBox.selectedIndex) { + var branchPersist = document.getElementById('branch_persist'); + branchPersist.value = branchBox.options[branchBox.selectedIndex].value; + } +} diff --git a/webtools/litmus/js/ManageTestcases.js b/webtools/litmus/js/ManageTestcases.js index b1b6740f1e6..33221d6632f 100644 --- a/webtools/litmus/js/ManageTestcases.js +++ b/webtools/litmus/js/ManageTestcases.js @@ -1,5 +1,6 @@ var testcase; var filter_req; +var initial_load = 1; var showAllTests = function(err) { // if they cancelled, then just don't change anything: @@ -74,7 +75,7 @@ function filterList() { testgroup: (testgroupfilter.options[testgroupfilter.selectedIndex].value == '' ? '' : testgroupfilter.options[testgroupfilter.selectedIndex].value), subgroup: (subgroupfilter.options[subgroupfilter.selectedIndex].value == '' ? - '' : subgroupfilter.options[subgroupfilter.selectedIndex].value), + '' : subgroupfilter.options[subgroupfilter.selectedIndex].value) }); // if something went wrong, just show all the tests: filter_req.addErrback(showAllTests); @@ -118,7 +119,7 @@ function loadTestcase(silent) { toggleMessage('loading','Loading Testcase ID# ' + testcase_id + '...'); } var url = 'json.cgi?testcase_id=' + testcase_id; - fetchJSON(url,populateTestcase,silent); + return fetchJSON(url,populateTestcase,silent); } function populateTestcase(data) { @@ -244,6 +245,9 @@ function populateTestcase(data) { function blankTestcaseForm(formid) { blankForm(formid); + updatePersistVars(); + document.getElementById('enabled').checked = true; + document.getElementById('communityenabled').checked = true; document.getElementById('testcase_id_display').innerHTML = ''; document.getElementById('creation_date').innerHTML = ''; document.getElementById('last_updated').innerHTML = ''; @@ -258,13 +262,34 @@ function switchToAdd() { blankTestcaseForm('edit_testcase_form'); var productBox = document.getElementById('product'); loadProducts(productBox,'',1); + var productfilter = document.getElementById('product_filter'); + if (productfilter.selectedIndex) { + var productId = productfilter.options[productfilter.selectedIndex].value; + for (var i=0; i containing the list of possible default values @@ -201,14 +204,16 @@ function loadSubgroups(subgroupBox,mySuffix,silent) { var testgroupId = testgroupBox.options[testgroupBox.selectedIndex].value; if (!testgroupId) { // No testgroup selected. - return; + clearSelect(subgroupBox); + addNullEntry(subgroupBox); + return undefined; } disableForm(formName); if (!silent) { toggleMessage('loading','Loading Subgroups...'); } var url = 'json.cgi?testgroup_id=' + testgroupId; - fetchJSON(url,populateSubgroups,silent); + return fetchJSON(url,populateSubgroups,silent); } function populateSubgroups(data) { @@ -227,8 +232,8 @@ function populateSubgroups(data) { testgroup.subgroups[i].subgroup_id); } } - toggleMessage('none'); FormInit(document.forms[formName], document.location.search, 'subgroup'+suffix); + toggleMessage('none'); enableForm(formName); } @@ -360,4 +365,4 @@ function setSelected(selectBox,selectedValue) { options[0].selected = true; } return found_selected; -} \ No newline at end of file +} diff --git a/webtools/litmus/manage_subgroups.cgi b/webtools/litmus/manage_subgroups.cgi index 74c7c6445cd..e5fc00d2b06 100755 --- a/webtools/litmus/manage_subgroups.cgi +++ b/webtools/litmus/manage_subgroups.cgi @@ -78,6 +78,13 @@ if ($c->param("searchSubgroupList")) { # get here, then you need to be an admin: Litmus::Auth::requireProductAdmin('manage_subgroups.cgi'); +my $product_persist = $c->param('product_persist') ? $c->param('product_persist') : 0; +my $branch_persist = $c->param('branch_persist') ? $c->param('branch_persist') : 0; +my $testgroup_persist = $c->param('testgroup_persist') ? $c->param('testgroup_persist') : 0; +$vars->{'product_persist'} = $product_persist; +$vars->{'branch_persist'} = $branch_persist; +$vars->{'testgroup_persist'} = $testgroup_persist; + if ($c->param("subgroup_id")) { $subgroup_id = $c->param("subgroup_id"); } @@ -115,6 +122,7 @@ if ($c->param("delete_subgroup_button")) { requireField('product', $c->param('product')); requireField('branch', $c->param('branch')); my $enabled = $c->param('enabled') ? 1 : 0; + if ($c->param("mode") eq "add") { Litmus::Auth::requireProductAdmin("manage_subgroups.cgi", $c->param('product')); my %hash = ( diff --git a/webtools/litmus/manage_test_runs.cgi b/webtools/litmus/manage_test_runs.cgi index e1d9cf8c713..fff34024a3f 100755 --- a/webtools/litmus/manage_test_runs.cgi +++ b/webtools/litmus/manage_test_runs.cgi @@ -40,6 +40,35 @@ use CGI; use Date::Manip; use JSON; +######################################################################### +sub getCriteria { + my ($c) = @_; + + my $matched_rows; + my @criteria; + for my $param ($c->param) { + if ($param =~ /^build_id_new_(\d+)$/ or + $param =~ /^platform_new_(\d+)$/ or + $param =~ /^opsys_new_(\d+)$/) { + my $row_id = $1; + + next if ($matched_rows->{$row_id}); + + my $hash; + $hash->{'build_id'} = $c->param("build_id_new_$row_id") ? $c->param("build_id_new_$row_id") : ''; + $hash->{'platform_id'} = $c->param("platform_new_$row_id") ? $c->param("platform_new_$row_id") : 0; + $hash->{'opsys_id'} = $c->param($param) ? $c->param("opsys_new_$row_id") : 0; + + push @criteria, $hash; + $matched_rows->{$row_id} = 1; + } + } + + return \@criteria; +} + +######################################################################### + my $c = Litmus->cgi(); my $vars; @@ -72,6 +101,11 @@ if ($c->param("searchTestRunList")) { Litmus::Auth::requireRunDayAdmin('manage_test_runs.cgi'); +my $product_persist = $c->param('product_persist') ? $c->param('product_persist') : 0; +my $branch_persist = $c->param('branch_persist') ? $c->param('branch_persist') : 0; +$vars->{'product_persist'} = $product_persist; +$vars->{'branch_persist'} = $branch_persist; + if ($c->param("test_run_id")) { $test_run_id = $c->param("test_run_id"); } @@ -124,6 +158,7 @@ if ($c->param("delete_test_run_button")) { my $now = &UnixDate("today", "%q"); my @selected_testgroups = $c->param("test_run_testgroups"); my $criteria = &getCriteria($c); + if ($c->param("mode") eq "add") { my %hash = ( name => $c->param('name'), @@ -287,30 +322,3 @@ print $c->header(); Litmus->template()->process("admin/manage_test_runs.tmpl", $vars) || internalError("Error loading template: $@\n"); - -######################################################################### -sub getCriteria { - my ($c) = @_; - - my $matched_rows; - my @criteria; - for my $param ($c->param) { - if ($param =~ /^build_id_new_(\d+)$/ or - $param =~ /^platform_new_(\d+)$/ or - $param =~ /^opsys_new_(\d+)$/) { - my $row_id = $1; - - next if ($matched_rows->{$row_id}); - - my $hash; - $hash->{'build_id'} = $c->param("build_id_new_$row_id") ? $c->param("build_id_new_$row_id") : ''; - $hash->{'platform_id'} = $c->param("platform_new_$row_id") ? $c->param("platform_new_$row_id") : 0; - $hash->{'opsys_id'} = $c->param($param) ? $c->param("opsys_new_$row_id") : 0; - - push @criteria, $hash; - $matched_rows->{$row_id} = 1; - } - } - - return \@criteria; -} diff --git a/webtools/litmus/manage_testcases.cgi b/webtools/litmus/manage_testcases.cgi index a39511f0edc..f36d2bfc3ca 100755 --- a/webtools/litmus/manage_testcases.cgi +++ b/webtools/litmus/manage_testcases.cgi @@ -80,6 +80,15 @@ if ($c->param("searchTestcaseList")) { # get here, then you need to be an admin: Litmus::Auth::requireProductAdmin('manage_testcases.cgi'); +my $product_persist = $c->param('product_persist') ? $c->param('product_persist') : 0; +my $branch_persist = $c->param('branch_persist') ? $c->param('branch_persist') : 0; +my $testgroup_persist = $c->param('testgroup_persist') ? $c->param('testgroup_persist') : 0; +my $subgroup_persist = $c->param('subgroup_persist') ? $c->param('subgroup_persist') : 0; +$vars->{'product_persist'} = $product_persist; +$vars->{'branch_persist'} = $branch_persist; +$vars->{'testgroup_persist'} = $testgroup_persist; +$vars->{'subgroup_persist'} = $subgroup_persist; + if ($c->param("testcase_id")) { $testcase_id = $c->param("testcase_id"); if ($c->param("edit")) { @@ -129,6 +138,7 @@ if ($c->param("delete_testcase_button")) { my $enabled = $c->param('enabled') ? 1 : 0; my $community_enabled = $c->param('communityenabled') ? 1 : 0; my $now = &UnixDate("today","%q"); + if ($c->param("mode") eq "add") { Litmus::Auth::requireProductAdmin("manage_testcases.cgi", $c->param('product')); my %hash = ( diff --git a/webtools/litmus/manage_testgroups.cgi b/webtools/litmus/manage_testgroups.cgi index 3326c516f70..73f5dc6fa7a 100755 --- a/webtools/litmus/manage_testgroups.cgi +++ b/webtools/litmus/manage_testgroups.cgi @@ -72,6 +72,11 @@ if ($c->param("searchTestgroupList")) { # get here, then you need to be an admin: Litmus::Auth::requireProductAdmin('manage_testgroups.cgi'); +my $product_persist = $c->param('product_persist') ? $c->param('product_persist') : 0; +my $branch_persist = $c->param('branch_persist') ? $c->param('branch_persist') : 0; +$vars->{'product_persist'} = $product_persist; +$vars->{'branch_persist'} = $branch_persist; + if ($c->param("testgroup_id")) { $testgroup_id = $c->param("testgroup_id"); } @@ -109,6 +114,7 @@ if ($c->param("delete_testgroup_button")) { requireField('product', $c->param('product')); requireField('branch', $c->param('branch')); my $enabled = $c->param('enabled') ? 1 : 0; + if ($c->param("mode") eq "add") { Litmus::Auth::requireProductAdmin("manage_testgroups.cgi", $c->param('product')); my %hash = ( diff --git a/webtools/litmus/selenium/testcases/manage_testcases_add_testcase.html b/webtools/litmus/selenium/testcases/manage_testcases_add_testcase.html index 80772d53a34..d93d3053570 100644 --- a/webtools/litmus/selenium/testcases/manage_testcases_add_testcase.html +++ b/webtools/litmus/selenium/testcases/manage_testcases_add_testcase.html @@ -56,12 +56,12 @@ select product - label=Firefox (1) + label=Thunderbird (3) select branch - label=Trunk (1) + label=Trunk (5) click @@ -95,7 +95,7 @@ verifyTextPresent - Firefox + Thunderbird diff --git a/webtools/litmus/selenium/testcases/manage_testcases_clone_testcase.html b/webtools/litmus/selenium/testcases/manage_testcases_clone_testcase.html index f21106d96ae..1132f5e2482 100644 --- a/webtools/litmus/selenium/testcases/manage_testcases_clone_testcase.html +++ b/webtools/litmus/selenium/testcases/manage_testcases_clone_testcase.html @@ -30,7 +30,7 @@ verifyTextPresent - Firefox + Thunderbird diff --git a/webtools/litmus/selenium/testcases/manage_testcases_edit_testcase.html b/webtools/litmus/selenium/testcases/manage_testcases_edit_testcase.html index 0b2b647aec1..94c8fb3bf72 100644 --- a/webtools/litmus/selenium/testcases/manage_testcases_edit_testcase.html +++ b/webtools/litmus/selenium/testcases/manage_testcases_edit_testcase.html @@ -51,7 +51,7 @@ verifySelectedLabel product - Firefox* + Thunderbird* verifySelectedLabel @@ -66,7 +66,7 @@ select branch - label=2.0 Branch (11) + label=2.0 Branch (12) type @@ -90,7 +90,7 @@ verifyTextPresent - Firefox + Thunderbird diff --git a/webtools/litmus/selenium/testcases/manage_testcases_load_testcase.html b/webtools/litmus/selenium/testcases/manage_testcases_load_testcase.html index 2331f936a02..6f7874887f2 100644 --- a/webtools/litmus/selenium/testcases/manage_testcases_load_testcase.html +++ b/webtools/litmus/selenium/testcases/manage_testcases_load_testcase.html @@ -16,7 +16,7 @@ select product_filter - label=Firefox (1) + label=Thunderbird (3) waitForElementNotPresent @@ -26,7 +26,7 @@ select branch_filter - label=Trunk (1) + label=Trunk (5) waitForElementNotPresent @@ -50,7 +50,7 @@ verifyTextPresent - Firefox + Thunderbird diff --git a/webtools/litmus/show_test.cgi b/webtools/litmus/show_test.cgi index 1d0e3496fd4..895fe9c6d0a 100755 --- a/webtools/litmus/show_test.cgi +++ b/webtools/litmus/show_test.cgi @@ -230,6 +230,12 @@ if ($c->param('searchType') eq 'fulltext') { ($product ? "product: ".$product->name() : ''). ($testgroup ? " | testgroup: ".$testgroup->name() : ''). ($subgroup ? " | subgroup: ".$subgroup->name() : ''); + +} elsif ($c->param('searchType') eq 'ungrouped') { + my @testcases = Litmus::DB::Testcase->search_Ungrouped(); + my $search_string_for_display = "Testcases not associated with any subgroup."; + $vars->{'testcases'} = \@testcases; + $vars->{'search_string_for_display'} = $search_string_for_display; } if ($c->param('searchType')) { diff --git a/webtools/litmus/templates/en/default/admin/edit_subgroup.tmpl b/webtools/litmus/templates/en/default/admin/edit_subgroup.tmpl index 2f4d865a90e..ace9ccd5866 100644 --- a/webtools/litmus/templates/en/default/admin/edit_subgroup.tmpl +++ b/webtools/litmus/templates/en/default/admin/edit_subgroup.tmpl @@ -32,11 +32,14 @@
+ + + - + diff --git a/webtools/litmus/templates/en/default/admin/edit_test_run.tmpl b/webtools/litmus/templates/en/default/admin/edit_test_run.tmpl index 37ae956705a..15d8c149e84 100644 --- a/webtools/litmus/templates/en/default/admin/edit_test_run.tmpl +++ b/webtools/litmus/templates/en/default/admin/edit_test_run.tmpl @@ -32,6 +32,8 @@ + +
Subgroup ID#:
Name:
diff --git a/webtools/litmus/templates/en/default/admin/edit_testcase.tmpl b/webtools/litmus/templates/en/default/admin/edit_testcase.tmpl index 400fbdad319..2ca97b33f3f 100644 --- a/webtools/litmus/templates/en/default/admin/edit_testcase.tmpl +++ b/webtools/litmus/templates/en/default/admin/edit_testcase.tmpl @@ -34,11 +34,15 @@ + + + +
- + diff --git a/webtools/litmus/templates/en/default/admin/edit_testgroup.tmpl b/webtools/litmus/templates/en/default/admin/edit_testgroup.tmpl index e04a1ed65c3..3e600e5a15a 100644 --- a/webtools/litmus/templates/en/default/admin/edit_testgroup.tmpl +++ b/webtools/litmus/templates/en/default/admin/edit_testgroup.tmpl @@ -32,6 +32,8 @@ + +
Testcase ID#:
Summary:
diff --git a/webtools/litmus/templates/en/default/admin/manage_subgroups.tmpl b/webtools/litmus/templates/en/default/admin/manage_subgroups.tmpl index bceaf3999e6..221b8b23bee 100644 --- a/webtools/litmus/templates/en/default/admin/manage_subgroups.tmpl +++ b/webtools/litmus/templates/en/default/admin/manage_subgroups.tmpl @@ -62,13 +62,13 @@ var testcases=[% IF testcases_js %][% testcases_js %][% ELSE %]{}[% END %];
- [% INCLUDE form_widgets/select_product_id.tmpl name="product_filter" placeholder=1 size=1 display_id=1 onchange="changeProduct('_filter');filterList();" %] + [% INCLUDE form_widgets/select_product_id.tmpl name="product_filter" placeholder=1 size=1 display_id=1 onchange="changeProduct('_filter');changeBranch('_filter');updatePersistVars();filterList();" %] - [% INCLUDE form_widgets/select_branch_id.tmpl name="branch_filter" placeholder=1 size=1 display_id=1 onchange="changeBranch('_filter');filterList();" %] + [% INCLUDE form_widgets/select_branch_id.tmpl name="branch_filter" placeholder=1 size=1 display_id=1 onchange="changeBranch('_filter');updatePersistVars();filterList();" %] - [% INCLUDE form_widgets/select_testgroup_id.tmpl name="testgroup_filter" placeholder=1 size=1 display_id=1 onchange="filterList();" %] + [% INCLUDE form_widgets/select_testgroup_id.tmpl name="testgroup_filter" placeholder=1 size=1 display_id=1 onchange="updatePersistVars();filterList();" %]
@@ -125,6 +125,19 @@ if (em.selectedIndex >= 0) { } else { disableForm('edit_subgroup_form'); } +var suffix=''; +[% IF product_persist %] +setSelected(document.getElementById('product_filter'),[% product_persist | uri %]); +[% END %] +changeProduct('_filter'); +[% IF branch_persist %] +setSelected(document.getElementById('branch_filter'),[% branch_persist | uri %]); +changeBranch('_filter'); +[% IF testgroup_persist %] +setSelected(document.getElementById('testgroup_filter'),[% testgroup_persist | uri %]); +[% END %] +[% END %] +filterList(); [% INCLUDE global/litmus_footer.tmpl %] diff --git a/webtools/litmus/templates/en/default/admin/manage_test_runs.tmpl b/webtools/litmus/templates/en/default/admin/manage_test_runs.tmpl index 439915a3fff..30cd18e2747 100644 --- a/webtools/litmus/templates/en/default/admin/manage_test_runs.tmpl +++ b/webtools/litmus/templates/en/default/admin/manage_test_runs.tmpl @@ -61,10 +61,10 @@ var opsyses=[% IF opsyses_js %][% opsyses_js %][% ELSE %]{}[% END %]; - [% INCLUDE form_widgets/select_product_id.tmpl name="product_filter" placeholder=1 size=1 display_id=1 onchange="suffix='_filter';changeProduct();filterList();" %] + [% INCLUDE form_widgets/select_product_id.tmpl name="product_filter" placeholder=1 size=1 display_id=1 onchange="changeProduct('_filter');updatePersistVars();filterList();" %] - [% INCLUDE form_widgets/select_branch_id.tmpl name="branch_filter" placeholder=1 size=1 display_id=1 onchange="filterList();" %] + [% INCLUDE form_widgets/select_branch_id.tmpl name="branch_filter" placeholder=1 size=1 display_id=1 onchange="updatePersistVars();filterList();" %] @@ -119,10 +119,16 @@ if (em.selectedIndex >= 0) { enableForm('edit_test_run_form'); } else { disableForm('edit_test_run_form'); - changeProduct(); } -var suffix='_filter'; -changeProduct();filterList(); +var suffix=''; +[% IF product_persist %] +setSelected(document.getElementById('product_filter'),[% product_persist | uri %]); +[% END %] +changeProduct('_filter'); +[% IF branch_persist %] +setSelected(document.getElementById('branch_filter'),[% branch_persist | uri %]); +[% END %] +filterList(); diff --git a/webtools/litmus/templates/en/default/admin/manage_testcases.tmpl b/webtools/litmus/templates/en/default/admin/manage_testcases.tmpl index 1f814c7db86..095527e3ab0 100644 --- a/webtools/litmus/templates/en/default/admin/manage_testcases.tmpl +++ b/webtools/litmus/templates/en/default/admin/manage_testcases.tmpl @@ -35,6 +35,7 @@ var products=[% IF products_js %][% products_js %][% ELSE %]{}[% END %]; var branches=[% IF branches_js %][% branches_js %][% ELSE %]{}[% END %]; var testgroups=[% IF testgroups_js %][% testgroups_js %][% ELSE %]{}[% END %]; var subgroups=[% IF subgroups_js %][% subgroups_js %][% ELSE %]{}[% END %]; +var initial_subgroup=[% IF subgroup_persist %][% subgroup_persist %][% ELSE %]0[% END %];
@@ -62,16 +63,16 @@ var subgroups=[% IF subgroups_js %][% subgroups_js %][% ELSE %]{}[% END %]; - [% INCLUDE form_widgets/select_product_id.tmpl name="product_filter" placeholder=1 size=1 display_id=1 onchange="changeProduct('_filter');filterList();" %] + [% INCLUDE form_widgets/select_product_id.tmpl name="product_filter" placeholder=1 size=1 display_id=1 onchange="changeProduct('_filter');changeBranch('_filter');changeTestgroup('_filter');updatePersistVars();filterList();" %] - [% INCLUDE form_widgets/select_branch_id.tmpl name="branch_filter" placeholder=1 size=1 display_id=1 onchange="changeBranch('_filter');filterList();" %] + [% INCLUDE form_widgets/select_branch_id.tmpl name="branch_filter" placeholder=1 size=1 display_id=1 onchange="changeBranch('_filter');changeTestgroup('_filter');updatePersistVars();filterList();" %] - [% INCLUDE form_widgets/select_testgroup_id.tmpl name="testgroup_filter" placeholder=1 size=1 display_id=1 onchange="subgroupBox=document.getElementById('subgroup_filter');changeTestgroup('_filter');filterList();" %] + [% INCLUDE form_widgets/select_testgroup_id.tmpl name="testgroup_filter" placeholder=1 size=1 display_id=1 onchange="subgroupBox=document.getElementById('subgroup_filter');changeTestgroup('_filter');updatePersistVars();filterList();" %] - [% INCLUDE form_widgets/select_subgroup_id.tmpl name="subgroup_filter" placeholder=1 size=1 display_id=1 onchange="filterList();" %] + [% INCLUDE form_widgets/select_subgroup_id.tmpl name="subgroup_filter" placeholder=1 size=1 display_id=1 onchange="updatePersistVars();filterList();" %] @@ -135,6 +136,20 @@ if (em.selectedIndex >= 0) { } else { disableForm('edit_testcase_form'); } +var suffix=''; +[% IF product_persist %] +setSelected(document.getElementById('product_filter'),[% product_persist | uri %]); +[% END %] +changeProduct('_filter'); +[% IF branch_persist %] +setSelected(document.getElementById('branch_filter'),[% branch_persist | uri %]); +changeBranch('_filter'); +[% IF testgroup_persist %] +setSelected(document.getElementById('testgroup_filter'),[% testgroup_persist | uri %]); +subgroupBox=document.getElementById('subgroup_filter'); +changeTestgroupFirstPass('_filter'); +[% END %] +[% END %] [% INCLUDE global/litmus_footer.tmpl %] diff --git a/webtools/litmus/templates/en/default/admin/manage_testgroups.tmpl b/webtools/litmus/templates/en/default/admin/manage_testgroups.tmpl index 94f3faa4c37..6206297d7ee 100644 --- a/webtools/litmus/templates/en/default/admin/manage_testgroups.tmpl +++ b/webtools/litmus/templates/en/default/admin/manage_testgroups.tmpl @@ -60,10 +60,10 @@ var subgroups=[% IF subgroups_js %][% subgroups_js %][% ELSE %]{}[% END %]; - [% INCLUDE form_widgets/select_product_id.tmpl name="product_filter" placeholder=1 size=1 display_id=1 onchange="changeProduct('_filter');filterList();" %] + [% INCLUDE form_widgets/select_product_id.tmpl name="product_filter" placeholder=1 size=1 display_id=1 onchange="changeProduct('_filter');updatePersistVars();filterList();" %] - [% INCLUDE form_widgets/select_branch_id.tmpl name="branch_filter" placeholder=1 size=1 display_id=1 onchange="filterList();" %] + [% INCLUDE form_widgets/select_branch_id.tmpl name="branch_filter" placeholder=1 size=1 display_id=1 onchange="updatePersistVars();filterList();" %] @@ -121,6 +121,15 @@ if (em.selectedIndex >= 0) { } else { disableForm('edit_testgroup_form'); } +var suffix=''; +[% IF product_persist %] +setSelected(document.getElementById('product_filter'),[% product_persist | uri %]); +[% END %] +changeProduct('_filter'); +[% IF branch_persist %] +setSelected(document.getElementById('branch_filter'),[% branch_persist | uri %]); +[% END %] +filterList(); [% INCLUDE global/litmus_footer.tmpl %] diff --git a/webtools/litmus/templates/en/default/global/litmus_footer.tmpl b/webtools/litmus/templates/en/default/global/litmus_footer.tmpl index 7d49c0c7fcb..699090d0e19 100644 --- a/webtools/litmus/templates/en/default/global/litmus_footer.tmpl +++ b/webtools/litmus/templates/en/default/global/litmus_footer.tmpl @@ -30,7 +30,8 @@ Most Common Failures | Testcases Most Frequently Marked As Unclear | Testgroup Popularity | Results with Comments
Search testcases: Recently Added | - Recently Changed + Recently Changed[% IF defaultemail && defaultemail.isInAdminGroup() %] | + Ungrouped[% END %]
diff --git a/webtools/litmus/templates/en/default/reporting/advanced_search_form.tmpl b/webtools/litmus/templates/en/default/reporting/advanced_search_form.tmpl index 8588e1369e4..f587c0b0a1b 100644 --- a/webtools/litmus/templates/en/default/reporting/advanced_search_form.tmpl +++ b/webtools/litmus/templates/en/default/reporting/advanced_search_form.tmpl @@ -235,6 +235,10 @@ Use this to limit the number of results displayed. Display automated results?  Automated Only  Manual Only  All + + Associated bug(s)? +  With bug(s)  No bug(s)  All + diff --git a/webtools/litmus/templates/en/default/reporting/result_display.tmpl b/webtools/litmus/templates/en/default/reporting/result_display.tmpl index 1f1f7829359..7fc1bc6d61a 100644 --- a/webtools/litmus/templates/en/default/reporting/result_display.tmpl +++ b/webtools/litmus/templates/en/default/reporting/result_display.tmpl @@ -187,6 +187,19 @@ No bugs on file. +
+ +
+ + [% INCLUDE test/test.html.tmpl testcase=result.testcase show_config=0 print=1 %] + +
+ +
+ +
Comments diff --git a/webtools/litmus/templates/en/default/show/testcase_list.tmpl b/webtools/litmus/templates/en/default/show/testcase_list.tmpl index dbfccb83fd9..e7d9fc2e871 100755 --- a/webtools/litmus/templates/en/default/show/testcase_list.tmpl +++ b/webtools/litmus/templates/en/default/show/testcase_list.tmpl @@ -33,13 +33,12 @@ [% IF fulltext %]Relevance[% END %] Testcase ID#: Summary - Creation Date Last Updated [% IF testcases.size==0 %] - No matching testcases were found. + No matching testcases were found. [% ELSE %] [% FOREACH testcase=testcases %] @@ -51,7 +50,6 @@ [% IF fulltext %][% testcase.relevance | html | format('%.2f') %][% END %] [% testcase.testcase_id | html %]: [% testcase.summary | html %] -[% testcase.creation_date | html %] [% testcase.last_updated | html %] [% END %] diff --git a/webtools/litmus/templates/en/default/sidebar/widget_testing.tmpl b/webtools/litmus/templates/en/default/sidebar/widget_testing.tmpl index 8769b2f623e..a1e44acf1a2 100755 --- a/webtools/litmus/templates/en/default/sidebar/widget_testing.tmpl +++ b/webtools/litmus/templates/en/default/sidebar/widget_testing.tmpl @@ -3,7 +3,7 @@

Get Testing!