diff options
author | Perl Tidy <perltidy@bugzilla.org> | 2018-12-05 21:38:52 +0100 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-12-05 23:49:08 +0100 |
commit | 8ec8da0491ad89604700b3e29a227966f6d84ba1 (patch) | |
tree | 9d270f173330ca19700e0ba9f2ee931300646de1 /qa/t/test_groups.t | |
parent | a7bb5a65b71644d9efce5fed783ed545b9336548 (diff) | |
download | bugzilla-8ec8da0491ad89604700b3e29a227966f6d84ba1.tar.gz bugzilla-8ec8da0491ad89604700b3e29a227966f6d84ba1.tar.xz |
no bug - reformat all the code using the new perltidy rules
Diffstat (limited to 'qa/t/test_groups.t')
-rw-r--r-- | qa/t/test_groups.t | 123 |
1 files changed, 82 insertions, 41 deletions
diff --git a/qa/t/test_groups.t b/qa/t/test_groups.t index eab30125f..96829faff 100644 --- a/qa/t/test_groups.t +++ b/qa/t/test_groups.t @@ -25,8 +25,8 @@ $sel->title_is("Edit Groups"); $sel->click_ok("link=Add Group"); $sel->wait_for_page_to_load(WAIT_TIME); $sel->title_is("Add group"); -$sel->type_ok("name", "Selenium-test"); -$sel->type_ok("desc", "Test group for Selenium"); +$sel->type_ok("name", "Selenium-test"); +$sel->type_ok("desc", "Test group for Selenium"); $sel->type_ok("owner", $config->{'admin_user_login'}); $sel->check_ok("isactive"); $sel->uncheck_ok("insertnew"); @@ -43,7 +43,7 @@ $sel->wait_for_page_to_load(WAIT_TIME); $sel->title_is("Edit Group Controls for TestProduct"); $sel->is_text_present_ok("Selenium-test"); $sel->select_ok("membercontrol_${group_id}", "label=Shown"); -$sel->select_ok("othercontrol_${group_id}", "label=Mandatory"); +$sel->select_ok("othercontrol_${group_id}", "label=Mandatory"); $sel->click_ok("submit"); $sel->wait_for_page_to_load(WAIT_TIME); $sel->title_is("Update group access controls for TestProduct"); @@ -52,17 +52,18 @@ $sel->title_is("Update group access controls for TestProduct"); file_bug_in_product($sel, "TestProduct"); $sel->is_text_present_ok("Test group for Selenium"); -$sel->value_is("group_${group_id}", "off"); # Must be OFF (else that's a bug) +$sel->value_is("group_${group_id}", "off"); # Must be OFF (else that's a bug) $sel->check_ok("group_${group_id}"); $sel->type_ok("short_desc", "bug restricted to the Selenium group"); -$sel->type_ok("comment", "should be invisible"); +$sel->type_ok("comment", "should be invisible"); $sel->selected_label_is("component", "TestComponent"); $sel->click_ok("commit"); $sel->wait_for_page_to_load(WAIT_TIME); my $bug1_id = $sel->get_value('//input[@name="id" and @type="hidden"]'); -$sel->is_text_present_ok('has been added to the database', "Bug $bug1_id created"); +$sel->is_text_present_ok('has been added to the database', + "Bug $bug1_id created"); $sel->is_text_present_ok("Test group for Selenium"); -$sel->value_is("group_${group_id}", "on"); # Must be ON +$sel->value_is("group_${group_id}", "on"); # Must be ON # Look for this new bug and add it to the new "Selenium bugs" saved search. @@ -88,7 +89,8 @@ $sel->click_ok("link=Selenium bugs"); $sel->wait_for_page_to_load(WAIT_TIME); $sel->title_is("Bug List: Selenium bugs"); $sel->is_text_present_ok("One bug found"); -$sel->is_element_present_ok("b$bug1_id", undef, "Bug $bug1_id restricted to the bug group"); +$sel->is_element_present_ok("b$bug1_id", undef, + "Bug $bug1_id restricted to the bug group"); # No longer use Selenium-test as a bug group. @@ -111,13 +113,17 @@ $sel->is_text_present_ok("The group will no longer be used for bugs"); file_bug_in_product($sel, "TestProduct"); $sel->selected_label_is("component", "TestComponent"); $sel->type_ok("short_desc", "bug restricted to the Selenium group"); -$sel->type_ok("comment", "should be *visible* when created (the group is disabled)"); -ok(!$sel->is_text_present("Test group for Selenium"), "Selenium-test group unavailable"); -ok(!$sel->is_element_present("group_${group_id}"), "Selenium-test checkbox not present"); +$sel->type_ok("comment", + "should be *visible* when created (the group is disabled)"); +ok(!$sel->is_text_present("Test group for Selenium"), + "Selenium-test group unavailable"); +ok(!$sel->is_element_present("group_${group_id}"), + "Selenium-test checkbox not present"); $sel->click_ok("commit"); $sel->wait_for_page_to_load(WAIT_TIME); my $bug2_id = $sel->get_value("//input[\@name='id' and \@type='hidden']"); -$sel->is_text_present_ok('has been added to the database', "Bug $bug2_id created"); +$sel->is_text_present_ok('has been added to the database', + "Bug $bug2_id created"); # Make sure the new bug doesn't appear in the "Selenium bugs" saved search. @@ -125,8 +131,12 @@ $sel->click_ok("link=Selenium bugs"); $sel->wait_for_page_to_load(WAIT_TIME); $sel->title_is("Bug List: Selenium bugs"); $sel->is_text_present_ok("One bug found"); -$sel->is_element_present_ok("b$bug1_id", undef, "Bug $bug1_id restricted to the bug group"); -ok(!$sel->is_element_present("b$bug2_id"), "Bug $bug2_id NOT restricted to the bug group"); +$sel->is_element_present_ok("b$bug1_id", undef, + "Bug $bug1_id restricted to the bug group"); +ok( + !$sel->is_element_present("b$bug2_id"), + "Bug $bug2_id NOT restricted to the bug group" +); # Re-enable the Selenium-test group as bug group. This doesn't affect # already filed bugs as this group is not mandatory. @@ -151,8 +161,12 @@ $sel->click_ok("link=Selenium bugs"); $sel->wait_for_page_to_load(WAIT_TIME); $sel->title_is("Bug List: Selenium bugs"); $sel->is_text_present_ok("One bug found"); -$sel->is_element_present_ok("b$bug1_id", undef, "Bug $bug1_id restricted to the bug group"); -ok(!$sel->is_element_present("b$bug2_id"), "Bug $bug2_id NOT restricted to the bug group"); +$sel->is_element_present_ok("b$bug1_id", undef, + "Bug $bug1_id restricted to the bug group"); +ok( + !$sel->is_element_present("b$bug2_id"), + "Bug $bug2_id NOT restricted to the bug group" +); # Make the Selenium-test group mandatory for TestProduct. @@ -168,37 +182,49 @@ $sel->is_text_present_ok("the group is newly mandatory and will be added"); $sel->click_ok("update"); $sel->wait_for_page_to_load(WAIT_TIME); $sel->title_is("Update group access controls for TestProduct"); -$sel->is_text_present_ok('regexp:Adding bugs to group \'Selenium-test\' which is\W+mandatory for this product'); +$sel->is_text_present_ok( + 'regexp:Adding bugs to group \'Selenium-test\' which is\W+mandatory for this product' +); # All bugs being in TestProduct must now be restricted to the bug group. $sel->click_ok("link=Selenium bugs"); $sel->wait_for_page_to_load(WAIT_TIME); $sel->title_is("Bug List: Selenium bugs"); -$sel->is_element_present_ok("b$bug1_id", undef, "Bug $bug1_id restricted to the bug group"); -$sel->is_element_present_ok("b$bug2_id", undef, "Bug $bug2_id restricted to the bug group"); +$sel->is_element_present_ok("b$bug1_id", undef, + "Bug $bug1_id restricted to the bug group"); +$sel->is_element_present_ok("b$bug2_id", undef, + "Bug $bug2_id restricted to the bug group"); # File a new bug, which must automatically be restricted to the bug group. file_bug_in_product($sel, "TestProduct"); $sel->selected_label_is("component", "TestComponent"); $sel->type_ok("short_desc", "Selenium-test group mandatory"); -$sel->type_ok("comment", "group enabled"); -ok(!$sel->is_text_present("Test group for Selenium"), "Selenium-test group not available"); -ok(!$sel->is_element_present("group_${group_id}"), "Selenium-test checkbox not present (mandatory group)"); +$sel->type_ok("comment", "group enabled"); +ok(!$sel->is_text_present("Test group for Selenium"), + "Selenium-test group not available"); +ok( + !$sel->is_element_present("group_${group_id}"), + "Selenium-test checkbox not present (mandatory group)" +); $sel->click_ok("commit"); $sel->wait_for_page_to_load(WAIT_TIME); my $bug3_id = $sel->get_value("//input[\@name='id' and \@type='hidden']"); -$sel->is_text_present_ok('has been added to the database', "Bug $bug3_id created"); +$sel->is_text_present_ok('has been added to the database', + "Bug $bug3_id created"); # Make sure all three bugs are listed as being restricted to the bug group. $sel->click_ok("link=Selenium bugs"); $sel->wait_for_page_to_load(WAIT_TIME); $sel->title_is("Bug List: Selenium bugs"); -$sel->is_element_present_ok("b$bug1_id", undef, "Bug $bug1_id restricted to the bug group"); -$sel->is_element_present_ok("b$bug2_id", undef, "Bug $bug2_id restricted to the bug group"); -$sel->is_element_present_ok("b$bug3_id", undef, "Bug $bug3_id restricted to the bug group"); +$sel->is_element_present_ok("b$bug1_id", undef, + "Bug $bug1_id restricted to the bug group"); +$sel->is_element_present_ok("b$bug2_id", undef, + "Bug $bug2_id restricted to the bug group"); +$sel->is_element_present_ok("b$bug3_id", undef, + "Bug $bug3_id restricted to the bug group"); # Turn off the Selenium-test group again. @@ -221,23 +247,32 @@ $sel->is_text_present_ok("The group will no longer be used for bugs"); file_bug_in_product($sel, "TestProduct"); $sel->selected_label_is("component", "TestComponent"); $sel->type_ok("short_desc", "bug restricted to the Selenium-test group"); -$sel->type_ok("comment", "group disabled"); -ok(!$sel->is_text_present("Test group for Selenium"), "Selenium-test group not available"); -ok(!$sel->is_element_present("group_${group_id}"), "Selenium-test checkbox not present"); +$sel->type_ok("comment", "group disabled"); +ok(!$sel->is_text_present("Test group for Selenium"), + "Selenium-test group not available"); +ok(!$sel->is_element_present("group_${group_id}"), + "Selenium-test checkbox not present"); $sel->click_ok("commit"); $sel->wait_for_page_to_load(WAIT_TIME); my $bug4_id = $sel->get_value("//input[\@name='id' and \@type='hidden']"); -$sel->is_text_present_ok('has been added to the database', "Bug $bug4_id created"); +$sel->is_text_present_ok('has been added to the database', + "Bug $bug4_id created"); # The last bug must not be in the list. $sel->click_ok("link=Selenium bugs"); $sel->wait_for_page_to_load(WAIT_TIME); $sel->title_is("Bug List: Selenium bugs"); -$sel->is_element_present_ok("b$bug1_id", undef, "Bug $bug1_id restricted to the bug group"); -$sel->is_element_present_ok("b$bug2_id", undef, "Bug $bug2_id restricted to the bug group"); -$sel->is_element_present_ok("b$bug3_id", undef, "Bug $bug3_id restricted to the bug group"); -ok(!$sel->is_element_present("b$bug4_id"), "Bug $bug4_id NOT restricted to the bug group"); +$sel->is_element_present_ok("b$bug1_id", undef, + "Bug $bug1_id restricted to the bug group"); +$sel->is_element_present_ok("b$bug2_id", undef, + "Bug $bug2_id restricted to the bug group"); +$sel->is_element_present_ok("b$bug3_id", undef, + "Bug $bug3_id restricted to the bug group"); +ok( + !$sel->is_element_present("b$bug4_id"), + "Bug $bug4_id NOT restricted to the bug group" +); # Re-enable the mandatory group. All bugs should be restricted to this bug group automatically. @@ -260,10 +295,14 @@ $sel->is_text_present_ok("The group will now be used for bugs"); $sel->click_ok("link=Selenium bugs"); $sel->wait_for_page_to_load(WAIT_TIME); $sel->title_is("Bug List: Selenium bugs"); -$sel->is_element_present_ok("b$bug1_id", undef, "Bug $bug1_id restricted to the bug group"); -$sel->is_element_present_ok("b$bug2_id", undef, "Bug $bug2_id restricted to the bug group"); -$sel->is_element_present_ok("b$bug3_id", undef, "Bug $bug3_id restricted to the bug group"); -$sel->is_element_present_ok("b$bug4_id", undef, "Bug $bug4_id restricted to the bug group"); +$sel->is_element_present_ok("b$bug1_id", undef, + "Bug $bug1_id restricted to the bug group"); +$sel->is_element_present_ok("b$bug2_id", undef, + "Bug $bug2_id restricted to the bug group"); +$sel->is_element_present_ok("b$bug3_id", undef, + "Bug $bug3_id restricted to the bug group"); +$sel->is_element_present_ok("b$bug4_id", undef, + "Bug $bug4_id restricted to the bug group"); # Try to remove the Selenium-test group from TestProduct, but DON'T do it! # We just want to make sure a warning is displayed about this removal. @@ -275,11 +314,12 @@ $sel->wait_for_page_to_load(WAIT_TIME); $sel->title_is("Edit Group Controls for TestProduct"); $sel->is_text_present_ok("Selenium-test"); $sel->select_ok("membercontrol_${group_id}", "NA"); -$sel->select_ok("othercontrol_${group_id}", "NA"); +$sel->select_ok("othercontrol_${group_id}", "NA"); $sel->click_ok("submit"); $sel->wait_for_page_to_load(WAIT_TIME); $sel->title_is("Confirm Group Control Change for product 'TestProduct'"); -$sel->is_text_present_ok("the group is no longer applicable and will be removed"); +$sel->is_text_present_ok( + "the group is no longer applicable and will be removed"); # Delete the Selenium-test group. @@ -301,7 +341,8 @@ $sel->click_ok("delete"); $sel->wait_for_page_to_load(WAIT_TIME); $sel->title_is("Cannot Delete Group"); my $error_msg = trim($sel->get_text("error_msg")); -ok($error_msg =~ /^The Selenium-test group cannot be deleted/, "Group is in use - not deletable"); +ok($error_msg =~ /^The Selenium-test group cannot be deleted/, + "Group is in use - not deletable"); $sel->go_back_ok(); $sel->wait_for_page_to_load(WAIT_TIME); $sel->check("removebugs"); |