Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add last-search-engine as a pref in the browser #41789

Closed
IanKrieger opened this issue Oct 22, 2024 · 3 comments · Fixed by brave/brave-core#26137
Closed

Add last-search-engine as a pref in the browser #41789

IanKrieger opened this issue Oct 22, 2024 · 3 comments · Fixed by brave/brave-core#26137

Comments

@IanKrieger
Copy link

IanKrieger commented Oct 22, 2024

Test Plan

See brave/brave-core#26137 (comment) for test plan.

Store last used widget engione as a pref, as not to lose it if local storage is ever cleared.

@MadhaviSeelam
Copy link

MadhaviSeelam commented Nov 15, 2024

Verification PASSED using

Brave | 1.74.6 Chromium: 131.0.6778.69 (Official Build) beta (64-bit)
-- | --
Revision | 876de763a749f7f8a9a5a2fd72a2391129a3a0f0
OS | Windows 11 Version 23H2 (Build 22631.4460)

Testcase 1: Default region - US

Case 1: Single Search Engine Selected (`Bing`) - PASSED
  1. Installed 1.74.6
  2. launched Brave
  3. opened NTP and verified NTP search widget is shown
  4. confirmed Brave is default SE for US region
  5. clicked Brave icon in the search widget
  6. clicked Customize list
  7. selected Bing and unselected Brave
  8. closed Customize Dashboard
  9. confirmed Bing icon is shown in the Search widget
  10. closed Brave and relaunched Brave
  11. confirmed selected SE is shown in the NTP search widget i.e. Bing
  12. entered search term Turkey meal in the search widget
  13. confirmed Bing results page is shown
step 3 step 4-6 step 7 step 9 step 11 step 12 step 13
Image Image Image Image Image Image Image
Case 2: Single Search Engine Selected (`DDG`)- PASSED
  1. Continued from Case 1
    • Bing is selected
  2. clicked Bing icon and clicked Customize list
  3. selected DuckDuckGo and unselected Bing and close the Dashboard
  4. confirmed DuckDuckGo logo is shown in the search widget
  5. opened Dashboard again disabled Show search widget on the new tab page toggle
  6. closed and relaunched Brave
  7. opened Dashboard again and enabled Show search widget on the new tab page toggle
  8. confirmed the DDG, is shown the last SE that was set
  9. entered search term Roast Turkey in the search widget
  10. confirmed DDG search results page shown
step 2 step 3 step 4 step 5 step7- 8 step 9 step 10
Image Image Image Image Image Image Image
Case 3: Multiple Search Engine Selected (`Bing`) - PASSED
  1. New profile
  2. clicked Customize list to open Customize Dashboard
  3. selected DuckDuckGo, Google and Bing
  4. closed the Dashboard and opened SE list
  5. confirmed all three SE are shown on the list
  6. selected Bing as the SE from the list
  7. confirmed Bing icon is shown in the Search widget as expected
  8. closed and relaunched Brave
  9. confirmed Bing, is shown, the last SE that was set
  10. entered search term turkey recipes in the search widget
  11. confirmed Bing results shown
step 1 step 3 step 5 step 6-7 step 9 step 10 step 12
Image Image Image Image Image
Case 4: Multiple Search Engine Selected (`DDG`) - PASSED
  1. Continue from Case 3
    • Bing is shown in the search widget
  2. clicked Bing icon and selected DDG from the SE list
  3. confirmed DDG is shown in the search widget
  4. disabled Show search widget on the new tab page toggle via Customize setting
  5. closed and relaunched Brave
  6. enabled NTP search via Customize Dashboard
  7. confirmed all three SE are selected
  8. confirmed DDG, is shown, the last SE that was set in the Search widget
  9. clicked DDG and selected Google as a default SE
  10. clicked 3 dot menu and click Hide Search button
  11. closed and relaunched Brave
  12. enabled Search widget via Customize
  13. confirmed Google is shown, the last SE that was set
  14. entered search term Thanksgiving foods in the search widget
  15. confirmed Google results shown
step 1 step 3 step 4 step 6 -7 step 9 step 10 step 12 step 13 step 15
Image Image Image Image Image Image Image Image Image
Case 5: Upgrade - PASSED
  1. Installed 1.73.89
  2. launched Brave
  3. confirmed Brave icon is shown as default in the search widget
  4. unselected Brave and selected Qwant
  5. confirmed Qwant logo is shown in the search widget
  6. closed Brave
  7. renamed the profile Brave-Browser-Beta
  8. installed 1.74.6
  9. launch Brave
  10. confirmed Qwant logo is shown in the search widget
  11. entered a search term Thanksgiving
  12. confirmed Qwant results shown
