gnome.rb 914 Bytes
Newer Older
1
2
Then /^there is no screenshot in the live user's Pictures directory$/ do
  pictures_directory = "/home/#{LIVE_USER}/Pictures"
anonym's avatar
anonym committed
3
4
5
6
7
8
  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

9
10
Then /^a screenshot is saved to the live user's Pictures directory$/ do
  pictures_directory = "/home/#{LIVE_USER}/Pictures"
anonym's avatar
anonym committed
11
12
13
14
15
16
17
  try_for(10, :msg=> "No screenshot was created in #{pictures_directory}") do
    !$vm.execute(
      "find '#{pictures_directory}' -name 'Screenshot*.png' -maxdepth 1"
    ).stdout.empty?
  end
end

18
19
20
21
22
When /^the "(.+)" notification is sent$/ do |title|
  $vm.execute_successfully("notify-send '#{title}'", user: LIVE_USER)
end

Then /^the "(.+)" notification is shown to the user$/ do |title|
23
  Dogtail::Application.new('gnome-shell').child(title)
24
end