Test suite step for running commands in GNOME Terminal is buggy on Jessie
$vm.has_process?("gnome-terminal") always fails: we should
s/gnome-terminal/gnome-terminal-server/ in there. As a result, I’ve
16:51:41 Scenario: Watching a MP4 video stored on the non-persistent filesystem # features/totem.feature:11 16:51:42 Given a computer # features/step_definitions/common_steps.rb:124 16:51:42 And I setup a filesystem share containing sample videos # features/step_definitions/totem.rb:13 16:54:38 And I start Tails from DVD with network unplugged and I login # features/step_definitions/common_steps.rb:193 16:54:38 And I copy the sample videos to "/home/amnesia" as user "amnesia" # features/step_definitions/totem.rb:17 16:54:38 And the file "/home/amnesia/video.mp4" exists # features/step_definitions/common_steps.rb:607 16:54:38 Given I start monitoring the AppArmor log of "/usr/bin/totem" # features/step_definitions/common_steps.rb:885 16:54:38 When I open "/home/amnesia/video.mp4" with Totem # features/step_definitions/totem.rb:26 16:54:38 Then I see "SampleLocalMp4VideoFrame.png" after at most 20 seconds # features/step_definitions/common_steps.rb:439 16:54:38 And AppArmor has not denied "/usr/bin/totem" from opening "/home/amnesia/video.mp4" # features/step_definitions/common_steps.rb:897 16:54:38 Given I close Totem # features/step_definitions/totem.rb:30 16:54:38 And I copy the sample videos to "/home/amnesia/.gnupg" as user "amnesia" # features/step_definitions/totem.rb:17 16:54:38 And the file "/home/amnesia/.gnupg/video.mp4" exists # features/step_definitions/common_steps.rb:607 16:54:38 And I restart monitoring the AppArmor log of "/usr/bin/totem" # features/step_definitions/common_steps.rb:885 16:54:38 When I try to open "/home/amnesia/.gnupg/video.mp4" with Totem # features/step_definitions/totem.rb:26 16:54:38 Then I see "TotemUnableToOpen.png" after at most 10 seconds # features/step_definitions/common_steps.rb:439 16:54:38 FindFailed: can not find TotemUnableToOpen.png on the screen. 16:54:38 Line ?, in File ? (RuntimeError) 16:54:38 ./features/step_definitions/common_steps.rb:444:in `rescue in block in <top (required)>' 16:54:38 ./features/step_definitions/common_steps.rb:440:in `/^I (do not )?see "([^"]*)" after at most (\d+) seconds$/' 16:54:38 features/totem.feature:26:in `Then I see "TotemUnableToOpen.png" after at most 10 seconds'
… and a 2nd terminal window was open (while we should have reused the existing one), but the first “t” of the “totem” command was lost: it was typed in the existing Terminal window, which is to be expected since “I start and focus GNOME Terminal” will immediately return without waiting for the 2nd Terminal to be up.
Feature Branch: test/11176-run-in-gnome-terminal