step 1 step 3 step 4 step 5 step 8 step 10 step 12
Image Image Image Image Image Image Image

Testcase 2: Non - US locale (Mozamique)

Case 1: Single Search Engine Selected (`Google`) - PASSED

Pre-requisite: Changed to Mozambique
Google is default search engine

  1. Installed 1.74.6
  2. launched Brave
  3. opened brave://settings/search shows Google as default
  4. opened NTP and verified NTP search widget is shown
  5. confirmed Brave is shown in the search widget
  6. clicked Brave icon in the search widget
  7. clicked Customize list
  8. unselected Brave and selected Google
  9. confirmed Google icon is shown in the search widget
  10. disabled search widget and closed Brave
  11. relaunched Brave and enabled the search widget
  12. confirmed selected SE (Google) is shown in the NTP search widget
  13. entered search term Thanksgiving in the search widget
  14. confirmed Google results are shown
step 3 step 4-6 step 8 step 9 step 10 step 10a step 11 step 12 step 13 step 14
Image Image Image Image Image Image Image Image Image Image

@LaurenWags
Copy link
Member

LaurenWags commented Nov 21, 2024

Verified with

Brave | 1.74.10 Chromium: 131.0.6778.85 (Official Build) beta (x86_64)
-- | --
Revision | bdff9e7d7314280ddbce1c3ada3abee4ce4a3b32
OS | macOS Version 14.7.1 (Build 23H222)

Note, even in regions where Brave Search is not the default browser SE, it is still the default SE for the NTP widget

Region used: Canada (Brave Search is browser default SE)

Case 1: Single Search Engine Selected (`Bing`) - PASSED
  1. Installed 1.74.10
  2. launched Brave, close and relaunch to pull griffin
  3. opened NTP and verified NTP search widget is shown

Image

  1. confirmed Brave is default SE for CA region
  2. clicked Brave icon in the search widget

Image

  1. clicked Customize list
  2. selected Bing and unselected Brave

Image

  1. closed Customize Dashboard
  2. confirmed Bing icon is shown in the Search widget

Image

  1. closed Brave and relaunched Brave
  2. confirmed selected SE is shown in the NTP search widget i.e. Bing

Image

  1. entered search term Turkey meal in the search widget

Image

  1. confirmed Bing results page is shown

Image

Case 2: Single Search Engine Selected (`DDG`)- PASSED
  1. Continued from Case 1
    • Bing is selected
  2. clicked Bing icon and clicked Customize list

Image

  1. selected DuckDuckGo and unselected Bing and close the Dashboard

Image

  1. confirmed DuckDuckGo logo is shown in the search widget

Image

  1. opened Dashboard again disabled Show search widget on the new tab page toggle

Image

  1. closed and relaunched Brave
  2. opened Dashboard again and enabled Show search widget on the new tab page toggle

Image

  1. confirmed the DDG, is shown the last SE that was set

Image

  1. entered search term Roast Turkey in the search widget

Image

  1. confirmed DDG search results page shown

Image

Case 3: Multiple Search Engine Selected (`Bing`) - PASSED
  1. New profile, close and relaunch to pull griffin
  2. clicked Customize list to open Customize Dashboard

Image

  1. selected DuckDuckGo, Google and Bing. deselect Brave.

Image

  1. closed the Dashboard and opened SE list
  2. confirmed all three SE are shown on the list

Image

  1. selected Bing as the SE from the list
  2. confirmed Bing icon is shown in the Search widget as expected

Image

  1. closed and relaunched Brave
  2. confirmed Bing, is shown, the last SE that was set

Image

  1. entered search term turkey recipes in the search widget

Image

  1. confirmed Bing results shown

Image

Region used: US (Brave Search is browser default SE)

Case 4: Multiple Search Engine Selected (`DDG/Google`) - PASSED with follow up issue logged

Note, encountered #42469 while testing this the first time. Changed order of selected SE's from case 3 to be: Google, DDG, Bing in step 3 of case 3 in order to run the below test.

  1. Continue from Case 3
    • Bing is shown in the search widget

Image

  1. clicked Bing icon and selected DDG from the SE list
  2. confirmed DDG is shown in the search widget

Image

  1. disabled Show search widget on the new tab page toggle via Customize setting

Image

  1. closed and relaunched Brave
  2. enabled NTP search via Customize Dashboard
  3. confirmed all three SE are selected

Image

  1. confirmed DDG, is shown, the last SE that was set in the Search widget

