1+ Feature : Users should be able to change their bitcoin address
2+ Background :
3+ Given a developer named "seldon" exists without a bitcoin address
4+ And I'm signed in as "seldon"
5+
6+ @vcr-ignore-params
7+ Scenario : Users should be able to set P2PKH address
8+ Given I visit the "seldon user" page
9+ Then I should see "Bitcoin address"
10+ When I fill "Bitcoin address" with: "1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2"
11+ And I click "Update user info"
12+ Then I should see "Your information saved!"
13+
14+ @vcr-ignore-params
15+ Scenario : Users should not be able to set invalid P2PKH address
16+ Given I visit the "seldon user" page
17+ Then I should see "Bitcoin address"
18+ When I fill "Bitcoin address" with: "1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVA"
19+ And I click "Update user info"
20+ Then I should not see "Your information saved!"
21+ And I should see "Bitcoin address is invalid"
22+
23+ @vcr-ignore-params
24+ Scenario : Users should be able to set P2SH address
25+ Given I visit the "seldon user" page
26+ Then I should see "Bitcoin address"
27+ When I fill "Bitcoin address" with: "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy"
28+ And I click "Update user info"
29+ Then I should see "Your information saved!"
30+
31+ @vcr-ignore-params
32+ Scenario : Users should not be able to set invalid P2SH address
33+ Given I visit the "seldon user" page
34+ Then I should see "Bitcoin address"
35+ When I fill "Bitcoin address" with: "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLA"
36+ And I click "Update user info"
37+ Then I should not see "Your information saved!"
38+ And I should see "Bitcoin address is invalid"
39+
40+ @vcr-ignore-params
41+ Scenario : Users should not be able to set testnet address
42+ Given I visit the "seldon user" page
43+ Then I should see "Bitcoin address"
44+ When I fill "Bitcoin address" with: "mtXWDB6k5yC5v7TcwKZHB89SUp85yCKshy"
45+ And I click "Update user info"
46+ Then I should not see "Your information saved!"
47+ And I should see "Bitcoin address is invalid"
48+
49+ @vcr-ignore-params
50+ Scenario : Users should be able to set Bech32 P2WPKH address
51+ Given I visit the "seldon user" page
52+ Then I should see "Bitcoin address"
53+ When I fill "Bitcoin address" with: "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4"
54+ And I click "Update user info"
55+ Then I should see "Your information saved!"
56+
57+ @vcr-ignore-params
58+ Scenario : Users should be able to set Bech32 P2WSH address
59+ Given I visit the "seldon user" page
60+ Then I should see "Bitcoin address"
61+ When I fill "Bitcoin address" with: "bc1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3qccfmv3"
62+ And I click "Update user info"
63+ Then I should see "Your information saved!"
64+
65+ @vcr-ignore-params
66+ Scenario : Users should not be able to set testnet Bech32 address
67+ Given I visit the "seldon user" page
68+ Then I should see "Bitcoin address"
69+ When I fill "Bitcoin address" with: "tb1qw508d6qejxtdg4y5r3zarvary0c5xw7kxpjzsx"
70+ And I click "Update user info"
71+ Then I should not see "Your information saved!"
72+ And I should see "Bitcoin address is invalid"
0 commit comments