Skip to content

Commit

Permalink
Bug 1184984 - Current Selenium tests are failing due to changes made …
Browse files Browse the repository at this point in the history
…by bug 1173442
  • Loading branch information
dklawren committed Jul 17, 2015
1 parent b51b2ac commit bb5c5a5
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 4 deletions.
5 changes: 4 additions & 1 deletion docker/generate_bmo_data.pl
Expand Up @@ -388,7 +388,10 @@

# Update default security group settings for new products
my $default_security_group = Bugzilla::Group->new({ name => 'core-security' });
$dbh->do('UPDATE products SET security_group_id = ?', undef, $default_security_group->id);
if ($default_security_group) {
$dbh->do('UPDATE products SET security_group_id = ? WHERE security_group_id IS NULL',
undef, $default_security_group->id);
}

##########################################################################
# Set Parameters
Expand Down
6 changes: 3 additions & 3 deletions qa/config/generate_test_data.pl
Expand Up @@ -566,9 +566,9 @@ BEGIN
# 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);
}

##########################################################################
Expand Down
1 change: 1 addition & 0 deletions qa/t/test_bmo_enter_new_bug.t
Expand Up @@ -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"]');
Expand Down
3 changes: 3 additions & 0 deletions qa/t/test_default_groups.t
Expand Up @@ -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"]');
Expand Down Expand Up @@ -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"]');
Expand Down Expand Up @@ -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"]');
Expand Down
1 change: 1 addition & 0 deletions qa/t/test_edit_products_properties.t
Expand Up @@ -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"]');
Expand Down
1 change: 1 addition & 0 deletions qa/t/test_votes.t
Expand Up @@ -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"]');
Expand Down

0 comments on commit bb5c5a5

Please sign in to comment.