From bb5c5a5e62d2fd96f9b4a7339cbb0cbb33209745 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Fri, 17 Jul 2015 04:11:13 -0400 Subject: Bug 1184984 - Current Selenium tests are failing due to changes made by bug 1173442 --- qa/config/generate_test_data.pl | 6 +++--- qa/t/test_bmo_enter_new_bug.t | 1 + qa/t/test_default_groups.t | 3 +++ qa/t/test_edit_products_properties.t | 1 + qa/t/test_votes.t | 1 + 5 files changed, 9 insertions(+), 3 deletions(-) (limited to 'qa') diff --git a/qa/config/generate_test_data.pl b/qa/config/generate_test_data.pl index 4891d30bc..824464967 100644 --- a/qa/config/generate_test_data.pl +++ b/qa/config/generate_test_data.pl @@ -566,9 +566,9 @@ $dbh->do('INSERT INTO group_group_map VALUES (?, ?, 0)', # BMO: Update default security group settings for new products my $default_security_group = Bugzilla::Group->new({ name => 'core-security' }); $default_security_group ||= Bugzilla::Group->new({ name => 'Master' }); -foreach my $product (@products) { - $dbh->do('UPDATE products SET security_group_id = ? WHERE name = ?', - undef, $default_security_group->id, $product->{product_name}); +if ($default_security_group) { + $dbh->do('UPDATE products SET security_group_id = ? WHERE security_group_id IS NULL', + undef, $default_security_group->id); } ########################################################################## diff --git a/qa/t/test_bmo_enter_new_bug.t b/qa/t/test_bmo_enter_new_bug.t index ac4a9ca8b..e029cbfee 100644 --- a/qa/t/test_bmo_enter_new_bug.t +++ b/qa/t/test_bmo_enter_new_bug.t @@ -270,6 +270,7 @@ sub _check_product { $sel->type_ok("product", $product); $sel->type_ok("description", $product_description); $sel->type_ok("version", $version) if $version; + $sel->select_ok("security_group_id", "label=core-security"); $sel->select_ok("default_op_sys_id", "Unspecified"); $sel->select_ok("default_platform_id", "Unspecified"); $sel->click_ok('//input[@type="submit" and @value="Add"]'); diff --git a/qa/t/test_default_groups.t b/qa/t/test_default_groups.t index 9875bc847..974898dac 100644 --- a/qa/t/test_default_groups.t +++ b/qa/t/test_default_groups.t @@ -23,6 +23,7 @@ set_parameters($sel, { "Group Security" => {"makeproductgroups-on" => undef} }); add_product($sel); $sel->type_ok("product", "ready_to_die"); $sel->type_ok("description", "will die"); +$sel->select_ok("security_group_id", "label=core-security"); $sel->select_ok("default_op_sys_id", "Unspecified"); $sel->select_ok("default_platform_id", "Unspecified"); $sel->click_ok('//input[@value="Add"]'); @@ -81,6 +82,7 @@ $sel->is_text_present_ok("Access to bugs in the ready_to_die product"); add_product($sel); $sel->type_ok("product", "ready_to_die"); $sel->type_ok("description", "will die"); +$sel->select_ok("security_group_id", "label=core-security"); $sel->select_ok("default_op_sys_id", "Unspecified"); $sel->select_ok("default_platform_id", "Unspecified"); $sel->click_ok('//input[@value="Add"]'); @@ -164,6 +166,7 @@ set_parameters($sel, { "Group Security" => {"makeproductgroups-off" => undef} }) add_product($sel); $sel->type_ok("product", "ready_to_die"); $sel->type_ok("description", "will die"); +$sel->select_ok("security_group_id", "label=core-security"); $sel->select_ok("default_op_sys_id", "Unspecified"); $sel->select_ok("default_platform_id", "Unspecified"); $sel->click_ok('//input[@value="Add"]'); diff --git a/qa/t/test_edit_products_properties.t b/qa/t/test_edit_products_properties.t index 7b3eabc19..417fa4be6 100644 --- a/qa/t/test_edit_products_properties.t +++ b/qa/t/test_edit_products_properties.t @@ -59,6 +59,7 @@ if ($config->{test_extensions}) { $sel->type_ok("votestoconfirm", "10"); } $sel->type_ok("version", "0.1a"); +$sel->select_ok("security_group_id", "label=core-security"); $sel->select_ok("default_op_sys_id", "Unspecified"); $sel->select_ok("default_platform_id", "Unspecified"); $sel->click_ok('//input[@type="submit" and @value="Add"]'); diff --git a/qa/t/test_votes.t b/qa/t/test_votes.t index 99b191c80..b36491b60 100644 --- a/qa/t/test_votes.t +++ b/qa/t/test_votes.t @@ -33,6 +33,7 @@ $sel->type_ok("description", "A great new product"); $sel->type_ok("votesperuser", 10); $sel->type_ok("maxvotesperbug", 5); $sel->type_ok("votestoconfirm", 3); +$sel->select_ok("security_group_id", "label=core-security"); $sel->select_ok("default_op_sys_id", "Unspecified"); $sel->select_ok("default_platform_id", "Unspecified"); $sel->click_ok('//input[@type="submit" and @value="Add"]'); -- cgit v1.2.3-24-g4f1b