Image

  1. clicked DDG and selected Google as a default SE

Image

  1. Make Google the SE used for the widget

Image

  1. clicked 3 dot menu and click Hide Search button
Example Example
Image Image
  1. closed and relaunched Brave
  2. enabled Search widget via Customize

Image

  1. confirmed Google is shown, the last SE that was set

Image

  1. entered search term Thanksgiving foods in the search widget

Image

  1. confirmed Google results shown

Image

Region used: Canada (Brave Search is browser default SE)

Case 5: Upgrades - PASSED

Upgrade 1:

  1. Installed 1.73.91
  2. launched Brave, close and relaunch to pull griffin
  3. confirmed Brave icon is shown as default in the search widget
  4. unselected Brave and selected Qwant
  5. confirmed Qwant logo is shown in the search widget
  6. closed Brave
  7. renamed the profile Brave-Browser-Beta
  8. installed 1.74.10
  9. launch Brave
  10. confirmed Qwant logo is shown in the search widget
  11. entered a search term Thanksgiving
  12. confirmed Qwant results shown
step 1 step 3 step 4 step 5 step 8 step 10 step 12 step 12
Image Image Image Image Image Image Image Image

Upgrade 2:

  1. Installed 1.73.91
  2. launched Brave, close and relaunch to pull griffin
  3. confirmed Brave icon is shown as default in the search widget
  4. Added DDG and Bing to SE list for NTP search widget
  5. confirmed Brave, DDG, and Bing are shown in the SE list for NTP widget
  6. closed Brave
  7. renamed the profile Brave-Browser-Beta
  8. installed 1.74.10
  9. launch Brave
  10. confirmed Brave is still default SE (Brave logo is shown in the search widget)
  11. entered a search term Thanksgiving
  12. confirmed Brave results shown
  13. On NTP try searching with either DDG or Bing as SE from search widget
  14. Confirm selected SE is used for results
step 1 step 3 step 4 step 5 step 8 step 10 step 11 step 12 step 13 step 14
Image Image Image Image Image Image Image Image Image Image

Region used: Aruba (Google is browser default SE)

Case 1: Clean profile - Single Search Engine Selected (`Google`) - PASSED

Pre-requisite: Changed locale to Aruba
Google is default search engine for browser, but Brave is still default SE for NTP widget

  1. Installed 1.74.10
  2. launched Brave, close and relaunch to pull griffin
  3. opened brave://settings/search shows Google as default

Image

  1. opened NTP and verified NTP search widget is shown
  2. confirmed Brave is shown in the search widget

Image

  1. clicked Brave icon in the search widget
  2. clicked Customize list

Image

  1. selected Google and unselected Brave

Image

  1. confirmed Google icon is shown in the search widget

Image

  1. disabled search widget and closed Brave
  2. relaunched Brave and enabled the search widget
  3. confirmed selected SE (Google) is shown in the NTP search widget
Example Example
Image Image
  1. entered search term Thanksgiving in the search widget

Image

  1. confirmed Google results are shown

Image

Case 2 - Upgrade - PASSED
  1. Installed 1.73.91
  2. launched Brave, close and relaunch to pull griffin
  3. confirmed Google is default SE

Image

  1. confirmed Brave icon is shown as default in the search widget

Image

  1. selected DDG and unselected Brave
  2. confirmed DDG logo is shown in the search widget

Image

  1. closed Brave
  2. renamed the profile Brave-Browser-Beta
  3. installed 1.74.10
  4. launch Brave
  5. confirmed DDG logo is shown in the search widget

Image

  1. entered a search term Thanksgiving

Image

  1. confirmed DDG results shown

Image

@LaurenWags LaurenWags added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Nov 21, 2024
@LaurenWags LaurenWags added QA Pass-macOS and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Nov 27, 2024
@MadhaviSeelam MadhaviSeelam added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Dec 5, 2024
@MadhaviSeelam
Copy link

MadhaviSeelam commented Dec 5, 2024

Verification PASSED using

Brave	1.74.19 Chromium: 131.0.6778.108 (Official Build) beta (64-bit) 
Revision	12080da255dfc6f1f55b78bd96cd2f18bce5cb8a
OS	Linux

Testcase 1: Default region - US

Case 1: Single Search Engine Selected (`Bing`) - PASSED
  1. Installed 1.74.19
  2. launched Brave
  3. opened NTP and verified NTP search widget is shown
  4. confirmed Brave is default SE for US region
  5. clicked Brave icon in the search widget
  6. clicked Customize list
  7. selected Bing and unselected Brave
  8. closed Customize Dashboard
  9. confirmed Bing icon is shown in the Search widget
  10. closed Brave and relaunched Brave
  11. confirmed selected SE is shown in the NTP search widget i.e. Bing
  12. entered search term christmasdecor in the search widget
  13. confirmed Bing results page is shown
