summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbertagaz <bertagaz@ptitcanardnoir.org>2018-04-03 20:51:30 +0200
committerbertagaz <bertagaz@ptitcanardnoir.org>2018-04-03 20:51:30 +0200
commit54cc18ea696e2b4118d41bd29fe8519d2802f8ca (patch)
tree7c1cd467bf2aa161e1ba0c9223d0a4c1e1e93d17
parentf0d2c48d614a97080ff11525aee9dc7c67c580d3 (diff)
parent9f99bfbca21415ae8db4482c5be39bbfb50ec357 (diff)
Merge remote-tracking branch 'origin/feature/14596-automated-tests-for-ASP-gui' into feature/14596-automated-tests-for-ASP-gui-with-installing-notificationfeature/14596-automated-tests-for-ASP-gui-with-installing-notification
-rw-r--r--features/additional_software_packages.feature11
-rw-r--r--features/images/ASPDocumentationInstallCloning.pngbin0 -> 4693 bytes
-rw-r--r--features/step_definitions/additional_software_packages.rb18
-rw-r--r--features/step_definitions/common_steps.rb2
4 files changed, 29 insertions, 2 deletions
diff --git a/features/additional_software_packages.feature b/features/additional_software_packages.feature
index 75f2acf..1fd2c0c 100644
--- a/features/additional_software_packages.feature
+++ b/features/additional_software_packages.feature
@@ -10,7 +10,7 @@ Feature: Additional software packages
And I update APT using apt
When I install "sslh" using apt
Then I am notified I can not use ASP for "sslh"
- #And I can open the documentation from the notification link
+ And I can open the documentation from the notification link
@check_tor_leaks
Scenario: I can set up and use ASP when I install a package in a Tails that has no persistent partition
@@ -31,6 +31,15 @@ Feature: Additional software packages
And the additional software package installation service has started
And the package "sslh" is installed
+ @check_tor_leaks
+ Scenario: I can install packages in a Tails session with locked down persistence without being annoyed by ASP
+ Given a computer
+ And I start Tails from USB drive "__internal" and I login with an administration password
+ And I update APT using apt
+ When I install "cowsay" using apt
+ Then ASP has been started for "cowsay" and shuts up because the persistence is locked
+ And the package "cowsay" is installed
+
#12586
@check_tor_leaks
Scenario: Packages I install with Synaptic and add to ASP are automatically installed
diff --git a/features/images/ASPDocumentationInstallCloning.png b/features/images/ASPDocumentationInstallCloning.png
new file mode 100644
index 0000000..9f46b29
--- /dev/null
+++ b/features/images/ASPDocumentationInstallCloning.png
Binary files differ
diff --git a/features/step_definitions/additional_software_packages.rb b/features/step_definitions/additional_software_packages.rb
index de384c1..35ac23f 100644
--- a/features/step_definitions/additional_software_packages.rb
+++ b/features/step_definitions/additional_software_packages.rb
@@ -128,3 +128,21 @@ end
When /^I remove the "([^"]*)" deb file from the APT cache$/ do |package|
$vm.execute("rm -f /live/persistence/TailsData_unlocked/apt/cache/#{package}*.deb")
end
+
+Then /^I can open the documentation from the notification link$/ do
+ gnome_shell = Dogtail::Application.new('gnome-shell')
+ gnome_shell.child('Documentation', roleName: 'push button').click
+ # For some reason the below two steps fail. Dogtail can not find the Firefox
+ # application.
+ #try_for(60) { @torbrowser = Dogtail::Application.new('Firefox') }
+ #step '"Install from another Tails" has loaded in the Tor Browser'
+ # So instead let's try to find the title of the page with Sikuli.
+ @screen.wait('ASPDocumentationInstallCloning', 120)
+end
+
+Then /^ASP has been started for "([^"]*)" and shuts up because the persistence is locked$/ do |package|
+ asp_logs = '/run/live-additional-software/log'
+ assert(!$vm.file_empty?(asp_logs))
+ try_for(60) { $vm.execute("grep #{package} #{asp_logs}").success? }
+ try_for(60) { $vm.file_content(asp_logs).include?('Warning: persistence storage is locked') }
+end
diff --git a/features/step_definitions/common_steps.rb b/features/step_definitions/common_steps.rb
index fa46e8c..b9c4e56 100644
--- a/features/step_definitions/common_steps.rb
+++ b/features/step_definitions/common_steps.rb
@@ -134,7 +134,7 @@ Given /^I start Tails( from DVD)?( with network unplugged)?( and I login)?$/ do
end
end
-Given /^I start Tails from (.+?) drive "(.+?)"( with network unplugged)?( and I login( with persistence enabled)?( and an administration password)?)?$/ do |drive_type, drive_name, network_unplugged, do_login, persistence_on, admin_password|
+Given /^I start Tails from (.+?) drive "(.+?)"( with network unplugged)?( and I login( with (persistence enabled)?)?( and)?(an administration password)?)?$/ do |drive_type, drive_name, network_unplugged, do_login, useless_syntax_with, persistence_on, useless_syntax_and, admin_password|
step "the computer is set to boot from #{drive_type} drive \"#{drive_name}\""
if network_unplugged
step "the network is unplugged"