Commit d847d020 authored by Tails developers's avatar Tails developers
Browse files

Adapt I2P test to introduction of the NM hook and I2P Browser.

parent 313f8b52
......@@ -11,8 +11,8 @@ Feature: I2P
And GNOME has started
And Tor is ready
And all notifications have disappeared
Then the I2P desktop file is not present
And the I2P sudo rules are not present
Then the I2P Browser desktop file is not present
And the I2P Browser sudo rules are not present
And the I2P firewall rules are disabled
Scenario: I2P is enabled when the "i2p" boot parameter is added
......@@ -23,10 +23,11 @@ Feature: I2P
And I log in to a new session
And GNOME has started
And Tor is ready
And I2P is running
And the I2P router console is ready
And all notifications have disappeared
Then the I2P desktop file is present
And the I2P sudo rules are enabled
Then the I2P Browser desktop file is present
And the I2P Browser sudo rules are enabled
And the I2P firewall rules are enabled
When I start I2P through the GNOME menu
Then I see "I2P_starting_notification.png" after at most 60 seconds
And I see "I2P_router_console.png" after at most 60 seconds
When I start the I2P Browser through the GNOME menu
Then I see "I2P_router_console.png" after at most 60 seconds
When /^I start I2P through the GNOME menu$/ do
Given /^I2P is running$/ do
next if @skip_steps_while_restoring_background
try_for(30) do
@vm.execute('service i2p status').success?
end
end
Given /^the I2P router console is ready$/ do
next if @skip_steps_while_restoring_background
try_for(60) do
@vm.execute('. /usr/local/lib/tails-shell-library/i2p.sh; ' +
'i2p_router_console_is_ready').success?
end
end
When /^I start the I2P Browser through the GNOME menu$/ do
next if @skip_steps_while_restoring_background
@screen.wait_and_click("GnomeApplicationsMenu.png", 10)
@screen.wait_and_click("GnomeApplicationsInternet.png", 10)
@screen.wait_and_click("GnomeApplicationsI2P.png", 20)
@screen.wait_and_click("GnomeApplicationsI2PBrowser.png", 20)
end
Then /^the I2P desktop file is (|not )present$/ do |mode|
Then /^the I2P Browser desktop file is (|not )present$/ do |mode|
next if @skip_steps_while_restoring_background
file = '/usr/share/applications/i2p.desktop'
file = '/usr/share/applications/i2p-browser.desktop'
if mode == ''
assert(@vm.execute("test -e #{file}").success?)
elsif mode == 'not '
......@@ -17,9 +32,9 @@ Then /^the I2P desktop file is (|not )present$/ do |mode|
end
end
Then /^the I2P sudo rules are (enabled|not present)$/ do |mode|
Then /^the I2P Browser sudo rules are (enabled|not present)$/ do |mode|
next if @skip_steps_while_restoring_background
file = '/etc/sudoers.d/zzz_i2p'
file = '/etc/sudoers.d/zzz_i2pbrowser'
if mode == 'enabled'
assert(@vm.execute("test -e #{file}").success?)
elsif mode == 'not present'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment