-
Notifications
You must be signed in to change notification settings - Fork 5
/
apply-inputs.feature
179 lines (136 loc) · 8.63 KB
/
apply-inputs.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
@smoke
@regression
Feature: As a user, I would like to apply an input on a current contract
As a user I would like to apply an input on a current contract
So that I can proceed through the contract
Scenario Outline: Creating a deposit with a wallet
Given I configure my <wallet_name> wallet
And I am on the "home" page
Then I should see a "heading" with "Choose a wallet" text
When I authorize my <wallet_name> wallet
Then I should see a "button" with "Create a contract" text
When I click the "button" with "Create a contract" text
And I generate the contract "SimpleDeposit" and write it to "/tmp/deposit.json"
And I enter the contents of "/tmp/deposit.json" into the "contract-input" field
When I click the "button" with "Submit contract" text And sign the transaction with <wallet_name> wallet
Then I should see the first "button" showing "Syncing" text
And I should see the first "button" showing "Advance" text
And I should see "Successfully created and submitted the contract. Contract transaction awaits to be included in the blockchain." text
When I click the first "button" with "Advance" text
Then I should see a "button" with "Make deposit" text
When I click the "checkbox" with "Deposit 0.000001 ₳" text
And I click the "button" with "Make deposit" text And sign the transaction with <wallet_name> wallet
And I should see "Successfully applied the inputs. Input application transaction awaits to be included in the blockchain." text
Examples:
| wallet_name |
| lace |
| nami |
Scenario Outline: Creating a choice with a wallet
Given I configure my <wallet_name> wallet
And I am on the "home" page
Then I should see a "heading" with "Choose a wallet" text
When I authorize my <wallet_name> wallet
Then I should see a "button" with "Create a contract" text
When I click the "button" with "Create a contract" text
And I generate the contract "SimpleChoice" and write it to "/tmp/choice.json"
And I enter the contents of "/tmp/choice.json" into the "contract-input" field
When I click the "button" with "Submit contract" text And sign the transaction with <wallet_name> wallet
Then I should see the first "button" showing "Syncing" text
And I should see the first "button" showing "Advance" text
And I should see "Successfully created and submitted the contract. Contract transaction awaits to be included in the blockchain." text
When I click the first "button" with "Advance" text
Then I should see a "button" with "Advance contract" text
When I fill in the "choice-input" input with "1"
When I click the "button" with "Advance contract" text And sign the transaction with <wallet_name> wallet
Then I should see the first "button" showing "Syncing" text
And I should see the first "button" showing "Advance" text
And I should see "Successfully applied the inputs. Input application transaction awaits to be included in the blockchain." text
Examples:
| wallet_name |
| lace |
| nami |
Scenario Outline: Creating a timed-out contract with a <wallet_name> wallet
Given I configure my <wallet_name> wallet
Given I am on the "home" page
Then I should see a "heading" with "Choose a wallet" text
When I authorize my <wallet_name> wallet
Then I should see a "button" with "Create a contract" text
When I click the "button" with "Create a contract" text
And I generate the contract "TimedOutSimpleChoice" and write it to "/tmp/timed-out-choice.json"
And I enter the contents of "/tmp/timed-out-choice.json" into the "contract-input" field
When I click the "button" with "Submit contract" text And sign the transaction with <wallet_name> wallet
Then I should see the first "button" showing "Syncing" text
And I should see the first "button" showing "Advance" text
And I should see "Successfully created and submitted the contract. Contract transaction awaits to be included in the blockchain." text
When I click the first "button" with "Advance" text
Then I should see a "button" with "Advance contract" text
When I click the "button" with "Advance contract" text And sign the transaction with <wallet_name> wallet
Then I should see the first "button" showing "Syncing" text
And I should see the first "button" showing "Advance" text
And I should see "Successfully applied the inputs. Input application transaction awaits to be included in the blockchain." text
Examples:
| wallet_name |
| lace |
| nami |
Scenario Outline: Creating a notify contract with a <wallet_name> wallet
Given I configure my <wallet_name> wallet
Given I am on the "home" page
Then I should see a "heading" with "Choose a wallet" text
When I authorize my <wallet_name> wallet
Then I should see a "button" with "Create a contract" text
When I click the "button" with "Create a contract" text
And I generate the contract "SimpleNotify" and write it to "/tmp/notify.json"
And I enter the contents of "/tmp/notify.json" into the "contract-input" field
When I click the "button" with "Submit contract" text And sign the transaction with <wallet_name> wallet
Then I should see the first "button" showing "Syncing" text
And I should see the first "button" showing "Advance" text
And I should see "Successfully created and submitted the contract. Contract transaction awaits to be included in the blockchain." text
When I click the first "button" with "Advance" text
Then I should see a "button" with "Advance contract" text
When I click the "button" with "Advance contract" text And sign the transaction with <wallet_name> wallet
Then I should see the first "button" showing "Syncing" text
And I should see the first "button" showing "Advance" text
And I should see "Successfully applied the inputs. Input application transaction awaits to be included in the blockchain." text
Examples:
| wallet_name |
| lace |
| nami |
@dev
Scenario: Creating an escrow contract with two separate wallets
Given I configure my lace wallet
Given I configure my nami wallet
Given I am on the "home" page
Then I should see a "heading" with "Choose a wallet" text
When I authorize my lace wallet
Given I am on the "home" page
When I authorize my nami wallet
Then I should see a "button" with "Create a contract" text
When I click the "button" with "Create a contract" text
And I generate the contract "Escrow" and write it to "/tmp/escrow.json"
And I enter the contents of "/tmp/escrow.json" into the "contract-input" field
When I click the "button" with "Submit contract" text And sign the transaction with nami wallet
Then I should see the first "button" showing "Syncing" text
And I should see the first "button" showing "Advance" text
And I should see "Successfully created and submitted the contract. Contract transaction awaits to be included in the blockchain." text
When I click the first "button" with "Advance" text
Then I should see a "button" with "Make deposit" text
When I click the "checkbox" with "Deposit 10 ₳" text
And I click the "button" with "Make deposit" text And sign the transaction with nami wallet
Then I should see the first "button" showing "Syncing" text
And I should see the first "button" showing "Advance" text
And I should see "Successfully applied the inputs. Input application transaction awaits to be included in the blockchain." text
When I click the first "button" with "Advance" text
Then I should see a "button" with "Advance contract" text
When I select "Report problem" from the "form-select" dropdown
And I fill in the "choice-input" input with "1"
And I click the "button" with "Advance contract" text And sign the transaction with nami wallet
Then I should see the first "button" showing "Syncing" text
Given I am on the "home" page
When I authorize my lace wallet
And I should see the first "button" showing "Advance" text
When I click the first "button" with "Advance" text
Then I should see a "button" with "Advance contract" text
When I select "Confirm problem" from the "form-select" dropdown
And I fill in the "choice-input" input with "1"
And I click the "button" with "Advance contract" text And sign the transaction with lace wallet
And I pause the page