From d94758c32c2157bd03293da423eb23f3e1ac7703 Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Thu, 3 Oct 2024 11:44:34 +0300 Subject: [PATCH] moved the test to test_engine folder --- test_data.json | 598 ------------------ .../menu_traversal_test.go | 16 - test_engine/test_data.json | 575 +++++++++++++++++ 3 files changed, 575 insertions(+), 614 deletions(-) delete mode 100644 test_data.json rename menu_traversal_test.go => test_engine/menu_traversal_test.go (99%) create mode 100644 test_engine/test_data.json diff --git a/test_data.json b/test_data.json deleted file mode 100644 index 5967788..0000000 --- a/test_data.json +++ /dev/null @@ -1,598 +0,0 @@ -[ - { - "name": "session one", - "groups": [ - { - "name": "account_creation_successful", - "steps": [ - { - "input": "", - "expectedContent": "Welcome to Sarafu Network\nPlease select a language\n0:english\n1:kiswahili" - }, - { - "input": "0", - "expectedContent": "Do you agree to terms and conditions?\n0:yes\n1:no" - }, - { - "input": "0", - "expectedContent": "Please enter a new four number PIN for your account:\n0:Exit" - }, - { - "input": "1234", - "expectedContent": "Enter your four number PIN again:" - }, - { - "input": "1111", - "expectedContent": "The PIN is not a match. Try again\n1:retry\n9:Quit" - }, - { - "input": "1", - "expectedContent": "Enter your four number PIN again:" - }, - { - "input": "1234", - "expectedContent": "Your account is being created...Thank you for using Sarafu. Goodbye!" - } - ] - }, - { - "name": "account_creation_reject_terms", - "steps": [ - { - "input": "", - "expectedContent": "Welcome to Sarafu Network\nPlease select a language\n0:english\n1:kiswahili" - }, - { - "input": "0", - "expectedContent": "Do you agree to terms and conditions?\n0:yes\n1:no" - }, - { - "input": "1", - "expectedContent": "Thank you for using Sarafu. Goodbye!" - } - ] - }, - { - "name": "send_with_invalid_inputs", - "steps": [ - { - "input": "", - "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" - }, - { - "input": "1", - "expectedContent": "Enter recipient's phone number:\n0:Back" - }, - { - "input": "000", - "expectedContent": "000 is not registered or invalid, please try again:\n1:retry\n9:Quit" - }, - { - "input": "1", - "expectedContent": "Enter recipient's phone number:\n0:Back" - }, - { - "input": "065656", - "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", - "expectedContent": "065656 will receive 0.001 from {public_key}\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 {public_key}\nPlease enter your PIN to confirm:\n0:Back\n9:Quit" - }, - { - "input": "1234", - "expectedContent": "Your request has been sent. 065656 will receive 0.001 from {public_key}." - } - ] - }, - { - "name": "main_menu_help", - "steps": [ - { - "input": "", - "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" - }, - { - "input": "4", - "expectedContent": "For more help,please call: 0757628885" - } - ] - }, - { - "name": "main_menu_quit", - "steps": [ - { - "input": "", - "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" - }, - { - "input": "9", - "expectedContent": "Thank you for using Sarafu. Goodbye!" - } - ] - }, - { - "name": "my_account_change_pin", - "steps": [ - { - "input": "", - "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" - }, - { - "input": "3", - "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" - }, - { - "input": "5", - "expectedContent": "PIN Management\n1:Change PIN\n2:Reset other's PIN\n3:Guard my PIN\n0:Back" - }, - { - "input": "1", - "expectedContent": "Enter your old PIN\n0:Back" - }, - { - "input": "1234", - "expectedContent": "Enter a new four number PIN:\n0:Back" - }, - { - "input": "1234", - "expectedContent": "Confirm your new PIN:\n0:Back" - }, - { - "input": "1234", - "expectedContent": "Your PIN change request has been successful\n0:Back\n9:Quit" - }, - { - "input": "9", - "expectedContent": "Thank you for using Sarafu. Goodbye!" - } - ] - }, - { - "name": "menu_my_account_language_change", - "steps": [ - { - "input":"", - "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" - - }, - { - "input": "3", - "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" - }, - { - "input": "2", - "expectedContent": "Please enter your PIN:" - }, - { - "input": "1234", - "expectedContent": "Select language:\n0:english\n1:kiswahili" - }, - { - "input": "1", - "expectedContent": "Ombi lako la kubadilisha lugha limefanikiwa.\n0:Rudi\n9:Ondoka" - }, - { - "input": "9", - "expectedContent": "Asante kwa kutumia huduma ya Sarafu. Kwaheri!" - } - - ] - }, - { - "name": "menu_my_account_language_change_incorectpin", - "steps": [ - { - "input":"", - "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" - - }, - { - "input": "3", - "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" - }, - { - "input": "2", - "expectedContent": "Please enter your PIN:" - }, - { - "input": "1235", - "expectedContent": "Incorrect pin\n1:retry\n9:Quit" - } - - ] - }, - { - "name": "menu_my_account_edit_firstname", - "steps": [ - { - - "input": "", - "expectedContent":"Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" - }, - { - "input": "3", - "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" - }, - { - "input": "1", - "expectedContent": "My profile\n1:Edit name\n2:Edit family name\n3:Edit gender\n4:Edit year of birth\n5:Edit location\n6:Edit offerings\n7:View profile\n0:Back" - }, - { - "input": "1", - "expectedContent": "Enter your first names:\n0:Back" - }, - { - "input": "foo", - "expectedContent": "Please enter your PIN:" - }, - { - "input": "1234", - "expectedContent": "Profile updated successfully\n0:Back\n9:Quit" - }, - { - "input": "9", - "expectedContent": "Thank you for using Sarafu. Goodbye!" - } - ] - }, - { - "name": "menu_my_account_edit_familyname", - "steps": [ - { - - "input": "", - "expectedContent":"Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" - }, - { - "input": "3", - "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" - }, - { - "input": "1", - "expectedContent": "My profile\n1:Edit name\n2:Edit family name\n3:Edit gender\n4:Edit year of birth\n5:Edit location\n6:Edit offerings\n7:View profile\n0:Back" - }, - { - "input": "2", - "expectedContent": "Enter family name:\n0:Back" - }, - { - "input": "bar", - "expectedContent": "Please enter your PIN:" - }, - { - "input": "1234", - "expectedContent": "Profile updated successfully\n0:Back\n9:Quit" - }, - { - "input": "9", - "expectedContent": "Thank you for using Sarafu. Goodbye!" - } - ] - }, - { - "name": "menu_my_account_edit_gender", - "steps": [ - { - - "input": "", - "expectedContent":"Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" - }, - { - "input": "3", - "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" - }, - { - "input": "1", - "expectedContent": "My profile\n1:Edit name\n2:Edit family name\n3:Edit gender\n4:Edit year of birth\n5:Edit location\n6:Edit offerings\n7:View profile\n0:Back" - }, - { - "input": "3", - "expectedContent": "Select gender: \n1:Male\n2:Female\n3:Unspecified\n0:Back" - }, - { - "input": "Female", - "expectedContent": "Please enter your PIN:" - }, - { - "input": "1234", - "expectedContent": "Profile updated successfully\n0:Back\n9:Quit" - }, - { - "input": "9", - "expectedContent": "Thank you for using Sarafu. Goodbye!" - } - ] - }, - { - "name": "menu_my_account_edit_yob", - "steps": [ - { - - "input": "", - "expectedContent":"Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" - }, - { - "input": "3", - "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" - }, - { - "input": "1", - "expectedContent": "My profile\n1:Edit name\n2:Edit family name\n3:Edit gender\n4:Edit year of birth\n5:Edit location\n6:Edit offerings\n7:View profile\n0:Back" - }, - { - "input": "4", - "expectedContent": "Enter your year of birth\n0:Back" - }, - { - "input": "1945", - "expectedContent": "Please enter your PIN:" - }, - { - "input": "1234", - "expectedContent": "Profile updated successfully\n0:Back\n9:Quit" - }, - { - "input": "9", - "expectedContent": "Thank you for using Sarafu. Goodbye!" - } - ] - }, - { - "name": "menu_my_account_edit_location", - "steps": [ - { - - "input": "", - "expectedContent":"Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" - }, - { - "input": "3", - "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" - }, - { - "input": "1", - "expectedContent": "My profile\n1:Edit name\n2:Edit family name\n3:Edit gender\n4:Edit year of birth\n5:Edit location\n6:Edit offerings\n7:View profile\n0:Back" - }, - { - "input": "5", - "expectedContent": "Enter your location:\n0:Back" - }, - { - "input": "Kilifi", - "expectedContent": "Please enter your PIN:" - }, - { - "input": "1234", - "expectedContent": "Profile updated successfully\n0:Back\n9:Quit" - }, - { - "input": "9", - "expectedContent": "Thank you for using Sarafu. Goodbye!" - } - ] - }, - { - "name": "menu_my_account_edit_offerings", - "steps": [ - { - - "input": "", - "expectedContent":"Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" - }, - { - "input": "3", - "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" - }, - { - "input": "1", - "expectedContent": "My profile\n1:Edit name\n2:Edit family name\n3:Edit gender\n4:Edit year of birth\n5:Edit location\n6:Edit offerings\n7:View profile\n0:Back" - }, - { - "input": "6", - "expectedContent": "Enter the services or goods you offer: \n0:Back" - }, - { - "input": "Bananas", - "expectedContent": "Please enter your PIN:" - }, - { - "input": "1234", - "expectedContent": "Profile updated successfully\n0:Back\n9:Quit" - }, - { - "input": "9", - "expectedContent": "Thank you for using Sarafu. Goodbye!" - } - ] - }, - { - "name": "menu_my_account_view_profile", - "steps": [ - { - - "input": "", - "expectedContent":"Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" - }, - { - "input": "3", - "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" - }, - { - "input": "1", - "expectedContent": "My profile\n1:Edit name\n2:Edit family name\n3:Edit gender\n4:Edit year of birth\n5:Edit location\n6:Edit offerings\n7:View profile\n0:Back" - }, - { - "input": "7", - "expectedContent": "Please enter your PIN:" - }, - { - "input": "1234", - "expectedContent": "My profile:\nName: foo bar\nGender: Female\nAge: 79\nLocation: Kilifi\nYou provide: Bananas\n\n0:Back" - }, - { - "input": "0", - "expectedContent": "My profile\n1:Edit name\n2:Edit family name\n3:Edit gender\n4:Edit year of birth\n5:Edit location\n6:Edit offerings\n7:View profile\n0:Back" - }, - { - "input": "0", - "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" - }, - { - - "input": "9", - "expectedContent":"" - } - ] - }, - { - "name": "menu_my_account_check_my_balance", - "steps": [ - { - "input":"", - "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" - - }, - { - "input": "3", - "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" - }, - { - "input": "3", - "expectedContent": "Balances:\n1:My balance\n2:Community balance\n0:Back" - }, - { - "input": "1", - "expectedContent": "Please enter your PIN:" - }, - { - "input": "1234", - "expectedContent": "Your balance is: 0.00 SRFYour account balance is 0.003 CELO" - } - - ] - }, - { - "name": "menu_my_account_check_community_balance", - "steps": [ - { - "input":"", - "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" - - }, - { - "input": "3", - "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" - }, - { - "input": "3", - "expectedContent": "Balances:\n1:My balance\n2:Community balance\n0:Back" - }, - { - "input": "2", - "expectedContent": "Please enter your PIN:" - }, - { - "input": "1234", - "expectedContent": "Your balance is: 0.00 SRFYour account balance is 0.003 CELO" - } - - ] - }, - { - "name": "menu_my_account_check_my_balance_incorrect_pin", - "steps": [ - { - "input":"", - "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" - - }, - { - "input": "3", - "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" - }, - { - "input": "3", - "expectedContent": "Balances:\n1:My balance\n2:Community balance\n0:Back" - }, - { - "input": "1", - "expectedContent": "Please enter your PIN:" - }, - { - "input": "1235", - "expectedContent": "Incorrect pin\n1:retry\n9:Quit" - } - - ] - }, - { - "name": "menu_my_account_check_community_balance_incorrect_pin", - "steps": [ - { - "input":"", - "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" - - }, - { - "input": "3", - "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" - }, - { - "input": "3", - "expectedContent": "Balances:\n1:My balance\n2:Community balance\n0:Back" - }, - { - "input": "2", - "expectedContent": "Please enter your PIN:" - }, - { - "input": "1235", - "expectedContent": "Incorrect pin\n1:retry\n9:Quit" - } - - ] - }, - { - "name": "menu_my_account_my_address", - "steps": [ - { - "input":"", - "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" - - }, - { - "input": "3", - "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" - }, - { - "input": "6", - "expectedContent": "Address: {public_key}\n9:Quit" - }, - { - "input": "9", - "expectedContent": "Thank you for using Sarafu. Goodbye!" - } - - ] - } - - ] - } -] diff --git a/menu_traversal_test.go b/test_engine/menu_traversal_test.go similarity index 99% rename from menu_traversal_test.go rename to test_engine/menu_traversal_test.go index 77ff5de..15c3e20 100644 --- a/menu_traversal_test.go +++ b/test_engine/menu_traversal_test.go @@ -34,9 +34,7 @@ func TestAccountCreationSuccessful(t *testing.T) { groups := driver.FilterGroupsByName(session.Groups, "account_creation_successful") for _, group := range groups { for _, step := range group.Steps { - cont, err := en.Exec(ctx, []byte(step.Input)) - if err != nil { t.Fatalf("Test case '%s' failed at input '%s': %v", group.Name, step.Input, err) } @@ -52,7 +50,6 @@ func TestAccountCreationSuccessful(t *testing.T) { if !bytes.Equal(b, []byte(step.ExpectedContent)) { t.Fatalf("expected:\n\t%s\ngot:\n\t%s\n", step.ExpectedContent, b) } - } } } @@ -246,7 +243,6 @@ func TestMyAccount_Change_Language(t *testing.T) { if !bytes.Equal(b, []byte(step.ExpectedContent)) { t.Fatalf("expected:\n\t%s\ngot:\n\t%s\n", step.ExpectedContent, b) } - } } } @@ -278,7 +274,6 @@ func TestMyAccount_Change_Language_Incorrect_Pin(t *testing.T) { if !bytes.Equal(b, []byte(step.ExpectedContent)) { t.Fatalf("expected:\n\t%s\ngot:\n\t%s\n", step.ExpectedContent, b) } - } } } @@ -310,7 +305,6 @@ func TestMyAccount_Edit_firstname(t *testing.T) { if !bytes.Equal(b, []byte(step.ExpectedContent)) { t.Fatalf("expected:\n\t%s\ngot:\n\t%s\n", step.ExpectedContent, b) } - } } } @@ -342,7 +336,6 @@ func TestMyAccount_Edit_familyname(t *testing.T) { if !bytes.Equal(b, []byte(step.ExpectedContent)) { t.Fatalf("expected:\n\t%s\ngot:\n\t%s\n", step.ExpectedContent, b) } - } } } @@ -374,7 +367,6 @@ func TestMyAccount_Edit_gender(t *testing.T) { if !bytes.Equal(b, []byte(step.ExpectedContent)) { t.Fatalf("expected:\n\t%s\ngot:\n\t%s\n", step.ExpectedContent, b) } - } } } @@ -406,7 +398,6 @@ func TestMyAccount_Edit_yob(t *testing.T) { if !bytes.Equal(b, []byte(step.ExpectedContent)) { t.Fatalf("expected:\n\t%s\ngot:\n\t%s\n", step.ExpectedContent, b) } - } } } @@ -438,7 +429,6 @@ func TestMyAccount_Edit_location(t *testing.T) { if !bytes.Equal(b, []byte(step.ExpectedContent)) { t.Fatalf("expected:\n\t%s\ngot:\n\t%s\n", step.ExpectedContent, b) } - } } } @@ -470,7 +460,6 @@ func TestMyAccount_Edit_offerings(t *testing.T) { if !bytes.Equal(b, []byte(step.ExpectedContent)) { t.Fatalf("expected:\n\t%s\ngot:\n\t%s\n", step.ExpectedContent, b) } - } } } @@ -502,7 +491,6 @@ func TestMyAccount_View_Profile(t *testing.T) { if !bytes.Equal(b, []byte(step.ExpectedContent)) { t.Fatalf("expected:\n\t%s\ngot:\n\t%s\n", step.ExpectedContent, b) } - } } } @@ -534,7 +522,6 @@ func TestMyAccount_Check_My_Balance(t *testing.T) { if !bytes.Equal(b, []byte(step.ExpectedContent)) { t.Fatalf("expected:\n\t%s\ngot:\n\t%s\n", step.ExpectedContent, b) } - } } } @@ -566,7 +553,6 @@ func TestMyAccount_Check_My_Balance_IncorrectPin(t *testing.T) { if !bytes.Equal(b, []byte(step.ExpectedContent)) { t.Fatalf("expected:\n\t%s\ngot:\n\t%s\n", step.ExpectedContent, b) } - } } } @@ -598,7 +584,6 @@ func TestMyAccount_Check_Community_Balance(t *testing.T) { if !bytes.Equal(b, []byte(step.ExpectedContent)) { t.Fatalf("expected:\n\t%s\ngot:\n\t%s\n", step.ExpectedContent, b) } - } } } @@ -630,7 +615,6 @@ func TestMyAccount_Check_Community_Balance_IncorrectPin(t *testing.T) { if !bytes.Equal(b, []byte(step.ExpectedContent)) { t.Fatalf("expected:\n\t%s\ngot:\n\t%s\n", step.ExpectedContent, b) } - } } } diff --git a/test_engine/test_data.json b/test_engine/test_data.json new file mode 100644 index 0000000..7e81354 --- /dev/null +++ b/test_engine/test_data.json @@ -0,0 +1,575 @@ +[ + { + "name": "session one", + "groups": [ + { + "name": "account_creation_successful", + "steps": [ + { + "input": "", + "expectedContent": "Welcome to Sarafu Network\nPlease select a language\n0:english\n1:kiswahili" + }, + { + "input": "0", + "expectedContent": "Do you agree to terms and conditions?\n0:yes\n1:no" + }, + { + "input": "0", + "expectedContent": "Please enter a new four number PIN for your account:\n0:Exit" + }, + { + "input": "1234", + "expectedContent": "Enter your four number PIN again:" + }, + { + "input": "1111", + "expectedContent": "The PIN is not a match. Try again\n1:retry\n9:Quit" + }, + { + "input": "1", + "expectedContent": "Enter your four number PIN again:" + }, + { + "input": "1234", + "expectedContent": "Your account is being created...Thank you for using Sarafu. Goodbye!" + } + ] + }, + { + "name": "account_creation_reject_terms", + "steps": [ + { + "input": "", + "expectedContent": "Welcome to Sarafu Network\nPlease select a language\n0:english\n1:kiswahili" + }, + { + "input": "0", + "expectedContent": "Do you agree to terms and conditions?\n0:yes\n1:no" + }, + { + "input": "1", + "expectedContent": "Thank you for using Sarafu. Goodbye!" + } + ] + }, + { + "name": "send_with_invalid_inputs", + "steps": [ + { + "input": "", + "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" + }, + { + "input": "1", + "expectedContent": "Enter recipient's phone number:\n0:Back" + }, + { + "input": "000", + "expectedContent": "000 is not registered or invalid, please try again:\n1:retry\n9:Quit" + }, + { + "input": "1", + "expectedContent": "Enter recipient's phone number:\n0:Back" + }, + { + "input": "065656", + "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", + "expectedContent": "065656 will receive 0.001 from {public_key}\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 {public_key}\nPlease enter your PIN to confirm:\n0:Back\n9:Quit" + }, + { + "input": "1234", + "expectedContent": "Your request has been sent. 065656 will receive 0.001 from {public_key}." + } + ] + }, + { + "name": "main_menu_help", + "steps": [ + { + "input": "", + "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" + }, + { + "input": "4", + "expectedContent": "For more help,please call: 0757628885" + } + ] + }, + { + "name": "main_menu_quit", + "steps": [ + { + "input": "", + "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" + }, + { + "input": "9", + "expectedContent": "Thank you for using Sarafu. Goodbye!" + } + ] + }, + { + "name": "my_account_change_pin", + "steps": [ + { + "input": "", + "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" + }, + { + "input": "3", + "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" + }, + { + "input": "5", + "expectedContent": "PIN Management\n1:Change PIN\n2:Reset other's PIN\n3:Guard my PIN\n0:Back" + }, + { + "input": "1", + "expectedContent": "Enter your old PIN\n0:Back" + }, + { + "input": "1234", + "expectedContent": "Enter a new four number PIN:\n0:Back" + }, + { + "input": "1234", + "expectedContent": "Confirm your new PIN:\n0:Back" + }, + { + "input": "1234", + "expectedContent": "Your PIN change request has been successful\n0:Back\n9:Quit" + }, + { + "input": "9", + "expectedContent": "Thank you for using Sarafu. Goodbye!" + } + ] + }, + { + "name": "menu_my_account_language_change", + "steps": [ + { + "input": "", + "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" + }, + { + "input": "3", + "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" + }, + { + "input": "2", + "expectedContent": "Please enter your PIN:" + }, + { + "input": "1234", + "expectedContent": "Select language:\n0:english\n1:kiswahili" + }, + { + "input": "1", + "expectedContent": "Ombi lako la kubadilisha lugha limefanikiwa.\n0:Rudi\n9:Ondoka" + }, + { + "input": "9", + "expectedContent": "Asante kwa kutumia huduma ya Sarafu. Kwaheri!" + } + ] + }, + { + "name": "menu_my_account_language_change_incorectpin", + "steps": [ + { + "input": "", + "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" + }, + { + "input": "3", + "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" + }, + { + "input": "2", + "expectedContent": "Please enter your PIN:" + }, + { + "input": "1235", + "expectedContent": "Incorrect pin\n1:retry\n9:Quit" + } + ] + }, + { + "name": "menu_my_account_edit_firstname", + "steps": [ + { + "input": "", + "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" + }, + { + "input": "3", + "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" + }, + { + "input": "1", + "expectedContent": "My profile\n1:Edit name\n2:Edit family name\n3:Edit gender\n4:Edit year of birth\n5:Edit location\n6:Edit offerings\n7:View profile\n0:Back" + }, + { + "input": "1", + "expectedContent": "Enter your first names:\n0:Back" + }, + { + "input": "foo", + "expectedContent": "Please enter your PIN:" + }, + { + "input": "1234", + "expectedContent": "Profile updated successfully\n0:Back\n9:Quit" + }, + { + "input": "9", + "expectedContent": "Thank you for using Sarafu. Goodbye!" + } + ] + }, + { + "name": "menu_my_account_edit_familyname", + "steps": [ + { + "input": "", + "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" + }, + { + "input": "3", + "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" + }, + { + "input": "1", + "expectedContent": "My profile\n1:Edit name\n2:Edit family name\n3:Edit gender\n4:Edit year of birth\n5:Edit location\n6:Edit offerings\n7:View profile\n0:Back" + }, + { + "input": "2", + "expectedContent": "Enter family name:\n0:Back" + }, + { + "input": "bar", + "expectedContent": "Please enter your PIN:" + }, + { + "input": "1234", + "expectedContent": "Profile updated successfully\n0:Back\n9:Quit" + }, + { + "input": "9", + "expectedContent": "Thank you for using Sarafu. Goodbye!" + } + ] + }, + { + "name": "menu_my_account_edit_gender", + "steps": [ + { + "input": "", + "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" + }, + { + "input": "3", + "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" + }, + { + "input": "1", + "expectedContent": "My profile\n1:Edit name\n2:Edit family name\n3:Edit gender\n4:Edit year of birth\n5:Edit location\n6:Edit offerings\n7:View profile\n0:Back" + }, + { + "input": "3", + "expectedContent": "Select gender: \n1:Male\n2:Female\n3:Unspecified\n0:Back" + }, + { + "input": "Female", + "expectedContent": "Please enter your PIN:" + }, + { + "input": "1234", + "expectedContent": "Profile updated successfully\n0:Back\n9:Quit" + }, + { + "input": "9", + "expectedContent": "Thank you for using Sarafu. Goodbye!" + } + ] + }, + { + "name": "menu_my_account_edit_yob", + "steps": [ + { + "input": "", + "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" + }, + { + "input": "3", + "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" + }, + { + "input": "1", + "expectedContent": "My profile\n1:Edit name\n2:Edit family name\n3:Edit gender\n4:Edit year of birth\n5:Edit location\n6:Edit offerings\n7:View profile\n0:Back" + }, + { + "input": "4", + "expectedContent": "Enter your year of birth\n0:Back" + }, + { + "input": "1945", + "expectedContent": "Please enter your PIN:" + }, + { + "input": "1234", + "expectedContent": "Profile updated successfully\n0:Back\n9:Quit" + }, + { + "input": "9", + "expectedContent": "Thank you for using Sarafu. Goodbye!" + } + ] + }, + { + "name": "menu_my_account_edit_location", + "steps": [ + { + "input": "", + "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" + }, + { + "input": "3", + "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" + }, + { + "input": "1", + "expectedContent": "My profile\n1:Edit name\n2:Edit family name\n3:Edit gender\n4:Edit year of birth\n5:Edit location\n6:Edit offerings\n7:View profile\n0:Back" + }, + { + "input": "5", + "expectedContent": "Enter your location:\n0:Back" + }, + { + "input": "Kilifi", + "expectedContent": "Please enter your PIN:" + }, + { + "input": "1234", + "expectedContent": "Profile updated successfully\n0:Back\n9:Quit" + }, + { + "input": "9", + "expectedContent": "Thank you for using Sarafu. Goodbye!" + } + ] + }, + { + "name": "menu_my_account_edit_offerings", + "steps": [ + { + "input": "", + "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" + }, + { + "input": "3", + "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" + }, + { + "input": "1", + "expectedContent": "My profile\n1:Edit name\n2:Edit family name\n3:Edit gender\n4:Edit year of birth\n5:Edit location\n6:Edit offerings\n7:View profile\n0:Back" + }, + { + "input": "6", + "expectedContent": "Enter the services or goods you offer: \n0:Back" + }, + { + "input": "Bananas", + "expectedContent": "Please enter your PIN:" + }, + { + "input": "1234", + "expectedContent": "Profile updated successfully\n0:Back\n9:Quit" + }, + { + "input": "9", + "expectedContent": "Thank you for using Sarafu. Goodbye!" + } + ] + }, + { + "name": "menu_my_account_view_profile", + "steps": [ + { + "input": "", + "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" + }, + { + "input": "3", + "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" + }, + { + "input": "1", + "expectedContent": "My profile\n1:Edit name\n2:Edit family name\n3:Edit gender\n4:Edit year of birth\n5:Edit location\n6:Edit offerings\n7:View profile\n0:Back" + }, + { + "input": "7", + "expectedContent": "Please enter your PIN:" + }, + { + "input": "1234", + "expectedContent": "My profile:\nName: foo bar\nGender: Female\nAge: 79\nLocation: Kilifi\nYou provide: Bananas\n\n0:Back" + }, + { + "input": "0", + "expectedContent": "My profile\n1:Edit name\n2:Edit family name\n3:Edit gender\n4:Edit year of birth\n5:Edit location\n6:Edit offerings\n7:View profile\n0:Back" + }, + { + "input": "0", + "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" + }, + { + "input": "9", + "expectedContent": "" + } + ] + }, + { + "name": "menu_my_account_check_my_balance", + "steps": [ + { + "input": "", + "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" + }, + { + "input": "3", + "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" + }, + { + "input": "3", + "expectedContent": "Balances:\n1:My balance\n2:Community balance\n0:Back" + }, + { + "input": "1", + "expectedContent": "Please enter your PIN:" + }, + { + "input": "1234", + "expectedContent": "Your balance is: 0.00 SRFYour account balance is 0.003 CELO" + } + ] + }, + { + "name": "menu_my_account_check_community_balance", + "steps": [ + { + "input": "", + "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" + }, + { + "input": "3", + "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" + }, + { + "input": "3", + "expectedContent": "Balances:\n1:My balance\n2:Community balance\n0:Back" + }, + { + "input": "2", + "expectedContent": "Please enter your PIN:" + }, + { + "input": "1234", + "expectedContent": "Your balance is: 0.00 SRFYour account balance is 0.003 CELO" + } + ] + }, + { + "name": "menu_my_account_check_my_balance_incorrect_pin", + "steps": [ + { + "input": "", + "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" + }, + { + "input": "3", + "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" + }, + { + "input": "3", + "expectedContent": "Balances:\n1:My balance\n2:Community balance\n0:Back" + }, + { + "input": "1", + "expectedContent": "Please enter your PIN:" + }, + { + "input": "1235", + "expectedContent": "Incorrect pin\n1:retry\n9:Quit" + } + ] + }, + { + "name": "menu_my_account_check_community_balance_incorrect_pin", + "steps": [ + { + "input": "", + "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" + }, + { + "input": "3", + "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" + }, + { + "input": "3", + "expectedContent": "Balances:\n1:My balance\n2:Community balance\n0:Back" + }, + { + "input": "2", + "expectedContent": "Please enter your PIN:" + }, + { + "input": "1235", + "expectedContent": "Incorrect pin\n1:retry\n9:Quit" + } + ] + }, + { + "name": "menu_my_account_my_address", + "steps": [ + { + "input": "", + "expectedContent": "Balance: 0.003 CELO\n\n1:Send\n2:My Vouchers\n3:My Account\n4:Help\n9:Quit" + }, + { + "input": "3", + "expectedContent": "My Account\n1:Profile\n2:Change language\n3:Check balances\n4:Check statement\n5:PIN options\n6:My Address\n0:Back" + }, + { + "input": "6", + "expectedContent": "Address: {public_key}\n9:Quit" + }, + { + "input": "9", + "expectedContent": "Thank you for using Sarafu. Goodbye!" + } + ] + } + ] + } +] \ No newline at end of file