menu-traversals #108
@ -138,13 +138,13 @@ func TestAccountRegistrationInvalidPin(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestSendWithInvalidRecipient(t *testing.T) {
|
func TestSendWithInvalidInputs(t *testing.T) {
|
||||||
en, fn := enginetest.TestEngine("session1234112")
|
en, fn := enginetest.TestEngine("session1234112")
|
||||||
defer fn()
|
defer fn()
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
sessions := testData
|
sessions := testData
|
||||||
for _, session := range sessions {
|
for _, session := range sessions {
|
||||||
groups := driver.FilterGroupsByName(session.Groups, "send_with_invalid_recipient")
|
groups := driver.FilterGroupsByName(session.Groups, "send_with_invalid_inputs")
|
||||||
for _, group := range groups {
|
for _, group := range groups {
|
||||||
for _, step := range group.Steps {
|
for _, step := range group.Steps {
|
||||||
cont, err := en.Exec(ctx, []byte(step.Input))
|
cont, err := en.Exec(ctx, []byte(step.Input))
|
||||||
|
@ -97,7 +97,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "send_with_invalid_recipient",
|
"name": "send_with_invalid_inputs",
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"input": "",
|
"input": "",
|
||||||
@ -119,10 +119,26 @@
|
|||||||
"input": "065656",
|
"input": "065656",
|
||||||
"expectedContent": "Maximum amount: 0.003 CELO\nEnter amount:\n0:Back"
|
"expectedContent": "Maximum amount: 0.003 CELO\nEnter amount:\n0:Back"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"input": "0.1",
|
||||||
|
"expectedContent": "Amount 0.1 is invalid, please try again:\n1:retry\n9:Quit"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": "1",
|
||||||
|
"expectedContent": "Maximum amount: 0.003 CELO\nEnter amount:\n0:Back"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"input": "0.001",
|
"input": "0.001",
|
||||||
"expectedContent": "065656 will receive 0.001 from 0xd6CF3C87b0D4aD5978448bBbD6Db9EC6D74D624b\nPlease enter your PIN to confirm:\n0:Back\n9:Quit"
|
"expectedContent": "065656 will receive 0.001 from 0xd6CF3C87b0D4aD5978448bBbD6Db9EC6D74D624b\nPlease enter your PIN to confirm:\n0:Back\n9:Quit"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"input": "1222",
|
||||||
|
"expectedContent": "Incorrect pin\n1:retry\n9:Quit"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": "1",
|
||||||
|
"expectedContent": "065656 will receive 0.001 from 0xd6CF3C87b0D4aD5978448bBbD6Db9EC6D74D624b\nPlease enter your PIN to confirm:\n0:Back\n9:Quit"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"input": "1234",
|
"input": "1234",
|
||||||
"expectedContent": "Your request has been sent. 065656 will receive 0.001 from 0xd6CF3C87b0D4aD5978448bBbD6Db9EC6D74D624b."
|
"expectedContent": "Your request has been sent. 065656 will receive 0.001 from 0xd6CF3C87b0D4aD5978448bBbD6Db9EC6D74D624b."
|
||||||
|
Loading…
Reference in New Issue
Block a user