"Using a persistent Pidgin configuration" is fragile
“Pidgin automatically enables my XMPP account” is run immediately after
“I start Pidgin through the GNOME menu”, and it tries to immediately
focus the Buddy List window. In other scenarios that step is run after
“I close Pidgin’s account manager window” so we have a guarantee that
the buddy list is open already, but here it’s not the case, so if
focus_window
wins the race, it fails:
calling as amnesia: echo '#!/usr/bin/python
from dogtail import tree
from dogtail.config import config
config.searchShowingOnly = True
application = tree.root.application('"'"'gnome-shell'"'"')
application.child('"'"'Pidgin Internet Messenger'"'"', roleName='"'"'label'"'"').click()' >> '/tmp/tmp.kQjokj8DH6'
call returned: [0, "", ""]
calling as amnesia: /usr/bin/python '/tmp/tmp.kQjokj8DH6'
call returned: [0, "Creating logfile at /tmp/dogtail-amnesia/logs/tmp.kQjokj8DH6_20160720-193855_debug ...\nClicking on [label | Pidgin Internet Messenger]\nMouse button 1 click at (343,292)\n", ""]
calling as root: rm -f '/tmp/tmp.kQjokj8DH6'
call returned: [0, "", ""]
When I start Pidgin through the GNOME menu # features/step_definitions/pidgin.rb:291
calling as amnesia: xdotool search --name 'Buddy List' windowactivate --sync
call returned: [1, "", ""]
calling as amnesia: xdotool set_desktop '3'
call returned: [0, "", ""]
calling as amnesia: xdotool set_desktop '0'
call returned: [0, "", ""]
calling as amnesia: xdotool search --name 'Buddy List' windowactivate --sync
call returned: [1, "", ""]
Then Pidgin automatically enables my XMPP account # features/step_definitions/pidgin.rb:76
Command failed: xdotool search --name 'Buddy List' windowactivate --sync
error code: 1
stderr: .
<false> is not true. (ExecutionFailedInVM)
./features/support/helpers/vm_helper.rb:442:in `rescue in execute_successfully'
./features/support/helpers/vm_helper.rb:439:in `execute_successfully'
./features/support/helpers/vm_helper.rb:484:in `do_focus'
./features/support/helpers/vm_helper.rb:499:in `rescue in focus_window'
./features/support/helpers/vm_helper.rb:490:in `focus_window'
./features/step_definitions/pidgin.rb:77:in `/^Pidgin automatically enables my XMPP account$/'
features/pidgin.feature:117:in `Then Pidgin automatically enables my XMPP account'
Note that I see the buddy list appear in the last second of the video capture.
Feature Branch: https://salsa.debian.org/tails-team/tails/merge_requests/33
Parent Task: #10288
Original created by @intrigeri on 11584 (Redmine)