1 def shared_video_dir_on_guest
2 "/tmp/shared_video_dir"
5 Given /^I create sample videos$/ do
6 next if @skip_steps_while_restoring_background
7 fatal_system("ffmpeg -loop 1 -t 30 -f image2 " +
8 "-i 'features/images/TailsBootSplash.png' " +
9 "-an -vcodec libx264 -y " +
10 "'#{$misc_files_dir}/video.mp4' >/dev/null 2>&1")
13 Given /^I setup a filesystem share containing sample videos$/ do
14 next if @skip_steps_while_restoring_background
15 @vm.add_share($misc_files_dir, shared_video_dir_on_guest)
18 Given /^I copy the sample videos to "([^"]+)" as user "([^"]+)"$/ do |destination, user|
19 next if @skip_steps_while_restoring_background
20 for video_on_host in Dir.glob("#{$misc_files_dir}/*.mp4") do
21 video_name = File.basename(video_on_host)
22 src_on_guest = "#{shared_video_dir_on_guest}/#{video_name}"
23 dst_on_guest = "#{destination}/#{video_name}"
24 step "I copy \"#{src_on_guest}\" to \"#{dst_on_guest}\" as user \"amnesia\""
28 When /^I start Totem through the GNOME menu$/ do
29 next if @skip_steps_while_restoring_background
30 step 'I start "Totem" via the GNOME "SoundVideo" applications menu'
31 @screen.wait_and_click("TotemMainWindow.png", 20)
34 When /^I load the "([^"]+)" URL in Totem$/ do |url|
35 next if @skip_steps_while_restoring_background
36 @screen.type("l", Sikuli::KeyModifier.CTRL)
37 @screen.wait("TotemOpenUrlDialog.png", 10)
38 @screen.type(url + Sikuli::Key.ENTER)
41 When /^I(?:| try to) open "([^"]+)" with Totem$/ do |filename|
42 next if @skip_steps_while_restoring_background
43 step "I run \"totem #{filename}\" in GNOME Terminal"
46 When /^I close Totem$/ do
47 step 'I kill the process "totem"'