2 Dogtail::Application.new('electrum')
6 electrum_app.child(roleName: 'frame')
10 electrum_app.child(roleName: 'dialog')
13 Then /^I start Electrum through the GNOME menu$/ do
14 step 'I start "Electrum Bitcoin Wallet" via GNOME Activities Overview'
17 Then /^Electrum (?:has started|starts)$/ do
23 When /^a bitcoin wallet is (|not )present$/ do |existing|
24 wallet = "/home/#{LIVE_USER}/.electrum/wallets/default_wallet"
27 step "the file \"#{wallet}\" exists after at most 30 seconds"
29 step "the file \"#{wallet}\" does not exist"
31 raise "Unknown value specified for #{existing}"
35 Then /^I am prompted to (configure Electrum|enter my Electrum wallet password)$/ do |mode|
37 electrum_wizard.child('Electrum wallet', roleName: 'label')
40 when 'configure Electrum'
41 expected = "This file does not exist.\n" \
42 "Press 'Next' to create this wallet, or choose another file."
43 when 'enter my Electrum wallet password'
44 expected = "This file is encrypted.\n" \
45 'Enter your password or choose another file.'
49 electrum_wizard.children(expected, roleName: 'label')
52 When /^I follow the Electrum wizard to create a new bitcoin wallet$/ do
53 electrum_wizard.button('Next').click
54 electrum_wizard.child('What kind of wallet do you want to create?',
56 electrum_wizard.child('Standard wallet', roleName: 'radio button').click
57 electrum_wizard.button('Next').click
58 electrum_wizard.child('Keystore', roleName: 'label')
59 electrum_wizard.child('Create a new seed', roleName: 'radio button').click
60 electrum_wizard.button('Next').click
61 electrum_wizard.child('Choose Seed type', roleName: 'label')
62 electrum_wizard.child('Standard', roleName: 'radio button').click
63 electrum_wizard.button('Next').click
64 electrum_wizard.child('Your wallet generation seed is:', roleName: 'label')
65 seed = electrum_wizard.child(roleName: 'text').text
66 electrum_wizard.button('Next').click
67 electrum_wizard.child('Confirm Seed', roleName: 'label')
68 electrum_wizard.child(roleName: 'text').text = seed
69 electrum_wizard.button('Next').click
70 @electrum_password = 'asdf'
71 electrum_wizard.children(roleName: 'password text').each do |n|
72 n.typeText(@electrum_password)
74 electrum_wizard.button('Next').click
77 Then /^I see a warning that Electrum is not persistent$/ do
79 Dogtail::Application.new('zenity')
80 .child(roleName: 'label')
82 .start_with?('Persistence is disabled for Electrum')
86 When /^I enter my Electrum wallet password$/ do
87 electrum_wizard.child(roleName: 'password text').typeText(@electrum_password)
88 electrum_wizard.button('Next').click
91 Then /^I see the main Electrum client window$/ do
95 Then /^Electrum successfully connects to the network$/ do
96 electrum_statusbar = electrum_main.child(roleName: 'status bar')
98 electrum_statusbar.children(roleName: 'label').any? do |n|
99 # The balance is shown iff we are connected.
100 n.name.start_with?('Balance: ')