Revert "Test Suite: Use Dogtail for some Greeter steps"
[tails.git] / features / step_definitions / gnome.rb
blob1a75c4d9615d6a8d7be03afd2c8041e1452f9cfe
1 Then /^there is no screenshot in the live user's Pictures directory$/ do
2   pictures_directory = "/home/#{LIVE_USER}/Pictures"
3   assert(
4     $vm.execute(
5       "find '#{pictures_directory}' -name 'Screenshot*.png' -maxdepth 1"
6     ).stdout.empty?,
7     "Existing screenshots were found in the live user's Pictures directory."
8   )
9 end
11 Then /^a screenshot is saved to the live user's Pictures directory$/ do
12   pictures_directory = "/home/#{LIVE_USER}/Pictures"
13   try_for(10, msg: "No screenshot was created in #{pictures_directory}") do
14     !$vm.execute(
15       "find '#{pictures_directory}' -name 'Screenshot*.png' -maxdepth 1"
16     ).stdout.empty?
17   end
18 end
20 When /^the "(.+)" notification is sent$/ do |title|
21   $vm.execute_successfully("notify-send '#{title}'", user: LIVE_USER)
22 end
24 Then /^the "(.+)" notification is shown to the user$/ do |title|
25   Dogtail::Application.new('gnome-shell').child(title)
26 end