From 2e5d910d9401c4fa8f105d8f9502d9e4ea27bb99 Mon Sep 17 00:00:00 2001 From: Kohei Yoshino Date: Wed, 13 Dec 2017 16:06:06 -0500 Subject: Bug 1376826 - New HTML Header for BMO --- qa/t/lib/QA/Util.pm | 4 ++-- qa/t/test_create_user_accounts.t | 4 ++-- qa/t/test_keywords.t | 4 ++-- qa/t/test_long_list_redirection.t | 2 +- qa/t/test_require_login.t | 2 +- qa/t/test_show_all_products.t | 6 +++--- qa/t/test_shutdown.t | 2 +- qa/t/test_status_whiteboard.t | 2 +- qa/t/test_target_milestones.t | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) (limited to 'qa/t') diff --git a/qa/t/lib/QA/Util.pm b/qa/t/lib/QA/Util.pm index 4999e6f3b..0ef843ce7 100644 --- a/qa/t/lib/QA/Util.pm +++ b/qa/t/lib/QA/Util.pm @@ -203,7 +203,7 @@ sub file_bug_in_product { my $config = get_config(); $classification ||= "Unclassified"; - $sel->click_ok("link=New", undef, "Go create a new bug"); + $sel->click_ok('//*[@class="link-file"]//a', undef, "Go create a new bug"); $sel->wait_for_page_to_load(WAIT_TIME); my $title = $sel->get_title(); if ($sel->is_text_present("Select Classification")) { @@ -328,7 +328,7 @@ sub add_product { sub open_advanced_search_page { my $sel = shift; - $sel->click_ok("link=Search"); + $sel->click_ok('//*[@class="link-search"]//a'); $sel->wait_for_page_to_load(WAIT_TIME); my $title = $sel->get_title(); if ($title eq "Simple Search") { diff --git a/qa/t/test_create_user_accounts.t b/qa/t/test_create_user_accounts.t index 4d66f6862..99792367e 100644 --- a/qa/t/test_create_user_accounts.t +++ b/qa/t/test_create_user_accounts.t @@ -37,7 +37,7 @@ $sel->title_is("Request for new user account '$valid_account' submitted"); $sel->is_text_present_ok("A confirmation email has been sent"); # Try creating the same account again. It's too soon. -$sel->click_ok("link=Home"); +$sel->click_ok('//*[@id="header-title"]//a'); $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_is("Bugzilla Main Page"); $sel->is_text_present_ok("Open a New Account"); @@ -123,7 +123,7 @@ logout($sel); # Make sure that links pointing to createaccount.cgi are all deactivated. ok(!$sel->is_text_present("New Account"), "No link named 'New Account'"); -$sel->click_ok("link=Home"); +$sel->click_ok('//*[@id="header-title"]//a'); $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->refresh; $sel->wait_for_page_to_load_ok(WAIT_TIME); diff --git a/qa/t/test_keywords.t b/qa/t/test_keywords.t index 72a4f6049..0edffcc2f 100644 --- a/qa/t/test_keywords.t +++ b/qa/t/test_keywords.t @@ -128,7 +128,7 @@ $sel->wait_for_page_to_load(WAIT_TIME); $sel->title_is("Bug List"); $sel->is_text_present_ok("2 bugs found"); -$sel->click_ok("link=Search"); +$sel->click_ok('//*[@class="link-search"]//a'); $sel->wait_for_page_to_load(WAIT_TIME); $sel->title_is("Search for bugs"); $sel->remove_all_selections("product"); @@ -140,7 +140,7 @@ $sel->wait_for_page_to_load(WAIT_TIME); $sel->title_is("Bug List"); $sel->is_text_present_ok("One bug found"); -$sel->click_ok("link=Search"); +$sel->click_ok('//*[@class="link-search"]//a'); $sel->wait_for_page_to_load(WAIT_TIME); $sel->title_is("Search for bugs"); $sel->remove_all_selections("product"); diff --git a/qa/t/test_long_list_redirection.t b/qa/t/test_long_list_redirection.t index 2ee23f9a2..b2c22e66a 100644 --- a/qa/t/test_long_list_redirection.t +++ b/qa/t/test_long_list_redirection.t @@ -15,6 +15,6 @@ my ($sel, $config) = get_selenium(); $sel->open_ok("/$config->{bugzilla_installation}/long_list.cgi?id=1"); $sel->title_is("Full Text Bug Listing", "Display bug as format for printing"); -my $text = $sel->get_text("//h1"); +my $text = $sel->get_text('//*[@id="bugzilla-body"]//h1'); $text =~ s/[\r\n\t\s]+/ /g; is($text, 'Bug 1', 'Display bug 1 specifically'); diff --git a/qa/t/test_require_login.t b/qa/t/test_require_login.t index 7b39e7329..1cfd5b42f 100644 --- a/qa/t/test_require_login.t +++ b/qa/t/test_require_login.t @@ -76,6 +76,6 @@ set_parameters($sel, { "User Authentication" => {"requirelogin-off" => undef} }) logout($sel); # Make sure we can access random pages again. -$sel->click_ok("link=Search"); +$sel->click_ok('//*[@class="link-search"]//a'); $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_isnt("Log in to Bugzilla"); diff --git a/qa/t/test_show_all_products.t b/qa/t/test_show_all_products.t index 36f61e42c..ecc806980 100644 --- a/qa/t/test_show_all_products.t +++ b/qa/t/test_show_all_products.t @@ -25,7 +25,7 @@ set_parameters($sel, { "Bug Fields" => {"useclassification-on" => undef} }); # The admin is not a member of the "QA‑Selenium‑TEST" group, and so # cannot see the "QA‑Selenium‑TEST" product. -$sel->click_ok("link=New"); +$sel->click_ok('//*[@class="link-file"]//a'); $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_is("Enter Bug"); $sel->click_ok("link=Other Products", undef, "Choose full product list"); @@ -38,7 +38,7 @@ logout($sel); # The "QA‑Selenium‑TEST" product must be visible to him. log_in($sel, $config, 'QA_Selenium_TEST'); -$sel->click_ok("link=New"); +$sel->click_ok('//*[@class="link-file"]//a'); $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_is("Enter A Bug"); if ($sel->is_text_present('None of the above; my bug is in')) { @@ -48,8 +48,8 @@ if ($sel->is_text_present('None of the above; my bug is in')) { } $sel->click_ok('link=Other Products'); $sel->wait_for_page_to_load_ok(WAIT_TIME); -$sel->is_text_present_ok("QA-Selenium-TEST"); # For some unknown reason, Selenium doesn't like hyphens in links. +# $sel->is_text_present_ok("QA-Selenium-TEST"); # $sel->click_ok("link=QA-Selenium-TEST"); $sel->click_ok('//div[@id="choose_product"]//a[contains(@href, "QA-Selenium-TEST")]'); $sel->wait_for_page_to_load_ok(WAIT_TIME); diff --git a/qa/t/test_shutdown.t b/qa/t/test_shutdown.t index 33b9b426b..922307207 100644 --- a/qa/t/test_shutdown.t +++ b/qa/t/test_shutdown.t @@ -69,7 +69,7 @@ $sel->title_is("Parameters Updated"); # Accessing index.cgi should work again now. -$sel->click_ok("link=Home"); +$sel->click_ok('//*[@id="header-title"]//a'); $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_is("Bugzilla Main Page"); logout($sel); diff --git a/qa/t/test_status_whiteboard.t b/qa/t/test_status_whiteboard.t index 94582dd54..2252b2317 100644 --- a/qa/t/test_status_whiteboard.t +++ b/qa/t/test_status_whiteboard.t @@ -71,7 +71,7 @@ $sel->is_text_present_ok("2 bugs found"); set_parameters($sel, {'Bug Fields' => {'usestatuswhiteboard-off' => undef}}); # Show detailed bug information panel on advanced search ok($sel->create_cookie('TUI=information_query=1'), 'Show detailed bug information'); -$sel->click_ok("link=Search"); +$sel->click_ok('//*[@class="link-search"]//a'); $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_is("Search for bugs"); ok(!$sel->is_text_present("Whiteboard:"), "Whiteboard label no longer displayed"); diff --git a/qa/t/test_target_milestones.t b/qa/t/test_target_milestones.t index 6aa211428..7558f0525 100644 --- a/qa/t/test_target_milestones.t +++ b/qa/t/test_target_milestones.t @@ -68,7 +68,7 @@ ok($text =~ /OK, you have a new search named selenium_m0./, "New search named se set_parameters($sel, { "Bug Fields" => {"usetargetmilestone-off" => undef} }); -$sel->click_ok("link=Search"); +$sel->click_ok('//*[@class="link-search"]//a'); $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_is("Search for bugs"); ok(!$sel->is_text_present("Target Milestone:"), "The target milestone field is no longer displayed"); -- cgit v1.2.3-24-g4f1b