summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranonym <anonym@riseup.net>2016-01-25 13:50:57 +0100
committeranonym <anonym@riseup.net>2016-01-25 13:50:57 +0100
commit6473ca55cd1d3ccf6a8a235979931d046fe0308e (patch)
tree2f0972b1e04376ab7c92f4592b546aed9273f7e5
parent9b174f7732d587430df026de39e193ed8ac93248 (diff)
-rw-r--r--features/pidgin.feature8
-rw-r--r--features/step_definitions/pidgin.rb25
2 files changed, 26 insertions, 7 deletions
diff --git a/features/pidgin.feature b/features/pidgin.feature
index 5df317e..b8c9ce1 100644
--- a/features/pidgin.feature
+++ b/features/pidgin.feature
@@ -64,10 +64,10 @@ Feature: Chatting anonymously using Pidgin
And I close Pidgin's account manager window
Then Pidgin successfully connects to the "irc.oftc.net" account
And I can join the "#tails" channel on "irc.oftc.net"
- When I type "/topic"
- And I press the "ENTER" key
- Then I see the Tails roadmap URL
- When I click on the Tails roadmap URL
+ And I close the current chat
+ When I PM the Tails roadmap URL to myself on "irc.oftc.net"
+ And I focus the chat with the Tails roadmap URL
+ And I click on the Tails roadmap URL
Then the Tor Browser has started and loaded the Tails roadmap
And the "irc.oftc.net" account only responds to PING and VERSION CTCP requests
diff --git a/features/step_definitions/pidgin.rb b/features/step_definitions/pidgin.rb
index 3f5ed93..ca82347 100644
--- a/features/step_definitions/pidgin.rb
+++ b/features/step_definitions/pidgin.rb
@@ -280,6 +280,15 @@ end
When /^I start Pidgin through the GNOME menu$/ do
step 'I start "Pidgin" via the GNOME "Internet" applications menu'
+ # Deal with IRC ghosting and similar by making sure that Pidgin
+ # shuts down cleanly.
+ add_after_scenario_hook do
+ 10.times do
+ break if not $vm.has_process?('pidgin')
+ $vm.execute('killall pidgin')
+ sleep 1
+ end
+ end
end
When /^I open Pidgin's account manager window$/ do
@@ -451,12 +460,22 @@ When /^I close Pidgin's certificate import failure dialog$/ do
@screen.waitVanish('PidginCertificateImportFailed.png', 10)
end
-When /^I see the Tails roadmap URL$/ do
+When /^I close the current chat$/ do
+ @screen.type('w', Sikuli::KeyModifier.CTRL)
+end
+
+When /^I PM the Tails roadmap URL to myself on "([^"]+)"$/ do |irc_server|
+ my_nickname = configured_pidgin_accounts[irc_server]["nickname"]
+ url = 'https://labs.riseup.net/code/projects/tails/roadmap'
+ @screen.type("/msg #{my_nickname} #{url}" + Sikuli::Key.ENTER)
+end
+
+When /^I focus the chat with the Tails roadmap URL$/ do
try_for(60) do
begin
- @screen.find('PidginTailsRoadmapUrl.png')
+ @screen.wait('PidginTailsRoadmapUrl.png', 3)
rescue FindFailed => e
- @screen.type(Sikuli::Key.PAGE_UP)
+ @screen.type(Sikuli::Key.PAGE_DOWN, Sikuli::KeyModifier.CTRL)
raise e
end
end