step 3 step 4-6 step 7 step 9 step 11 step 12 step 13
Image Image Image Image Image Image Image
Case 2: Single Search Engine Selected (`DDG`)- PASSED
  1. Continued from Case 1
    • Bing is selected
  2. clicked Bing icon and clicked Customize list
  3. selected DuckDuckGo and unselected Bing and close the Dashboard
  4. confirmed DuckDuckGo logo is shown in the search widget
  5. opened Dashboard again disabled Show search widget on the new tab page toggle
  6. closed and relaunched Brave
  7. opened Dashboard again and enabled Show search widget on the new tab page toggle
  8. confirmed the DDG, is shown the last SE that was set
  9. entered search term christmas markets in the search widget
  10. confirmed DDG search results page shown
step 2 step 3 step 4 step 5 step7- 8 step 9 step 10
Image Image Image Image Image Image Image
Case 3: Multiple Search Engine Selected (`Bing`) - PASSED
  1. New profile
  2. clicked Customize list to open Customize Dashboard
  3. selected DuckDuckGo, Google and Bing
  4. closed the Dashboard and opened SE list
  5. confirmed all three SE are shown on the list
  6. selected Bing as the SE from the list
  7. confirmed Bing icon is shown in the Search widget as expected
  8. closed and relaunched Brave
  9. confirmed Bing, is shown, the last SE that was set
  10. entered search term Christmas lights in the search widget
  11. confirmed Bing results shown
step 3 step 5 step 6-7 step 9 step 10 step 12
Image Image Image Image Image Image
Case 4: Multiple Search Engine Selected (`DDG`) - PASSED
  1. Continue from Case 3
    • Bing is shown in the search widget
  2. clicked Bing icon and selected DDG from the SE list
  3. confirmed DDG is shown in the search widget
  4. disabled Show search widget on the new tab page toggle via Customize setting
  5. closed and relaunched Brave
  6. enabled NTP search via Customize Dashboard
  7. confirmed all three SE are selected
  8. confirmed DDG, is shown, the last SE that was set in the Search widget
  9. clicked DDG and selected Google as a default SE
  10. clicked 3 dot menu and click Hide Search button
  11. closed and relaunched Brave
  12. enabled Search widget via Customize
  13. confirmed Google is shown, the last SE that was set
  14. entered search term Christmas holidays in the search widget
  15. confirmed Google results shown
step 1 step 2 step 3 step 4 step 6 -7 step 9 step 10 step 12 step 13 step 15
Image Image Image Image Image Image Image Image Image Image
Case 5: Upgrade - PASSED
  1. Installed 1.73.97
  2. launched Brave
  3. confirmed Brave icon is shown as default in the search widget
  4. unselected Brave and selected Qwant
  5. confirmed Qwant logo is shown in the search widget
  6. closed Brave
  7. renamed the profile Brave-Browser-Beta
  8. installed 1.74.19
  9. launch Brave
  10. confirmed Qwant logo is shown in the search widget
  11. closed and restarted Brave
  12. confirmed Qwant is shown in the search widget
  13. entered a search term Christmas movies in the search widget
  14. confirmed Qwant results shown
step 1 step 3 step 4 step 5 step 8 step 10 step 12 step 14
Image Image Image Image Image Image Image Image

Testcase 2: Non - US locale (South Africa)

Case 1: Single Search Engine Selected (`Google`) - PASSED

Pre-requisite: locale changed to South Africa
Google is default search engine

  1. Installed 1.74.6
  2. launched Brave
  3. opened brave://settings/search and it shows Google as default
  4. opened NTP and verified NTP search widget is shown
  5. confirmed Brave icon is shown in the search widget
  6. clicked Brave icon in the search widget
  7. clicked Customize list
  8. unselected Brave and selected Google
  9. confirmed Google icon is shown in the search widget
  10. disabled search widget and closed Brave
  11. relaunched Brave and enabled the search widget
  12. confirmed selected SE (Google) is shown in the NTP search widget
  13. entered search term Christmas in the search widget
  14. confirmed Google results are shown
step 0 step 3 step 4-6 step 8 step 9 step 10 step 11 step 12 step 13 step 14
Image Image Image Image Image Image Image Image Image Image

@MadhaviSeelam MadhaviSeelam added QA Pass-Linux and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment