2021-05-14 09:30:50 +02:00
test_name : Create an account through the cic_user_ussd_server entrypoint.
marks :
- usefixtures :
2021-05-15 12:57:54 +02:00
- gift_value
- server_url
- token_symbol
2021-05-14 09:30:50 +02:00
- generate_session_id
- first_account_phone_number
- second_account_phone_number
2021-05-17 21:51:02 +02:00
- first_account_pin_number
- second_account_pin_number
2021-05-17 15:00:19 +02:00
- first_account_family_name
- second_account_family_name
- first_account_given_name
- second_account_given_name
2021-05-17 21:51:02 +02:00
- first_account_location
- second_account_location
- first_account_product
- second_account_product
2021-05-14 09:30:50 +02:00
- first_metadata_entry_session_id
- second_metadata_entry_session_id
2021-05-19 10:49:26 +02:00
- first
2021-05-14 09:30:50 +02:00
stages :
- name : Initiate account creation process [first account].
request :
2021-05-15 12:57:54 +02:00
url : "{server_url}"
2021-05-14 09:30:50 +02:00
data :
serviceCode : "*483*46#"
sessionId : "{generate_session_id}"
phoneNumber : "{first_account_phone_number}"
text : ""
headers :
content-type : "application/x-www-form-urlencoded"
method : POST
response :
status_code :
- 200
headers :
Content-Length : '175'
Content-Type : "text/plain"
verify_response_with :
function : ext.validator:validate_response
extra_kwargs :
expected_response : "END Your account is being created. You will receive an SMS when your account is ready.\nAkaunti yako ya Sarafu inatayarishwa. Utapokea ujumbe wa SMS akaunti yako ikiwa tayari.\n"
- name : Initiate account creation process [second account].
request :
2021-05-15 12:57:54 +02:00
url : "{server_url}"
2021-05-14 09:30:50 +02:00
data :
serviceCode : "*483*46#"
sessionId : "{generate_session_id}"
phoneNumber : "{second_account_phone_number}"
text : ""
headers :
content-type : "application/x-www-form-urlencoded"
method : POST
response :
status_code :
- 200
headers :
Content-Length : '175'
Content-Type : "text/plain"
verify_response_with :
function : ext.validator:validate_response
extra_kwargs :
expected_response : "END Your account is being created. You will receive an SMS when your account is ready.\nAkaunti yako ya Sarafu inatayarishwa. Utapokea ujumbe wa SMS akaunti yako ikiwa tayari.\n"
delay_after : 5
- name : Initaite account metadata entry [first account]
request :
2021-05-15 12:57:54 +02:00
url : "{server_url}"
2021-05-14 09:30:50 +02:00
data :
serviceCode : "*483*46#"
sessionId : "{first_metadata_entry_session_id}"
phoneNumber : "{first_account_phone_number}"
text : ""
headers :
content-type : "application/x-www-form-urlencoded"
method : POST
response :
status_code :
- 200
headers :
Content-Length : '53'
Content-Type : "text/plain"
verify_response_with :
function : ext.validator:validate_response
extra_kwargs :
expected_response : "CON Welcome to Sarafu\n1. English\n2. Kiswahili\n3. Help"
- name : Initaite account metadata entry [second account]
request :
2021-05-15 12:57:54 +02:00
url : "{server_url}"
2021-05-14 09:30:50 +02:00
data :
serviceCode : "*483*46#"
sessionId : "{second_metadata_entry_session_id}"
phoneNumber : "{second_account_phone_number}"
text : ""
headers :
content-type : "application/x-www-form-urlencoded"
method : POST
response :
status_code :
- 200
headers :
Content-Length : '53'
Content-Type : "text/plain"
verify_response_with :
function : ext.validator:validate_response
extra_kwargs :
expected_response : "CON Welcome to Sarafu\n1. English\n2. Kiswahili\n3. Help"
- name : Select preferred language [English]
request :
2021-05-15 12:57:54 +02:00
url : "{server_url}"
2021-05-14 09:30:50 +02:00
data :
serviceCode : "*483*46#"
sessionId : "{first_metadata_entry_session_id}"
phoneNumber : "{first_account_phone_number}"
text : "1"
headers :
content-type : "application/x-www-form-urlencoded"
method : POST
response :
status_code :
- 200
headers :
Content-Length : '54'
Content-Type : "text/plain"
verify_response_with :
function : ext.validator:validate_response
extra_kwargs :
expected_response : "CON Please enter a PIN to manage your account.\n0. Back"
- name : Select preferred language [Kiswahili]
request :
2021-05-15 12:57:54 +02:00
url : "{server_url}"
2021-05-14 09:30:50 +02:00
data :
serviceCode : "*483*46#"
sessionId : "{second_metadata_entry_session_id}"
phoneNumber : "{second_account_phone_number}"
text : "2"
headers :
content-type : "application/x-www-form-urlencoded"
method : POST
response :
status_code :
- 200
headers :
Content-Length : '59'
Content-Type : "text/plain"
verify_response_with :
function : ext.validator:validate_response
extra_kwargs :
expected_response : "CON Tafadhali weka PIN ili kudhibiti akaunti yako.\n0. Nyuma"
2021-05-17 21:51:02 +02:00
- name : Enter pin number [{first_account_pin_number} - first account]
2021-05-14 09:30:50 +02:00
request :
2021-05-15 12:57:54 +02:00
url : "{server_url}"
2021-05-14 09:30:50 +02:00
data :
serviceCode : "*483*46#"
sessionId : "{first_metadata_entry_session_id}"
phoneNumber : "{first_account_phone_number}"
2021-05-17 21:51:02 +02:00
text : "1*{first_account_pin_number}"
2021-05-14 09:30:50 +02:00
headers :
content-type : "application/x-www-form-urlencoded"
method : POST
response :
status_code :
- 200
headers :
Content-Length : '32'
Content-Type : "text/plain"
verify_response_with :
function : ext.validator:validate_response
extra_kwargs :
expected_response : "CON Enter your PIN again\n0. Back"
2021-05-17 21:51:02 +02:00
- name : Enter pin number [second_account_pin_number - second account]
2021-05-14 09:30:50 +02:00
request :
2021-05-15 12:57:54 +02:00
url : "{server_url}"
2021-05-14 09:30:50 +02:00
data :
serviceCode : "*483*46#"
sessionId : "{second_metadata_entry_session_id}"
phoneNumber : "{second_account_phone_number}"
2021-05-17 21:51:02 +02:00
text : "2*{second_account_pin_number}"
2021-05-14 09:30:50 +02:00
headers :
content-type : "application/x-www-form-urlencoded"
method : POST
response :
status_code :
- 200
headers :
Content-Length : '31'
Content-Type : "text/plain"
verify_response_with :
function : ext.validator:validate_response
extra_kwargs :
expected_response : "CON Weka PIN yako tena\n0. Nyuma"
2021-05-17 21:51:02 +02:00
- name : Pin number confirmation [first_account_pin_number - first account]
2021-05-14 09:30:50 +02:00
request :
2021-05-15 12:57:54 +02:00
url : "{server_url}"
2021-05-14 09:30:50 +02:00
data :
serviceCode : "*483*46#"
sessionId : "{first_metadata_entry_session_id}"
phoneNumber : "{first_account_phone_number}"
2021-05-17 21:51:02 +02:00
text : "1*{first_account_pin_number}*{first_account_pin_number}"
2021-05-14 09:30:50 +02:00
headers :
content-type : "application/x-www-form-urlencoded"
method : POST
response :
status_code :
- 200
headers :
Content-Length : '28'
Content-Type : "text/plain"
verify_response_with :
function : ext.validator:validate_response
extra_kwargs :
expected_response : "CON Enter first name\n0. Back"
2021-05-17 21:51:02 +02:00
- name : Pin number confirmation [{second_account_pin_number} - second account]
2021-05-14 09:30:50 +02:00
request :
2021-05-15 12:57:54 +02:00
url : "{server_url}"
2021-05-14 09:30:50 +02:00
data :
serviceCode : "*483*46#"
sessionId : "{second_metadata_entry_session_id}"
phoneNumber : "{second_account_phone_number}"
2021-05-17 21:51:02 +02:00
text : "2*{second_account_pin_number}*{second_account_pin_number}"
2021-05-14 09:30:50 +02:00
headers :
content-type : "application/x-www-form-urlencoded"
method : POST
response :
status_code :
- 200
headers :
Content-Length : '37'
Content-Type : "text/plain"
verify_response_with :
function : ext.validator:validate_response
extra_kwargs :
expected_response : "CON Weka jina lako la kwanza\n0. Nyuma"
2021-05-17 15:00:19 +02:00
- name : Enter first name [first_account_given_name - first account]
2021-05-14 09:30:50 +02:00
request :
2021-05-15 12:57:54 +02:00
url : "{server_url}"
2021-05-14 09:30:50 +02:00
data :
serviceCode : "*483*46#"
sessionId : "{first_metadata_entry_session_id}"
phoneNumber : "{first_account_phone_number}"
2021-05-17 21:51:02 +02:00
text : "1*{first_account_pin_number}*{first_account_pin_number}*{first_account_given_name}"
2021-05-14 09:30:50 +02:00
headers :
content-type : "application/x-www-form-urlencoded"
method : POST
response :
status_code :
- 200
headers :
Content-Length : '27'
Content-Type : "text/plain"
verify_response_with :
function : ext.validator:validate_response
extra_kwargs :
expected_response : "CON Enter last name\n0. Back"
2021-05-17 15:00:19 +02:00
- name : Enter first name [second_account_given_name - second account]
2021-05-14 09:30:50 +02:00
request :
2021-05-15 12:57:54 +02:00
url : "{server_url}"
2021-05-14 09:30:50 +02:00
data :
serviceCode : "*483*46#"
sessionId : "{second_metadata_entry_session_id}"
phoneNumber : "{second_account_phone_number}"
2021-05-17 21:51:02 +02:00
text : "2*{second_account_pin_number}*{second_account_pin_number}*{second_account_given_name}"
2021-05-14 09:30:50 +02:00
headers :
content-type : "application/x-www-form-urlencoded"
method : POST
response :
status_code :
- 200
headers :
Content-Length : '37'
Content-Type : "text/plain"
verify_response_with :
function : ext.validator:validate_response
extra_kwargs :
expected_response : "CON Weka jina lako la mwisho\n0. Nyuma"
2021-05-17 15:00:19 +02:00
- name : Enter last name [first_account_family_name - first account]
2021-05-14 09:30:50 +02:00
request :
2021-05-15 12:57:54 +02:00
url : "{server_url}"
2021-05-14 09:30:50 +02:00
data :
serviceCode : "*483*46#"
sessionId : "{first_metadata_entry_session_id}"
phoneNumber : "{first_account_phone_number}"
2021-05-17 21:51:02 +02:00
text : "1*{first_account_pin_number}*{first_account_pin_number}*{first_account_given_name}*{first_account_family_name}"
2021-05-14 09:30:50 +02:00
headers :
content-type : "application/x-www-form-urlencoded"
method : POST
response :
status_code :
- 200
headers :
Content-Length : '42'
Content-Type : "text/plain"
verify_response_with :
function : ext.validator:validate_response
extra_kwargs :
expected_response : "CON Enter gender\n1. Male\n2. Female\n0. Back"
2021-05-17 15:00:19 +02:00
- name : Enter last name [second_account_family_name - second account]
2021-05-14 09:30:50 +02:00
request :
2021-05-15 12:57:54 +02:00
url : "{server_url}"
2021-05-14 09:30:50 +02:00
data :
serviceCode : "*483*46#"
sessionId : "{second_metadata_entry_session_id}"
phoneNumber : "{second_account_phone_number}"
2021-05-17 21:51:02 +02:00
text : "2*{second_account_pin_number}*{second_account_pin_number}*{second_account_given_name}*{second_account_family_name}"
2021-05-14 09:30:50 +02:00
headers :
content-type : "application/x-www-form-urlencoded"
method : POST
response :
status_code :
- 200
headers :
Content-Length : '53'
Content-Type : "text/plain"
verify_response_with :
function : ext.validator:validate_response
extra_kwargs :
expected_response : "CON Weka jinsia yako\n1. Mwanaume\n2. Mwanamke\n0. Nyuma"
- name : Select gender [Male - first account]
request :
2021-05-15 12:57:54 +02:00
url : "{server_url}"
2021-05-14 09:30:50 +02:00
data :
serviceCode : "*483*46#"
sessionId : "{first_metadata_entry_session_id}"
phoneNumber : "{first_account_phone_number}"
2021-05-17 21:51:02 +02:00
text : "1*{first_account_pin_number}*{first_account_pin_number}*{first_account_given_name}*{first_account_family_name}*1"
2021-05-14 09:30:50 +02:00
headers :
content-type : "application/x-www-form-urlencoded"
method : POST
response :
status_code :
- 200
headers :
Content-Length : '26'
Content-Type : "text/plain"
verify_response_with :
function : ext.validator:validate_response
extra_kwargs :
expected_response : "CON Enter location\n0. Back"
- name : Select gender [Female - second account]
request :
2021-05-15 12:57:54 +02:00
url : "{server_url}"
2021-05-14 09:30:50 +02:00
data :
serviceCode : "*483*46#"
sessionId : "{second_metadata_entry_session_id}"
phoneNumber : "{second_account_phone_number}"
2021-05-17 21:51:02 +02:00
text : "2*{second_account_pin_number}*{second_account_pin_number}*{second_account_given_name}*{second_account_family_name}*2"
2021-05-14 09:30:50 +02:00
headers :
content-type : "application/x-www-form-urlencoded"
method : POST
response :
status_code :
- 200
headers :
Content-Length : '27'
Content-Type : "text/plain"
verify_response_with :
function : ext.validator:validate_response
extra_kwargs :
expected_response : "CON Weka eneo lako\n0. Nyuma"
2021-05-17 21:51:02 +02:00
- name : Enter location [first_account_location - first account]
2021-05-14 09:30:50 +02:00
request :
2021-05-15 12:57:54 +02:00
url : "{server_url}"
2021-05-14 09:30:50 +02:00
data :
serviceCode : "*483*46#"
sessionId : "{first_metadata_entry_session_id}"
phoneNumber : "{first_account_phone_number}"
2021-05-17 21:51:02 +02:00
text : "1*{first_account_pin_number}*{first_account_pin_number}*{first_account_given_name}*{first_account_family_name}*1*{first_account_location}"
2021-05-14 09:30:50 +02:00
headers :
content-type : "application/x-www-form-urlencoded"
method : POST
response :
status_code :
- 200
headers :
Content-Length : '55'
Content-Type : "text/plain"
verify_response_with :
function : ext.validator:validate_response
extra_kwargs :
expected_response : "CON Please enter a product or service you offer\n0. Back"
2021-05-17 21:51:02 +02:00
- name : Enter location [second_account_location - second account]
2021-05-14 09:30:50 +02:00
request :
2021-05-15 12:57:54 +02:00
url : "{server_url}"
2021-05-14 09:30:50 +02:00
data :
serviceCode : "*483*46#"
sessionId : "{second_metadata_entry_session_id}"
phoneNumber : "{second_account_phone_number}"
2021-05-17 21:51:02 +02:00
text : "2*{second_account_pin_number}*{second_account_pin_number}*{second_account_given_name}*{second_account_family_name}*2*{second_account_location}"
2021-05-14 09:30:50 +02:00
headers :
content-type : "application/x-www-form-urlencoded"
method : POST
response :
status_code :
- 200
headers :
Content-Length : '52'
Content-Type : "text/plain"
verify_response_with :
function : ext.validator:validate_response
extra_kwargs :
expected_response : "CON Tafadhali weka bidhaa ama huduma unauza\n0. Nyuma"
2021-05-17 21:51:02 +02:00
- name : Enter product [first_account_product - first account]
2021-05-14 09:30:50 +02:00
request :
2021-05-15 12:57:54 +02:00
url : "{server_url}"
2021-05-14 09:30:50 +02:00
data :
serviceCode : "*483*46#"
sessionId : "{first_metadata_entry_session_id}"
phoneNumber : "{first_account_phone_number}"
2021-05-17 21:51:02 +02:00
text : "1*{first_account_pin_number}*{first_account_pin_number}*{first_account_given_name}*{first_account_family_name}*1*{first_account_location}*{first_account_product}"
2021-05-14 09:30:50 +02:00
headers :
content-type : "application/x-www-form-urlencoded"
method : POST
response :
status_code :
- 200
headers :
Content-Length : '51'
Content-Type : "text/plain"
verify_response_with :
function : ext.validator:validate_response
extra_kwargs :
2021-05-15 12:57:54 +02:00
expected_response : "CON Balance {gift_value} {token_symbol}\n1. Send\n2. My Account\n3. Help"
2021-05-17 15:00:19 +02:00
delay_before : 10
2021-05-14 09:30:50 +02:00
2021-05-17 21:51:02 +02:00
- name : Enter product [second_account_product - second account]
2021-05-14 09:30:50 +02:00
request :
2021-05-15 12:57:54 +02:00
url : "{server_url}"
2021-05-14 09:30:50 +02:00
data :
serviceCode : "*483*46#"
sessionId : "{second_metadata_entry_session_id}"
phoneNumber : "{second_account_phone_number}"
2021-05-17 21:51:02 +02:00
text : "2*{second_account_pin_number}*{second_account_pin_number}*{second_account_given_name}*{second_account_family_name}*2*{second_account_location}*{second_account_product}"
2021-05-14 09:30:50 +02:00
headers :
content-type : "application/x-www-form-urlencoded"
method : POST
response :
status_code :
- 200
headers :
Content-Length : '56'
Content-Type : "text/plain"
verify_response_with :
function : ext.validator:validate_response
extra_kwargs :
2021-05-15 12:57:54 +02:00
expected_response : "CON Salio {gift_value} {token_symbol}\n1. Tuma\n2. Akaunti yangu\n3. Usaidizi"
2021-05-17 15:00:19 +02:00
delay_before : 10