summaryrefslogtreecommitdiffstats
path: root/features
diff options
context:
space:
mode:
authoranonym <anonym@riseup.net>2016-11-28 23:33:57 +0100
committeranonym <anonym@riseup.net>2016-11-28 23:33:57 +0100
commit5380ac630077432f469260032106d51c965cb2f8 (patch)
tree8d0e41b405eb2c2c505a64ee7e8668cfc2eff5ce /features
parent2bf985addc8529238fb2fc861f650e19bc7d5130 (diff)
Dogtailify "the support documentation page opens in Tor Browser" step.
We previously relied on Sikuli, and the image was made outdated thanks to our donation campaign. No more! Will-fix: #11911
Diffstat (limited to 'features')
-rw-r--r--features/images/SupportDocumentation.pngbin2099 -> 0 bytes
-rw-r--r--features/images/SupportDocumentationGerman.pngbin2629 -> 0 bytes
-rw-r--r--features/step_definitions/browser.rb11
-rw-r--r--features/step_definitions/checks.rb15
4 files changed, 23 insertions, 3 deletions
diff --git a/features/images/SupportDocumentation.png b/features/images/SupportDocumentation.png
deleted file mode 100644
index bccfb80..0000000
--- a/features/images/SupportDocumentation.png
+++ /dev/null
Binary files differ
diff --git a/features/images/SupportDocumentationGerman.png b/features/images/SupportDocumentationGerman.png
deleted file mode 100644
index 24c7708..0000000
--- a/features/images/SupportDocumentationGerman.png
+++ /dev/null
Binary files differ
diff --git a/features/step_definitions/browser.rb b/features/step_definitions/browser.rb
index 896906b..fac23b7 100644
--- a/features/step_definitions/browser.rb
+++ b/features/step_definitions/browser.rb
@@ -116,14 +116,21 @@ end
# This step is limited to the Tor Browser due to #7502 since dogtail
# uses the same interface.
Then /^"([^"]+)" has loaded in the Tor Browser$/ do |title|
- expected_title = "#{title} - Tor Browser"
+ if @language == 'German'
+ browser_name = 'Tor-Browser'
+ reload_action = 'Aktuelle Seite neu laden'
+ else
+ browser_name = 'Tor Browser'
+ reload_action = 'Reload current page'
+ end
+ expected_title = "#{title} - #{browser_name}"
app = Dogtail::Application.new('Firefox')
app.child(expected_title, roleName: 'frame').wait(60)
# The 'Reload current page' button (graphically shown as a looping
# arrow) is only shown when a page has loaded, so once we see the
# expected title *and* this button has appeared, then we can be sure
# that the page has fully loaded.
- app.child('Reload current page', roleName: 'push button').wait(60)
+ app.child(reload_action, roleName: 'push button').wait(60)
end
Then /^the (.*) has no plugins installed$/ do |browser|
diff --git a/features/step_definitions/checks.rb b/features/step_definitions/checks.rb
index 06824b3..507a61b 100644
--- a/features/step_definitions/checks.rb
+++ b/features/step_definitions/checks.rb
@@ -140,7 +140,20 @@ Given /^I setup a filesystem share containing a sample PDF$/ do
end
Then /^the support documentation page opens in Tor Browser$/ do
- @screen.wait("SupportDocumentation#{@language}.png", 120)
+ if @language == 'German'
+ expected_title = 'Tails - Hilfe & Support'
+ expected_heading = 'Die Dokumentation durchsuchen'
+ else
+ expected_title = 'Tails - Support'
+ expected_heading = 'Search the documentation'
+ end
+ step "\"#{expected_title}\" has loaded in the Tor Browser"
+ headings = Dogtail::Application.new('Firefox')
+ .child(expected_title, roleName: 'document frame')
+ .children(roleName: 'heading')
+ assert(
+ headings.any? { |heading| heading.text == expected_heading }
+ )
end
Then /^MAT can clean some sample PDF file$/ do