From 6f251b5dfa22eb39cf923ca6c5dbd44d9f13dbe4 Mon Sep 17 00:00:00 2001 From: "virgil.sangerean" Date: Tue, 14 Oct 2025 17:01:30 +0300 Subject: [PATCH 1/3] vs/search-mode-persists --- .../test_search_mode_persists.py | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 tests/address_bar_and_search/test_search_mode_persists.py diff --git a/tests/address_bar_and_search/test_search_mode_persists.py b/tests/address_bar_and_search/test_search_mode_persists.py new file mode 100644 index 000000000..b8e30e303 --- /dev/null +++ b/tests/address_bar_and_search/test_search_mode_persists.py @@ -0,0 +1,41 @@ +import pytest +from selenium.webdriver import Firefox +from selenium.webdriver.common.keys import Keys + +from modules.browser_object_navigation import Navigation +from modules.page_object_generics import GenericPage + + +@pytest.mark.parametrize("engine", ["DuckDuckGo"]) +def test_search_mode_persists(driver: Firefox, engine): + """ + TC 3028730: Ensure '@bing' is NOT recognized as a special Bing search when DuckDuckGo is selected. + """ + # Open a neutral page (new tab) and prepare helpers + page = GenericPage(driver, url="about:newtab") + nav = Navigation(driver) + + page.open() + + # Step 1: pick DuckDuckGo from the search mode switcher (aka USB) + nav.click_search_mode_switcher() + nav.set_search_mode(engine) + + # Step 2: type '@bing' in the Awesome Bar + nav.click_in_awesome_bar() + nav.type_in_awesome_bar("@bing") + + # Assert that the "tab to search" / alias UI is NOT shown for '@bing' + nav.element_not_visible("tab-to-search-text-span") + + # Step 3: continue typing any word and hit Enter + nav.type_in_awesome_bar(" test" + Keys.ENTER) + + # Expectation: a DuckDuckGo results page, with '@bing' included as plain text in the query. + page.url_contains("duckduckgo.com") + + # Verify '@bing' appears in the query (allowing for URL encoding) + current_url = driver.current_url + assert ("%40bing" in current_url) or ("@bing" in current_url), ( + f"@bing should be part of the search term, but URL was: {current_url}" + ) From ca7d467203999fa1d657c3841b869959abc9001c Mon Sep 17 00:00:00 2001 From: "virgil.sangerean" Date: Tue, 14 Oct 2025 17:09:33 +0300 Subject: [PATCH 2/3] vs/search-mode-persists --- ...persists.py => test_search_mode_persists_mixed_with_bing.py} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename tests/address_bar_and_search/{test_search_mode_persists.py => test_search_mode_persists_mixed_with_bing.py} (95%) diff --git a/tests/address_bar_and_search/test_search_mode_persists.py b/tests/address_bar_and_search/test_search_mode_persists_mixed_with_bing.py similarity index 95% rename from tests/address_bar_and_search/test_search_mode_persists.py rename to tests/address_bar_and_search/test_search_mode_persists_mixed_with_bing.py index b8e30e303..b55e09e9d 100644 --- a/tests/address_bar_and_search/test_search_mode_persists.py +++ b/tests/address_bar_and_search/test_search_mode_persists_mixed_with_bing.py @@ -7,7 +7,7 @@ @pytest.mark.parametrize("engine", ["DuckDuckGo"]) -def test_search_mode_persists(driver: Firefox, engine): +def test_search_mode_persists_mixed_with_bing(driver: Firefox, engine): """ TC 3028730: Ensure '@bing' is NOT recognized as a special Bing search when DuckDuckGo is selected. """ From 6f37d71f9fe9f5ed375a7a5b1cc189dafce69682 Mon Sep 17 00:00:00 2001 From: "virgil.sangerean" Date: Tue, 14 Oct 2025 17:22:07 +0300 Subject: [PATCH 3/3] vs/search-mode-persists --- .../test_search_mode_persists_mixed_with_bing.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/address_bar_and_search/test_search_mode_persists_mixed_with_bing.py b/tests/address_bar_and_search/test_search_mode_persists_mixed_with_bing.py index b55e09e9d..9b98a46d2 100644 --- a/tests/address_bar_and_search/test_search_mode_persists_mixed_with_bing.py +++ b/tests/address_bar_and_search/test_search_mode_persists_mixed_with_bing.py @@ -5,6 +5,9 @@ from modules.browser_object_navigation import Navigation from modules.page_object_generics import GenericPage +@pytest.fixture() +def test_case(): + return "3028730" @pytest.mark.parametrize("engine", ["DuckDuckGo"]) def test_search_mode_persists_mixed_with_bing(driver: Firefox, engine):