summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2016-08-28 19:00:55 +0000
committerintrigeri <intrigeri@boum.org>2016-08-28 19:00:55 +0000
commit1d9d5609056805d3d6c42bc04a753017e511f308 (patch)
treeb74e45d788112f6ad031bd88236fd4ec21274729
parenta42b921ba19d7ec0014e2a563998b4954349ffcd (diff)
Test suite: update the screenshot scenario.
The Pictures & friends directories are not automatically created on feature/stretch currently, and thus gnome-screenshot saves screenshots to $HOME. Given these directories would not be persistent, IMO it's a feature to avoid encouraging users to store stuff in there. So I'm simply adjusting the test to reflect how it now works.
-rw-r--r--features/gnome.feature4
-rw-r--r--features/step_definitions/checks.rb8
2 files changed, 6 insertions, 6 deletions
diff --git a/features/gnome.feature b/features/gnome.feature
index 21b2672..3973fea 100644
--- a/features/gnome.feature
+++ b/features/gnome.feature
@@ -3,6 +3,6 @@ Feature: GNOME is well-integrated into Tails
Scenario: A screenshot is taken when the PRINTSCREEN key is pressed
Given I have started Tails from DVD without network and logged in
- And there is no screenshot in the live user's Pictures directory
+ And there is no screenshot in the live user's home directory
When I press the "PRINTSCREEN" key
- Then a screenshot is saved to the live user's Pictures directory
+ Then a screenshot is saved to the live user's home directory
diff --git a/features/step_definitions/checks.rb b/features/step_definitions/checks.rb
index 06824b3..d457059 100644
--- a/features/step_definitions/checks.rb
+++ b/features/step_definitions/checks.rb
@@ -106,16 +106,16 @@ When /^Tails has booted a 64-bit kernel$/ do
"Tails has not booted a 64-bit kernel.")
end
-Then /^there is no screenshot in the live user's Pictures directory$/ do
- pictures_directory = "/home/#{LIVE_USER}/Pictures"
+Then /^there is no screenshot in the live user's home directory$/ do
+ pictures_directory = "/home/#{LIVE_USER}"
assert($vm.execute(
"find '#{pictures_directory}' -name 'Screenshot*.png' -maxdepth 1"
).stdout.empty?,
"Existing screenshots were found in the live user's Pictures directory.")
end
-Then /^a screenshot is saved to the live user's Pictures directory$/ do
- pictures_directory = "/home/#{LIVE_USER}/Pictures"
+Then /^a screenshot is saved to the live user's home directory$/ do
+ pictures_directory = "/home/#{LIVE_USER}"
try_for(10, :msg=> "No screenshot was created in #{pictures_directory}") do
!$vm.execute(
"find '#{pictures_directory}' -name 'Screenshot*.png' -maxdepth 1"