Commit 4075f240 authored by anonym's avatar anonym
Browse files

Use existing helper.

parent ea3e5256
......@@ -75,12 +75,16 @@ def tails_installer_is_device_selected?(name)
tails_installer_selected_device[/#{device}\d*$/]
end
def tails_installer_match_status(pattern)
text = @installer.child('', roleName: 'text').text
text[pattern]
end
class UpgradeNotSupported < StandardError
end
def usb_install_helper(name)
text = @installer.child('', roleName: 'text').text
if text['It is impossible to upgrade the device']
if tails_installer_match_status('It is impossible to upgrade the device')
raise UpgradeNotSupported
end
assert(tails_installer_is_device_selected?(name))
......@@ -104,11 +108,6 @@ When /^I start Tails Installer in "([^"]+)" mode$/ do |mode|
@installer.child('Tails Installer', roleName: 'frame').wait
end
def tails_installer_match_status(pattern)
text = @installer.child('', roleName: 'text').text
text[pattern]
end
Then /^Tails Installer detects that a device is too small$/ do
try_for(10) do
tails_installer_match_status(/^The device .* is too small to install Tails/)
......
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