summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2020-10-18 17:56:19 +0000
committerintrigeri <intrigeri@boum.org>2020-10-18 17:58:07 +0000
commit0f9d6355f09e35d68ec81d01db3b0ebcfed6caf0 (patch)
tree522fda9fc80953a1b7d4ab4008b6075f02651186
parentbb797383e47f61c177e721413956eef86ce1dc93 (diff)
Test suite: automate testing that DuckDuckGo is the default search engine in all tier-1 languagestest/automate-manual-tests
Closes #10265
-rw-r--r--features/images/BrowserAddressBarChinese.pngbin0 -> 1030 bytes
-rw-r--r--features/images/BrowserAddressBarFrench.pngbin0 -> 538 bytes
-rw-r--r--features/images/BrowserAddressBarGerman.pngbin0 -> 727 bytes
l---------features/images/BrowserAddressBarHindi.png1
-rw-r--r--features/images/BrowserAddressBarIndonesian.pngbin0 -> 567 bytes
-rw-r--r--features/images/BrowserAddressBarItalian.pngbin0 -> 616 bytes
-rw-r--r--features/images/BrowserAddressBarPersian.pngbin0 -> 884 bytes
-rw-r--r--features/images/BrowserAddressBarPortuguese.pngbin0 -> 619 bytes
-rw-r--r--features/images/BrowserAddressBarRussian.pngbin0 -> 626 bytes
-rw-r--r--features/images/DuckDuckGoSearchPrompt.pngbin0 -> 1000 bytes
-rw-r--r--features/images/DuckDuckGoSearchPromptChinese.pngbin0 -> 1061 bytes
-rw-r--r--features/images/DuckDuckGoSearchPromptHindi.pngbin0 -> 1016 bytes
-rw-r--r--features/images/DuckDuckGoSearchPromptPersian.pngbin0 -> 1797 bytes
-rw-r--r--features/images/TorBrowserOverviewIcon.pngbin0 -> 1566 bytes
-rw-r--r--features/localization.feature4
-rw-r--r--features/step_definitions/browser.rb19
-rw-r--r--features/step_definitions/common_steps.rb33
-rw-r--r--wiki/src/contribute/release_process/test.mdwn2
18 files changed, 44 insertions, 15 deletions
diff --git a/features/images/BrowserAddressBarChinese.png b/features/images/BrowserAddressBarChinese.png
new file mode 100644
index 0000000..3cb7bac
--- /dev/null
+++ b/features/images/BrowserAddressBarChinese.png
Binary files differ
diff --git a/features/images/BrowserAddressBarFrench.png b/features/images/BrowserAddressBarFrench.png
new file mode 100644
index 0000000..fa4a266
--- /dev/null
+++ b/features/images/BrowserAddressBarFrench.png
Binary files differ
diff --git a/features/images/BrowserAddressBarGerman.png b/features/images/BrowserAddressBarGerman.png
new file mode 100644
index 0000000..c30a66c
--- /dev/null
+++ b/features/images/BrowserAddressBarGerman.png
Binary files differ
diff --git a/features/images/BrowserAddressBarHindi.png b/features/images/BrowserAddressBarHindi.png
new file mode 120000
index 0000000..43a5f2a
--- /dev/null
+++ b/features/images/BrowserAddressBarHindi.png
@@ -0,0 +1 @@
+BrowserAddressBar.png \ No newline at end of file
diff --git a/features/images/BrowserAddressBarIndonesian.png b/features/images/BrowserAddressBarIndonesian.png
new file mode 100644
index 0000000..b4232d5
--- /dev/null
+++ b/features/images/BrowserAddressBarIndonesian.png
Binary files differ
diff --git a/features/images/BrowserAddressBarItalian.png b/features/images/BrowserAddressBarItalian.png
new file mode 100644
index 0000000..ec57d04
--- /dev/null
+++ b/features/images/BrowserAddressBarItalian.png
Binary files differ
diff --git a/features/images/BrowserAddressBarPersian.png b/features/images/BrowserAddressBarPersian.png
new file mode 100644
index 0000000..628f4de
--- /dev/null
+++ b/features/images/BrowserAddressBarPersian.png
Binary files differ
diff --git a/features/images/BrowserAddressBarPortuguese.png b/features/images/BrowserAddressBarPortuguese.png
new file mode 100644
index 0000000..facd2fc
--- /dev/null
+++ b/features/images/BrowserAddressBarPortuguese.png
Binary files differ
diff --git a/features/images/BrowserAddressBarRussian.png b/features/images/BrowserAddressBarRussian.png
new file mode 100644
index 0000000..7d8b262
--- /dev/null
+++ b/features/images/BrowserAddressBarRussian.png
Binary files differ
diff --git a/features/images/DuckDuckGoSearchPrompt.png b/features/images/DuckDuckGoSearchPrompt.png
new file mode 100644
index 0000000..c295545
--- /dev/null
+++ b/features/images/DuckDuckGoSearchPrompt.png
Binary files differ
diff --git a/features/images/DuckDuckGoSearchPromptChinese.png b/features/images/DuckDuckGoSearchPromptChinese.png
new file mode 100644
index 0000000..7130c87
--- /dev/null
+++ b/features/images/DuckDuckGoSearchPromptChinese.png
Binary files differ
diff --git a/features/images/DuckDuckGoSearchPromptHindi.png b/features/images/DuckDuckGoSearchPromptHindi.png
new file mode 100644
index 0000000..c0d2362
--- /dev/null
+++ b/features/images/DuckDuckGoSearchPromptHindi.png
Binary files differ
diff --git a/features/images/DuckDuckGoSearchPromptPersian.png b/features/images/DuckDuckGoSearchPromptPersian.png
new file mode 100644
index 0000000..bd284b7
--- /dev/null
+++ b/features/images/DuckDuckGoSearchPromptPersian.png
Binary files differ
diff --git a/features/images/TorBrowserOverviewIcon.png b/features/images/TorBrowserOverviewIcon.png
new file mode 100644
index 0000000..44cae2c
--- /dev/null
+++ b/features/images/TorBrowserOverviewIcon.png
Binary files differ
diff --git a/features/localization.feature b/features/localization.feature
index 6e28b2c..02904b4 100644
--- a/features/localization.feature
+++ b/features/localization.feature
@@ -20,6 +20,10 @@ Feature: Localization
Given I have started Tails from DVD without network and stopped at Tails Greeter's login screen
When I log in to a new session in <language> with accelerator "<start_accel>"
Then the keyboard layout is set to "<layout>"
+ When the network is plugged
+ And Tor is ready
+ And I start the Tor Browser
+ Then DuckDuckGo is the default search engine
# This list has to be kept in sync' with our list of tier-1 languages:
# https://tails.boum.org/contribute/how/translate/#tier-1-languages
diff --git a/features/step_definitions/browser.rb b/features/step_definitions/browser.rb
index c20a495..6e29116 100644
--- a/features/step_definitions/browser.rb
+++ b/features/step_definitions/browser.rb
@@ -85,7 +85,7 @@ end
def xul_application_info(application)
defaults = {
- address_bar_image: 'BrowserAddressBar.png',
+ address_bar_image: "BrowserAddressBar#{$language}.png",
unused_tbb_libs: ['libnssdbm3.so', 'libmozavcodec.so', 'libmozavutil.so'],
}
case application
@@ -304,3 +304,20 @@ Then /^I can watch a WebM video in Tor Browser$/ do
@screen.wait('TorBrowserSampleRemoteWebMVideoFrame.png', 30)
end
end
+
+Then /^DuckDuckGo is the default search engine$/ do
+ step 'I open a new tab in the Tor Browser'
+ # Typing would require maintaining keymaps for every language in
+ # which we run this step ⇒ instead, paste the search string.
+ $vm.set_clipboard('a random search string')
+ @screen.press('ctrl', 'v')
+ @screen.wait_any(
+ [
+ 'DuckDuckGoSearchPrompt.png',
+ 'DuckDuckGoSearchPromptHindi.png',
+ 'DuckDuckGoSearchPromptChinese.png',
+ 'DuckDuckGoSearchPromptPersian.png',
+ ],
+ 10
+ )
+end
diff --git a/features/step_definitions/common_steps.rb b/features/step_definitions/common_steps.rb
index 7ab4ef6..b00eea2 100644
--- a/features/step_definitions/common_steps.rb
+++ b/features/step_definitions/common_steps.rb
@@ -457,7 +457,7 @@ Given /^available upgrades have been checked$/ do
end
When /^I start the Tor Browser( in offline mode)?$/ do |offline|
- step 'I start "Tor Browser" via GNOME Activities Overview'
+ step 'I start "TorBrowserOverviewIcon.png" via GNOME Activities Overview'
if offline
start_button = Dogtail::Application
.new('zenity')
@@ -769,18 +769,27 @@ Given /^I start "([^"]+)" via GNOME Activities Overview$/ do |app_name|
# keyword only found in the former's .desktop file.
app_name = 'commandline'
end
- @screen.wait('GnomeApplicationsMenu.png', 10)
+ @screen.wait("GnomeApplicationsMenu#{$language}.png", 10)
$vm.execute_successfully('xdotool key Super', user: LIVE_USER)
- @screen.wait('GnomeActivitiesOverview.png', 10)
- # Trigger startup of search providers
- @screen.type(app_name[0])
- # Give search providers some time to start (#13469#note-5) otherwise
- # our search sometimes returns no results at all.
- sleep 2
- # Type the rest of the search query
- @screen.type(app_name[1..-1])
- sleep 2
- @screen.press('ctrl', 'Return')
+ # Only use this way of passing the app_name argument where it's
+ # really needed, e.g. to avoid having to encode lots of keymaps
+ # to be able to type the name correctly:
+ if app_name.match(/[.]png$/)
+ # This should be ctrl + click, to ensure we open a new window.
+ # Let's implement this once once of the callers needs this.
+ @screen.wait(app_name, 10).click
+ else
+ @screen.wait('GnomeActivitiesOverview.png', 10)
+ # Trigger startup of search providers
+ @screen.type(app_name[0])
+ # Give search providers some time to start (#13469#note-5) otherwise
+ # our search sometimes returns no results at all.
+ sleep 2
+ # Type the rest of the search query
+ @screen.type(app_name[1..-1])
+ sleep 2
+ @screen.press('ctrl', 'Return')
+ end
end
When /^I type "([^"]+)"$/ do |string|
diff --git a/wiki/src/contribute/release_process/test.mdwn b/wiki/src/contribute/release_process/test.mdwn
index 9b61558..9b7ec75 100644
--- a/wiki/src/contribute/release_process/test.mdwn
+++ b/wiki/src/contribute/release_process/test.mdwn
@@ -314,8 +314,6 @@ You *really* have to reboot between each language.
- be auto-configured to use the same keyboard layout as the
X session (known exceptions: Chinese, Persian, Português,
Russian, Tiếng Việt).
-* In the Tor Browser:
- - DuckDuckGo must be the default, pre-selected search plugin. (automate: [[!tails_ticket 10265]])
## Spellchecking