From d356f8167dbfa2391ad1c31053f659aaf879ac22 Mon Sep 17 00:00:00 2001 From: Philip Wafula Date: Wed, 30 Jun 2021 14:27:56 +0000 Subject: [PATCH] Philip/refactor integration tests --- apps/cic-ussd/cic_ussd/processor.py | 1 + apps/cic-ussd/tests/fixtures/integration.py | 40 - apps/cic-ussd/tests/integration/README.md | 25 + .../test_account_creation.tavern.yaml | 226 +--- .../test_account_management.tavern.yaml | 1 - .../test_profile_management.tavern.yaml | 1046 +++-------------- .../integration/test_transactions.tavern.yaml | 8 +- .../transitions/age_setting_transitions.json | 2 +- .../gender_setting_transitions.json | 2 +- .../transitions/name_setting_transitions.json | 2 +- apps/cic-ussd/var/lib/locale/ussd.en.yml | 2 +- apps/cic-ussd/var/lib/locale/ussd.sw.yml | 2 +- 12 files changed, 201 insertions(+), 1156 deletions(-) create mode 100644 apps/cic-ussd/tests/integration/README.md diff --git a/apps/cic-ussd/cic_ussd/processor.py b/apps/cic-ussd/cic_ussd/processor.py index a7d515a3..9f9bccd3 100644 --- a/apps/cic-ussd/cic_ussd/processor.py +++ b/apps/cic-ussd/cic_ussd/processor.py @@ -294,6 +294,7 @@ def process_display_user_metadata(user: Account, display_key: str): preferred_language=user.preferred_language, full_name=absent, gender=absent, + age=absent, location=absent, products=absent ) diff --git a/apps/cic-ussd/tests/fixtures/integration.py b/apps/cic-ussd/tests/fixtures/integration.py index b4488dcc..c8c349d9 100644 --- a/apps/cic-ussd/tests/fixtures/integration.py +++ b/apps/cic-ussd/tests/fixtures/integration.py @@ -124,46 +124,6 @@ def second_profile_management_session_id() -> str: return session_id() -@pytest.fixture(scope='session') -def first_account_change_given_name() -> str: - return fake.first_name() - - -@pytest.fixture(scope='session') -def second_account_change_given_name() -> str: - return fake.first_name() - - -@pytest.fixture(scope='session') -def first_account_change_family_name() -> str: - return fake.last_name() - - -@pytest.fixture(scope='session') -def second_account_change_family_name() -> str: - return fake.last_name() - - -@pytest.fixture(scope='session') -def first_account_change_location() -> str: - return fake.city() - - -@pytest.fixture(scope='session') -def second_account_change_location() -> str: - return fake.city() - - -@pytest.fixture(scope='session') -def first_account_change_product() -> str: - return fake.color_name() - - -@pytest.fixture(scope='session') -def second_account_change_product() -> str: - return fake.color_name() - - @pytest.fixture(scope='session') def first_profile_management_session_id_1() -> str: return session_id() diff --git a/apps/cic-ussd/tests/integration/README.md b/apps/cic-ussd/tests/integration/README.md new file mode 100644 index 00000000..dd567c53 --- /dev/null +++ b/apps/cic-ussd/tests/integration/README.md @@ -0,0 +1,25 @@ +# INTEGRATION TESTING + +This folder contains integration tests. + +## OVERVIEW + +There are four files defining the integration tests. + +* **test_account_creation**: Tests account sign up process. +* **test_transactions**: Tests transactions between two accounts. +* **test_profile_management**: Tests that account metadata can be edited. +* **test_account_management**: Tests that account management functionalities are intact. + +## REQUIREMENTS + +In order to run the transaction tests, please ensure that the faucet amount is set to a non-zero value, ideally `50000000` +which is the value set in the config file `.config/test/integration.ini`. + +This implies setting the `DEV_FAUCET_AMOUNT` to a non-zero value before bringing up the contract-migration image: + +```shell +export DEV_FAUCET_AMOUNT=50000000 +RUN_MASK=1 docker-compose up contract-migration +RUN_MASK=2 docker-compose up contract-migration +``` diff --git a/apps/cic-ussd/tests/integration/test_account_creation.tavern.yaml b/apps/cic-ussd/tests/integration/test_account_creation.tavern.yaml index 4fa83dd5..d602583c 100644 --- a/apps/cic-ussd/tests/integration/test_account_creation.tavern.yaml +++ b/apps/cic-ussd/tests/integration/test_account_creation.tavern.yaml @@ -214,12 +214,13 @@ stages: status_code: - 200 headers: - Content-Length: '28' + Content-Length: '51' Content-Type: "text/plain" verify_response_with: function: ext.validator:validate_response extra_kwargs: - expected_response: "CON Enter first name\n0. Back" + expected_response: "CON Balance {gift_value} {token_symbol}\n1. Send\n2. My Account\n3. Help" + delay_before: 10 - name: Pin number confirmation [{second_account_pin_number} - second account] request: @@ -232,227 +233,6 @@ stages: 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" - - - name: Enter first name [first_account_given_name - first account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{first_metadata_entry_session_id}" - phoneNumber: "{first_account_phone_number}" - text: "1*{first_account_pin_number}*{first_account_pin_number}*{first_account_given_name}" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '29' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "CON Enter family name\n0. Back" - - - name: Enter first name [second_account_given_name - second account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{second_metadata_entry_session_id}" - phoneNumber: "{second_account_phone_number}" - text: "2*{second_account_pin_number}*{second_account_pin_number}*{second_account_given_name}" - 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" - - - name: Enter last name [first_account_family_name - first account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{first_metadata_entry_session_id}" - phoneNumber: "{first_account_phone_number}" - text: "1*{first_account_pin_number}*{first_account_pin_number}*{first_account_given_name}*{first_account_family_name}" - 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: - expected_response: "CON Enter gender\n1. Male\n2. Female\n3. Other\n0. Back" - - - name: Enter last name [second_account_family_name - second account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{second_metadata_entry_session_id}" - phoneNumber: "{second_account_phone_number}" - text: "2*{second_account_pin_number}*{second_account_pin_number}*{second_account_given_name}*{second_account_family_name}" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '64' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "CON Weka jinsia yako\n1. Mwanaume\n2. Mwanamke\n3. Nyngine\n0. Nyuma" - - - name: Select gender [Male - first account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{first_metadata_entry_session_id}" - phoneNumber: "{first_account_phone_number}" - text: "1*{first_account_pin_number}*{first_account_pin_number}*{first_account_given_name}*{first_account_family_name}*1" - 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 Enter your location\n0. Back" - - - name: Select gender [Female - second account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{second_metadata_entry_session_id}" - phoneNumber: "{second_account_phone_number}" - text: "2*{second_account_pin_number}*{second_account_pin_number}*{second_account_given_name}*{second_account_family_name}*2" - 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" - - - name: Enter location [first_account_location - first account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{first_metadata_entry_session_id}" - phoneNumber: "{first_account_phone_number}" - text: "1*{first_account_pin_number}*{first_account_pin_number}*{first_account_given_name}*{first_account_family_name}*1*{first_account_location}" - 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" - - - name: Enter location [second_account_location - second account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{second_metadata_entry_session_id}" - phoneNumber: "{second_account_phone_number}" - text: "2*{second_account_pin_number}*{second_account_pin_number}*{second_account_given_name}*{second_account_family_name}*2*{second_account_location}" - 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 Weka bidhaa ama huduma unauza\n0. Nyuma" - - - name: Enter product [first_account_product - first account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{first_metadata_entry_session_id}" - phoneNumber: "{first_account_phone_number}" - 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}" - 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: - expected_response: "CON Balance {gift_value} {token_symbol}\n1. Send\n2. My Account\n3. Help" - delay_before: 10 - - - name: Enter product [second_account_product - second account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{second_metadata_entry_session_id}" - phoneNumber: "{second_account_phone_number}" - 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}" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST response: status_code: - 200 diff --git a/apps/cic-ussd/tests/integration/test_account_management.tavern.yaml b/apps/cic-ussd/tests/integration/test_account_management.tavern.yaml index 03a5a4df..1d9ea975 100644 --- a/apps/cic-ussd/tests/integration/test_account_management.tavern.yaml +++ b/apps/cic-ussd/tests/integration/test_account_management.tavern.yaml @@ -31,7 +31,6 @@ stages: status_code: - 200 headers: - Content-Length: '51' Content-Type: "text/plain" verify_response_with: function: ext.validator:validate_response diff --git a/apps/cic-ussd/tests/integration/test_profile_management.tavern.yaml b/apps/cic-ussd/tests/integration/test_profile_management.tavern.yaml index 274f0265..7e19a772 100644 --- a/apps/cic-ussd/tests/integration/test_profile_management.tavern.yaml +++ b/apps/cic-ussd/tests/integration/test_profile_management.tavern.yaml @@ -17,22 +17,6 @@ marks: - second_account_product - first_profile_management_session_id - second_profile_management_session_id - - first_account_change_family_name - - second_account_change_family_name - - first_account_change_given_name - - second_account_change_given_name - - first_account_change_location - - second_account_change_location - - first_account_change_product - - second_account_change_product - - first_profile_management_session_id_1 - - second_profile_management_session_id_1 - - first_profile_management_session_id_2 - - second_profile_management_session_id_2 - - first_profile_management_session_id_3 - - second_profile_management_session_id_3 - - first_profile_management_session_id_4 - - second_profile_management_session_id_4 - third stages: @@ -139,12 +123,12 @@ stages: status_code: - 200 headers: - Content-Length: '103' + Content-Length: '115' Content-Type: "text/plain" verify_response_with: function: ext.validator:validate_response extra_kwargs: - expected_response: "CON My profile\n1. Edit name\n2. Edit gender\n3. Edit location\n4. Edit products\n5. View my profile\n0. Back" + expected_response: "CON My profile\n1. Edit name\n2. Edit gender\n3. Edit age\n4. Edit location\n5. Edit products\n6. View my profile\n0. Back" - name: Profile management menu [second account] request: @@ -161,12 +145,12 @@ stages: status_code: - 200 headers: - Content-Length: '104' + Content-Length: '117' Content-Type: "text/plain" verify_response_with: function: ext.validator:validate_response extra_kwargs: - expected_response: "CON Wasifu wangu\n1. Weka jina\n2. Weka jinsia\n3. Weka eneo\n4. Weka bidhaa\n5. Angalia wasifu wako\n0. Nyuma" + expected_response: "CON Wasifu wangu\n1. Weka jina\n2. Weka jinsia\n3. Weka umri\n4. Weka eneo\n5. Weka bidhaa\n6. Angalia wasifu wako\n0. Nyuma" - name: Enter pin to view profile [first account] request: @@ -175,7 +159,7 @@ stages: serviceCode: "*483*46#" sessionId: "{first_profile_management_session_id}" phoneNumber: "{first_account_phone_number}" - text: "2*1*5" + text: "2*1*6" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -197,7 +181,7 @@ stages: serviceCode: "*483*46#" sessionId: "{second_profile_management_session_id}" phoneNumber: "{second_account_phone_number}" - text: "2*1*5" + text: "2*1*6" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -219,7 +203,7 @@ stages: serviceCode: "*483*46#" sessionId: "{first_profile_management_session_id}" phoneNumber: "{first_account_phone_number}" - text: "2*1*5*{first_account_pin_number}" + text: "2*1*6*{first_account_pin_number}" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -231,7 +215,7 @@ stages: verify_response_with: function: ext.validator:validate_response extra_kwargs: - expected_response: "CON Your details are:\n Name: {first_account_given_name} {first_account_family_name}\n Gender: Male\n Location: {first_account_location}\n You sell: {first_account_product}\n0. Back" + expected_response: "CON Your details are:\n Name: Not provided\n Gender: Not provided\n Age: Not provided\n Location: Not provided\n You sell: Not provided\n0. Back" - name: Display profile [second account] request: @@ -240,7 +224,7 @@ stages: serviceCode: "*483*46#" sessionId: "{second_profile_management_session_id}" phoneNumber: "{second_account_phone_number}" - text: "2*1*5*{second_account_pin_number}" + text: "2*1*6*{second_account_pin_number}" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -252,7 +236,7 @@ stages: verify_response_with: function: ext.validator:validate_response extra_kwargs: - expected_response: "CON Wasifu wako una maelezo yafuatayo:\n Jina: {second_account_given_name} {second_account_family_name}\n Jinsia: Mwanamke\n Eneo: {second_account_location}\n Unauza: {second_account_product}\n0. Nyuma" + expected_response: "CON Wasifu wako una maelezo yafuatayo:\n Jina: Haijawekwa\n Jinsia: Haijawekwa\n Umri: Haijawekwa\n Eneo: Haijawekwa\n Unauza: Haijawekwa\n0. Nyuma" - name: Second profile management menu [first account] request: @@ -261,7 +245,7 @@ stages: serviceCode: "*483*46#" sessionId: "{first_profile_management_session_id}" phoneNumber: "{first_account_phone_number}" - text: "2*1*5*{first_account_pin_number}*0" + text: "2*1*6*{first_account_pin_number}*0" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -269,12 +253,12 @@ stages: status_code: - 200 headers: - Content-Length: '103' + Content-Length: '115' Content-Type: "text/plain" verify_response_with: function: ext.validator:validate_response extra_kwargs: - expected_response: "CON My profile\n1. Edit name\n2. Edit gender\n3. Edit location\n4. Edit products\n5. View my profile\n0. Back" + expected_response: "CON My profile\n1. Edit name\n2. Edit gender\n3. Edit age\n4. Edit location\n5. Edit products\n6. View my profile\n0. Back" - name: Second profile management menu [second account] request: @@ -283,7 +267,7 @@ stages: serviceCode: "*483*46#" sessionId: "{second_profile_management_session_id}" phoneNumber: "{second_account_phone_number}" - text: "2*1*5*{second_account_pin_number}*0" + text: "2*1*6*{second_account_pin_number}*0" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -291,12 +275,12 @@ stages: status_code: - 200 headers: - Content-Length: '104' + Content-Length: '117' Content-Type: "text/plain" verify_response_with: function: ext.validator:validate_response extra_kwargs: - expected_response: "CON Wasifu wangu\n1. Weka jina\n2. Weka jinsia\n3. Weka eneo\n4. Weka bidhaa\n5. Angalia wasifu wako\n0. Nyuma" + expected_response: "CON Wasifu wangu\n1. Weka jina\n2. Weka jinsia\n3. Weka umri\n4. Weka eneo\n5. Weka bidhaa\n6. Angalia wasifu wako\n0. Nyuma" - name: Edit name [first account] request: @@ -305,7 +289,7 @@ stages: serviceCode: "*483*46#" sessionId: "{first_profile_management_session_id}" phoneNumber: "{first_account_phone_number}" - text: "2*1*5*{second_account_pin_number}*0*1" + text: "2*1*6*{first_account_pin_number}*0*1" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -327,7 +311,7 @@ stages: serviceCode: "*483*46#" sessionId: "{second_profile_management_session_id}" phoneNumber: "{second_account_phone_number}" - text: "2*1*5*{second_account_pin_number}*0*1" + text: "2*1*6*{second_account_pin_number}*0*1" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -349,7 +333,7 @@ stages: serviceCode: "*483*46#" sessionId: "{first_profile_management_session_id}" phoneNumber: "{first_account_phone_number}" - text: "2*1*5*{second_account_pin_number}*0*1*{first_account_change_given_name}" + text: "2*1*6*{first_account_pin_number}*0*1*{first_account_given_name}" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -371,7 +355,7 @@ stages: serviceCode: "*483*46#" sessionId: "{second_profile_management_session_id}" phoneNumber: "{second_account_phone_number}" - text: "2*1*5*{second_account_pin_number}*0*1*{second_account_change_given_name}" + text: "2*1*6*{second_account_pin_number}*0*1*{second_account_given_name}" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -393,7 +377,7 @@ stages: serviceCode: "*483*46#" sessionId: "{first_profile_management_session_id}" phoneNumber: "{first_account_phone_number}" - text: "2*1*5*{second_account_pin_number}*0*1*{first_account_change_given_name}*{first_account_change_family_name}" + text: "2*1*6*{first_account_pin_number}*0*1*{first_account_given_name}*{first_account_family_name}" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -401,12 +385,12 @@ stages: status_code: - 200 headers: - Content-Length: '33' + Content-Length: '51' Content-Type: "text/plain" verify_response_with: function: ext.validator:validate_response extra_kwargs: - expected_response: "CON Please enter your PIN\n0. Back" + expected_response: "CON Enter gender\n1. Male\n2. Female\n3. Other\n0. Back" - name: Enter family name [second account] request: @@ -415,7 +399,7 @@ stages: serviceCode: "*483*46#" sessionId: "{second_profile_management_session_id}" phoneNumber: "{second_account_phone_number}" - text: "2*1*5*{second_account_pin_number}*0*1*{second_account_change_given_name}*{second_account_change_family_name}" + text: "2*1*6*{second_account_pin_number}*0*1*{second_account_given_name}*{second_account_family_name}" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -423,21 +407,21 @@ stages: status_code: - 200 headers: - Content-Length: '36' + Content-Length: '64' Content-Type: "text/plain" verify_response_with: function: ext.validator:validate_response extra_kwargs: - expected_response: "CON Tafadhali weka PIN yako\n0. Nyuma" + expected_response: "CON Weka jinsia yako\n1. Mwanaume\n2. Mwanamke\n3. Nyngine\n0. Nyuma" - - name: Enter name change pin [first account] + - name: Select gender [Male - first account] request: url: "{server_url}" data: serviceCode: "*483*46#" sessionId: "{first_profile_management_session_id}" phoneNumber: "{first_account_phone_number}" - text: "2*1*5*{second_account_pin_number}*0*1*{first_account_change_given_name}*{first_account_change_family_name}*{first_account_pin_number}" + text: "2*1*6*{first_account_pin_number}*0*1*{first_account_given_name}*{first_account_family_name}*1" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -445,21 +429,21 @@ stages: status_code: - 200 headers: - Content-Length: '36' + Content-Length: '31' Content-Type: "text/plain" verify_response_with: function: ext.validator:validate_response extra_kwargs: - expected_response: "END Thank you for using the service." + expected_response: "CON Enter year of birth\n0. Back" - - name: Enter name change pin [second account] + - name: Select gender [Female - second account] request: url: "{server_url}" data: serviceCode: "*483*46#" sessionId: "{second_profile_management_session_id}" phoneNumber: "{second_account_phone_number}" - text: "2*1*5*{second_account_pin_number}*0*1*{second_account_change_given_name}*{second_account_change_family_name}*{second_account_pin_number}" + text: "2*1*6*{second_account_pin_number}*0*1*{second_account_given_name}*{second_account_family_name}*2" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -467,21 +451,109 @@ stages: status_code: - 200 headers: - Content-Length: '30' + Content-Length: '35' Content-Type: "text/plain" verify_response_with: function: ext.validator:validate_response extra_kwargs: - expected_response: "END Asante kwa kutumia huduma." + expected_response: "CON Weka mwaka wa kuzaliwa\n0. Nyuma" - - name: Second profile management start menu [first account] + - name: Enter age [1993 - first account] request: url: "{server_url}" data: serviceCode: "*483*46#" - sessionId: "{first_profile_management_session_id_1}" + sessionId: "{first_profile_management_session_id}" phoneNumber: "{first_account_phone_number}" - text: "" + text: "2*1*6*{first_account_pin_number}*0*1*{first_account_given_name}*{first_account_family_name}*1*1993" + 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 Enter your location\n0. Back" + + - name: Enter age [1974 - second account] + request: + url: "{server_url}" + data: + serviceCode: "*483*46#" + sessionId: "{second_profile_management_session_id}" + phoneNumber: "{second_account_phone_number}" + text: "2*1*6*{second_account_pin_number}*0*1*{second_account_given_name}*{second_account_family_name}*2*1974" + 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" + + - name: Enter location [first_account_location - first account] + request: + url: "{server_url}" + data: + serviceCode: "*483*46#" + sessionId: "{first_profile_management_session_id}" + phoneNumber: "{first_account_phone_number}" + text: "2*1*6*{first_account_pin_number}*0*1*{first_account_given_name}*{first_account_family_name}*1*1993*{first_account_location}" + 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" + + - name: Enter location [second_account_location - second account] + request: + url: "{server_url}" + data: + serviceCode: "*483*46#" + sessionId: "{second_profile_management_session_id}" + phoneNumber: "{second_account_phone_number}" + text: "2*1*6*{second_account_pin_number}*0*1*{second_account_given_name}*{second_account_family_name}*2*1974*{second_account_location}" + 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 Weka bidhaa ama huduma unauza\n0. Nyuma" + + - name: Enter product [first_account_product - first account] + request: + url: "{server_url}" + data: + serviceCode: "*483*46#" + sessionId: "{first_profile_management_session_id}" + phoneNumber: "{first_account_phone_number}" + text: "2*1*6*{first_account_pin_number}*0*1*{first_account_given_name}*{first_account_family_name}*1*1993*{first_account_location}*{first_account_product}" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -496,14 +568,14 @@ stages: extra_kwargs: expected_response: "CON Balance 58.00 {token_symbol}\n1. Send\n2. My Account\n3. Help" - - name: Second profile management start menu [second account] + - name: Enter product [second_account_product - second account] request: url: "{server_url}" data: serviceCode: "*483*46#" - sessionId: "{second_profile_management_session_id_1}" + sessionId: "{second_profile_management_session_id}" phoneNumber: "{second_account_phone_number}" - text: "" + text: "2*1*6*{second_account_pin_number}*0*1*{second_account_given_name}*{second_account_family_name}*2*1974*{second_account_location}*{second_account_product}" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -523,9 +595,9 @@ stages: url: "{server_url}" data: serviceCode: "*483*46#" - sessionId: "{first_profile_management_session_id_1}" + sessionId: "{first_profile_management_session_id}" phoneNumber: "{first_account_phone_number}" - text: "2" + text: "2*1*6*{first_account_pin_number}*0*1*{first_account_given_name}*{first_account_family_name}*1*1993*{first_account_location}*{first_account_product}*2" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -540,14 +612,14 @@ stages: extra_kwargs: expected_response: "CON My account\n1. My profile\n2. Change language\n3. Check balance\n4. Check statement\n5. Change PIN\n0. Back" - - name: Second account management [second account] + - name: Second account management menu [second account] request: url: "{server_url}" data: serviceCode: "*483*46#" - sessionId: "{second_profile_management_session_id_1}" + sessionId: "{second_profile_management_session_id}" phoneNumber: "{second_account_phone_number}" - text: "2" + text: "2*1*6*{second_account_pin_number}*0*1*{second_account_given_name}*{second_account_family_name}*2*1974*{second_account_location}*{second_account_product}*2" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -567,9 +639,9 @@ stages: url: "{server_url}" data: serviceCode: "*483*46#" - sessionId: "{first_profile_management_session_id_1}" + sessionId: "{first_profile_management_session_id}" phoneNumber: "{first_account_phone_number}" - text: "2*1" + text: "2*1*6*{first_account_pin_number}*0*1*{first_account_given_name}*{first_account_family_name}*1*1993*{first_account_location}*{first_account_product}*2*1" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -577,21 +649,21 @@ stages: status_code: - 200 headers: - Content-Length: '103' + Content-Length: '115' Content-Type: "text/plain" verify_response_with: function: ext.validator:validate_response extra_kwargs: - expected_response: "CON My profile\n1. Edit name\n2. Edit gender\n3. Edit location\n4. Edit products\n5. View my profile\n0. Back" + expected_response: "CON My profile\n1. Edit name\n2. Edit gender\n3. Edit age\n4. Edit location\n5. Edit products\n6. View my profile\n0. Back" - name: Second profile management menu [second account] request: url: "{server_url}" data: serviceCode: "*483*46#" - sessionId: "{second_profile_management_session_id_1}" + sessionId: "{second_profile_management_session_id}" phoneNumber: "{second_account_phone_number}" - text: "2*1" + text: "2*1*6*{second_account_pin_number}*0*1*{second_account_given_name}*{second_account_family_name}*2*1974*{second_account_location}*{second_account_product}*2*1" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -599,813 +671,21 @@ stages: status_code: - 200 headers: - Content-Length: '104' + Content-Length: '117' Content-Type: "text/plain" verify_response_with: function: ext.validator:validate_response extra_kwargs: - expected_response: "CON Wasifu wangu\n1. Weka jina\n2. Weka jinsia\n3. Weka eneo\n4. Weka bidhaa\n5. Angalia wasifu wako\n0. Nyuma" - - - name: Gender change [first account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{first_profile_management_session_id_1}" - phoneNumber: "{first_account_phone_number}" - text: "2*1*2" - 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: - expected_response: "CON Enter gender\n1. Male\n2. Female\n3. Other\n0. Back" - - - name: Gender change [second account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{second_profile_management_session_id_1}" - phoneNumber: "{second_account_phone_number}" - text: "2*1*2" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '64' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "CON Weka jinsia yako\n1. Mwanaume\n2. Mwanamke\n3. Nyngine\n0. Nyuma" - - - name: Select gender [female - first account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{first_profile_management_session_id_1}" - phoneNumber: "{first_account_phone_number}" - text: "2*1*2*2" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '33' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "CON Please enter your PIN\n0. Back" - - - name: Select gender [male - second account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{second_profile_management_session_id_1}" - phoneNumber: "{second_account_phone_number}" - text: "2*1*2*1" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '36' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "CON Tafadhali weka PIN yako\n0. Nyuma" - - - name: Enter gender change pin [first account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{first_profile_management_session_id_1}" - phoneNumber: "{first_account_phone_number}" - text: "2*1*2*2*{first_account_pin_number}" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '36' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "END Thank you for using the service." - - - name: Enter gender change pin [second account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{second_profile_management_session_id_1}" - phoneNumber: "{second_account_phone_number}" - text: "2*1*2*1*{second_account_pin_number}" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '30' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "END Asante kwa kutumia huduma." - - - name: Third profile management start menu [first account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{first_profile_management_session_id_2}" - phoneNumber: "{first_account_phone_number}" - text: "" - 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: - expected_response: "CON Balance 58.00 {token_symbol}\n1. Send\n2. My Account\n3. Help" - - - name: Third profile management start menu [second account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{second_profile_management_session_id_2}" - phoneNumber: "{second_account_phone_number}" - text: "" - 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: - expected_response: "CON Salio 42.00 {token_symbol}\n1. Tuma\n2. Akaunti yangu\n3. Usaidizi" - - - name: Third account management menu [first account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{first_profile_management_session_id_2}" - phoneNumber: "{first_account_phone_number}" - text: "2" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '105' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "CON My account\n1. My profile\n2. Change language\n3. Check balance\n4. Check statement\n5. Change PIN\n0. Back" - - - name: Third account management [second account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{second_profile_management_session_id_2}" - phoneNumber: "{second_account_phone_number}" - text: "2" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '148' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "CON Akaunti yangu\n1. Wasifu wangu\n2. Chagua lugha utakayotumia\n3. Angalia salio\n4. Angalia taarifa ya matumizi\n5. Badilisha nambari ya siri\n0. Nyuma" - - - name: Third profile management menu [first account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{first_profile_management_session_id_2}" - phoneNumber: "{first_account_phone_number}" - text: "2*1" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '103' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "CON My profile\n1. Edit name\n2. Edit gender\n3. Edit location\n4. Edit products\n5. View my profile\n0. Back" - - - name: Third profile management menu [second account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{second_profile_management_session_id_2}" - phoneNumber: "{second_account_phone_number}" - text: "2*1" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '104' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "CON Wasifu wangu\n1. Weka jina\n2. Weka jinsia\n3. Weka eneo\n4. Weka bidhaa\n5. Angalia wasifu wako\n0. Nyuma" - - - name: Location change [first account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{first_profile_management_session_id_2}" - phoneNumber: "{first_account_phone_number}" - text: "2*1*3" - 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 Enter your location\n0. Back" - - - name: Location change [second account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{second_profile_management_session_id_2}" - phoneNumber: "{second_account_phone_number}" - text: "2*1*3" - 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" - - - name: Enter location change [first_account_change_location - first account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{first_profile_management_session_id_2}" - phoneNumber: "{first_account_phone_number}" - text: "2*1*3*{first_account_change_location}" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '33' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "CON Please enter your PIN\n0. Back" - - - name: Enter location change [second_account_change_location - second account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{second_profile_management_session_id_2}" - phoneNumber: "{second_account_phone_number}" - text: "2*1*3*{second_account_change_location}" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '36' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "CON Tafadhali weka PIN yako\n0. Nyuma" - - - name: Enter location change pin [first account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{first_profile_management_session_id_2}" - phoneNumber: "{first_account_phone_number}" - text: "2*1*3*{first_account_change_location}*{first_account_pin_number}" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '36' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "END Thank you for using the service." - - - name: Enter location change pin [second account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{second_profile_management_session_id_2}" - phoneNumber: "{second_account_phone_number}" - text: "2*1*3*{second_account_change_location}*{second_account_pin_number}" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '30' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "END Asante kwa kutumia huduma." - - - name: Fourth profile management start menu [first account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{first_profile_management_session_id_3}" - phoneNumber: "{first_account_phone_number}" - text: "" - 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: - expected_response: "CON Balance 58.00 {token_symbol}\n1. Send\n2. My Account\n3. Help" - - - name: Fourth profile management start menu [second account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{second_profile_management_session_id_3}" - phoneNumber: "{second_account_phone_number}" - text: "" - 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: - expected_response: "CON Salio 42.00 {token_symbol}\n1. Tuma\n2. Akaunti yangu\n3. Usaidizi" - - - name: Fourth account management menu [first account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{first_profile_management_session_id_3}" - phoneNumber: "{first_account_phone_number}" - text: "2" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '105' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "CON My account\n1. My profile\n2. Change language\n3. Check balance\n4. Check statement\n5. Change PIN\n0. Back" - - - name: Fourth account management menu [second account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{second_profile_management_session_id_3}" - phoneNumber: "{second_account_phone_number}" - text: "2" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '148' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "CON Akaunti yangu\n1. Wasifu wangu\n2. Chagua lugha utakayotumia\n3. Angalia salio\n4. Angalia taarifa ya matumizi\n5. Badilisha nambari ya siri\n0. Nyuma" - - - name: Fourth profile management menu [first account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{first_profile_management_session_id_3}" - phoneNumber: "{first_account_phone_number}" - text: "2*1" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '103' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "CON My profile\n1. Edit name\n2. Edit gender\n3. Edit location\n4. Edit products\n5. View my profile\n0. Back" - - - name: Fourth profile management menu [second account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{second_profile_management_session_id_3}" - phoneNumber: "{second_account_phone_number}" - text: "2*1" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '104' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "CON Wasifu wangu\n1. Weka jina\n2. Weka jinsia\n3. Weka eneo\n4. Weka bidhaa\n5. Angalia wasifu wako\n0. Nyuma" - - - name: Product change [first account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{first_profile_management_session_id_3}" - phoneNumber: "{first_account_phone_number}" - text: "2*1*4" - 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" - - - name: Product change [second account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{second_profile_management_session_id_3}" - phoneNumber: "{second_account_phone_number}" - text: "2*1*4" - 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 Weka bidhaa ama huduma unauza\n0. Nyuma" - - - name: Enter product change [first_account_change_product - first account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{first_profile_management_session_id_3}" - phoneNumber: "{first_account_phone_number}" - text: "2*1*4*{first_account_change_product}" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '33' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "CON Please enter your PIN\n0. Back" - - - name: Enter product change [second_account_change_product - second account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{second_profile_management_session_id_3}" - phoneNumber: "{second_account_phone_number}" - text: "2*1*4*{second_account_change_product}" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '36' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "CON Tafadhali weka PIN yako\n0. Nyuma" - - - name: Enter product change pin [first account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{first_profile_management_session_id_3}" - phoneNumber: "{first_account_phone_number}" - text: "2*1*4*{first_account_change_product}*{first_account_pin_number}" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '36' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "END Thank you for using the service." - - - name: Enter product change pin [second account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{second_profile_management_session_id_3}" - phoneNumber: "{second_account_phone_number}" - text: "2*1*4*{second_account_change_product}*{second_account_pin_number}" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '30' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "END Asante kwa kutumia huduma." - - - name: Fifth profile managment start menu [first account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{first_profile_management_session_id_4}" - phoneNumber: "{first_account_phone_number}" - text: "" - 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: - expected_response: "CON Balance 58.00 {token_symbol}\n1. Send\n2. My Account\n3. Help" - - - name: Fifth profile managment start menu [second account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{second_profile_management_session_id_4}" - phoneNumber: "{second_account_phone_number}" - text: "" - 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: - expected_response: "CON Salio 42.00 {token_symbol}\n1. Tuma\n2. Akaunti yangu\n3. Usaidizi" - - - name: Fifth account management menu [first account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{first_profile_management_session_id_4}" - phoneNumber: "{first_account_phone_number}" - text: "2" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '105' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "CON My account\n1. My profile\n2. Change language\n3. Check balance\n4. Check statement\n5. Change PIN\n0. Back" - - - name: Fifth account management menu [second account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{second_profile_management_session_id_4}" - phoneNumber: "{second_account_phone_number}" - text: "2" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '148' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "CON Akaunti yangu\n1. Wasifu wangu\n2. Chagua lugha utakayotumia\n3. Angalia salio\n4. Angalia taarifa ya matumizi\n5. Badilisha nambari ya siri\n0. Nyuma" - - - name: Fifth profile management menu [first account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{first_profile_management_session_id_4}" - phoneNumber: "{first_account_phone_number}" - text: "2*1" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '103' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "CON My profile\n1. Edit name\n2. Edit gender\n3. Edit location\n4. Edit products\n5. View my profile\n0. Back" - - - name: Fifth profile management menu [second account] - request: - url: "{server_url}" - data: - serviceCode: "*483*46#" - sessionId: "{second_profile_management_session_id_4}" - phoneNumber: "{second_account_phone_number}" - text: "2*1" - headers: - content-type: "application/x-www-form-urlencoded" - method: POST - response: - status_code: - - 200 - headers: - Content-Length: '104' - Content-Type: "text/plain" - verify_response_with: - function: ext.validator:validate_response - extra_kwargs: - expected_response: "CON Wasifu wangu\n1. Weka jina\n2. Weka jinsia\n3. Weka eneo\n4. Weka bidhaa\n5. Angalia wasifu wako\n0. Nyuma" + expected_response: "CON Wasifu wangu\n1. Weka jina\n2. Weka jinsia\n3. Weka umri\n4. Weka eneo\n5. Weka bidhaa\n6. Angalia wasifu wako\n0. Nyuma" - name: Second enter pin to view profile [first account] request: url: "{server_url}" data: serviceCode: "*483*46#" - sessionId: "{first_profile_management_session_id_4}" + sessionId: "{first_profile_management_session_id}" phoneNumber: "{first_account_phone_number}" - text: "2*1*5" + text: "2*1*6*{first_account_pin_number}*0*1*{first_account_given_name}*{first_account_family_name}*1*1993*{first_account_location}*{first_account_product}*2*1*6" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -1425,9 +705,9 @@ stages: url: "{server_url}" data: serviceCode: "*483*46#" - sessionId: "{second_profile_management_session_id_4}" + sessionId: "{second_profile_management_session_id}" phoneNumber: "{second_account_phone_number}" - text: "2*1*5" + text: "2*1*6*{second_account_pin_number}*0*1*{second_account_given_name}*{second_account_family_name}*2*1974*{second_account_location}*{second_account_product}*2*1*6" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -1447,9 +727,9 @@ stages: url: "{server_url}" data: serviceCode: "*483*46#" - sessionId: "{first_profile_management_session_id_4}" + sessionId: "{first_profile_management_session_id}" phoneNumber: "{first_account_phone_number}" - text: "2*1*5*{first_account_pin_number}" + text: "2*1*6*{first_account_pin_number}*0*1*{first_account_given_name}*{first_account_family_name}*1*1993*{first_account_location}*{first_account_product}*2*1*6*{first_account_pin_number}" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -1461,16 +741,16 @@ stages: verify_response_with: function: ext.validator:validate_response extra_kwargs: - expected_response: "CON Your details are:\n Name: {first_account_change_given_name} {first_account_change_family_name}\n Gender: Female\n Location: {first_account_change_location}\n You sell: {first_account_change_product}\n0. Back" + expected_response: "CON Your details are:\n Name: {first_account_given_name} {first_account_family_name}\n Gender: Male\n Age: 28\n Location: {first_account_location}\n You sell: {first_account_product}\n0. Back" - name: Second display profile [second account] request: url: "{server_url}" data: serviceCode: "*483*46#" - sessionId: "{second_profile_management_session_id_4}" + sessionId: "{second_profile_management_session_id}" phoneNumber: "{second_account_phone_number}" - text: "2*1*5*{second_account_pin_number}" + text: "2*1*6*{second_account_pin_number}*0*1*{second_account_given_name}*{second_account_family_name}*2*1974*{second_account_location}*{second_account_product}*2*1*6*{second_account_pin_number}" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -1482,16 +762,16 @@ stages: verify_response_with: function: ext.validator:validate_response extra_kwargs: - expected_response: "CON Wasifu wako una maelezo yafuatayo:\n Jina: {second_account_change_given_name} {second_account_change_family_name}\n Jinsia: Mwanaume\n Eneo: {second_account_change_location}\n Unauza: {second_account_change_product}\n0. Nyuma" + expected_response: "CON Wasifu wako una maelezo yafuatayo:\n Jina: {second_account_given_name} {second_account_family_name}\n Jinsia: Mwanamke\n Umri: 47\n Eneo: {second_account_location}\n Unauza: {second_account_product}\n0. Nyuma" - name: Return to profile management menu [first account] request: url: "{server_url}" data: serviceCode: "*483*46#" - sessionId: "{first_profile_management_session_id_4}" + sessionId: "{first_profile_management_session_id}" phoneNumber: "{first_account_phone_number}" - text: "2*1*5*{first_account_pin_number}*0" + text: "2*1*6*{first_account_pin_number}*0*1*{first_account_given_name}*{first_account_family_name}*1*1993*{first_account_location}*{first_account_product}*2*1*6*{first_account_pin_number}*0" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -1499,21 +779,21 @@ stages: status_code: - 200 headers: - Content-Length: '103' + Content-Length: '115' Content-Type: "text/plain" verify_response_with: function: ext.validator:validate_response extra_kwargs: - expected_response: "CON My profile\n1. Edit name\n2. Edit gender\n3. Edit location\n4. Edit products\n5. View my profile\n0. Back" + expected_response: "CON My profile\n1. Edit name\n2. Edit gender\n3. Edit age\n4. Edit location\n5. Edit products\n6. View my profile\n0. Back" - name: Return to profile management menu [second account] request: url: "{server_url}" data: serviceCode: "*483*46#" - sessionId: "{second_profile_management_session_id_4}" + sessionId: "{second_profile_management_session_id}" phoneNumber: "{second_account_phone_number}" - text: "2*1*5*{second_account_pin_number}*0" + text: "2*1*6*{second_account_pin_number}*0*1*{second_account_given_name}*{second_account_family_name}*2*1974*{second_account_location}*{second_account_product}*2*1*6*{second_account_pin_number}*0" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -1521,21 +801,21 @@ stages: status_code: - 200 headers: - Content-Length: '104' + Content-Length: '117' Content-Type: "text/plain" verify_response_with: function: ext.validator:validate_response extra_kwargs: - expected_response: "CON Wasifu wangu\n1. Weka jina\n2. Weka jinsia\n3. Weka eneo\n4. Weka bidhaa\n5. Angalia wasifu wako\n0. Nyuma" + expected_response: "CON Wasifu wangu\n1. Weka jina\n2. Weka jinsia\n3. Weka umri\n4. Weka eneo\n5. Weka bidhaa\n6. Angalia wasifu wako\n0. Nyuma" - name: Resume start menu [first account] request: url: "{server_url}" data: serviceCode: "*483*46#" - sessionId: "{first_profile_management_session_id_4}" + sessionId: "{first_profile_management_session_id}" phoneNumber: "{first_account_phone_number}" - text: "2*1*5*{first_account_pin_number}*0*0" + text: "2*1*6*{first_account_pin_number}*0*1*{first_account_given_name}*{first_account_family_name}*1*1993*{first_account_location}*{first_account_product}*2*1*6*{first_account_pin_number}*0*0" headers: content-type: "application/x-www-form-urlencoded" method: POST @@ -1555,9 +835,9 @@ stages: url: "{server_url}" data: serviceCode: "*483*46#" - sessionId: "{second_profile_management_session_id_4}" + sessionId: "{second_profile_management_session_id}" phoneNumber: "{second_account_phone_number}" - text: "2*1*5*{second_account_pin_number}*0*0" + text: "2*1*6*{second_account_pin_number}*0*1*{second_account_given_name}*{second_account_family_name}*2*1974*{second_account_location}*{second_account_product}*2*1*6*{second_account_pin_number}*0*0" headers: content-type: "application/x-www-form-urlencoded" method: POST diff --git a/apps/cic-ussd/tests/integration/test_transactions.tavern.yaml b/apps/cic-ussd/tests/integration/test_transactions.tavern.yaml index 9a50f012..f71e7f70 100644 --- a/apps/cic-ussd/tests/integration/test_transactions.tavern.yaml +++ b/apps/cic-ussd/tests/integration/test_transactions.tavern.yaml @@ -170,7 +170,7 @@ stages: verify_response_with: function: ext.validator:validate_response extra_kwargs: - expected_response: "CON {second_account_given_name} {second_account_family_name} {second_account_phone_number} will receive 17.00 {token_symbol} from {first_account_given_name} {first_account_family_name} {first_account_phone_number}.\nPlease enter your PIN to confirm.\n0. Back" + expected_response: "CON {second_account_phone_number} will receive 17.00 {token_symbol} from {first_account_phone_number}.\nPlease enter your PIN to confirm.\n0. Back" - name: Enter transcation amount [second account] request: @@ -191,7 +191,7 @@ stages: verify_response_with: function: ext.validator:validate_response extra_kwargs: - expected_response: "CON {first_account_given_name} {first_account_family_name} {first_account_phone_number} atapokea 25.00 {token_symbol} kutoka kwa {second_account_given_name} {second_account_family_name} {second_account_phone_number}.\nTafadhali weka nambari yako ya siri kudhibitisha.\n0. Nyuma" + expected_response: "CON {first_account_phone_number} atapokea 25.00 {token_symbol} kutoka kwa {second_account_phone_number}.\nTafadhali weka nambari yako ya siri kudhibitisha.\n0. Nyuma" - name: Pin to authorize transaction [first account] request: @@ -212,7 +212,7 @@ stages: verify_response_with: function: ext.validator:validate_response extra_kwargs: - expected_response: "CON Your request has been sent. {second_account_given_name} {second_account_family_name} {second_account_phone_number} will receive 17.00 {token_symbol} from {first_account_given_name} {first_account_family_name} {first_account_phone_number}.\n00. Back\n99. Exit" + expected_response: "CON Your request has been sent. {second_account_phone_number} will receive 17.00 {token_symbol} from {first_account_phone_number}.\n00. Back\n99. Exit" - name: Pin to authorize transaction [second account] request: @@ -233,7 +233,7 @@ stages: verify_response_with: function: ext.validator:validate_response extra_kwargs: - expected_response: "CON Ombi lako limetumwa. {first_account_given_name} {first_account_family_name} {first_account_phone_number} atapokea 25.00 {token_symbol} kutoka kwa {second_account_given_name} {second_account_family_name} {second_account_phone_number}.\n00. Nyuma\n99. Ondoka" + expected_response: "CON Ombi lako limetumwa. {first_account_phone_number} atapokea 25.00 {token_symbol} kutoka kwa {second_account_phone_number}.\n00. Nyuma\n99. Ondoka" - name: Verify balance changes [first account] delay_before: 10 diff --git a/apps/cic-ussd/transitions/age_setting_transitions.json b/apps/cic-ussd/transitions/age_setting_transitions.json index 0fe67d03..957c6ae8 100644 --- a/apps/cic-ussd/transitions/age_setting_transitions.json +++ b/apps/cic-ussd/transitions/age_setting_transitions.json @@ -12,7 +12,7 @@ { "trigger": "scan_data", "source": "enter_date_of_birth", - "dest": "enter_gender", + "dest": "enter_location", "conditions": "cic_ussd.state_machine.logic.validator.is_valid_date", "after": "cic_ussd.state_machine.logic.user.save_metadata_attribute_to_session_data", "unless": "cic_ussd.state_machine.logic.validator.has_cached_user_metadata" diff --git a/apps/cic-ussd/transitions/gender_setting_transitions.json b/apps/cic-ussd/transitions/gender_setting_transitions.json index 7881cdd7..e0d2b346 100644 --- a/apps/cic-ussd/transitions/gender_setting_transitions.json +++ b/apps/cic-ussd/transitions/gender_setting_transitions.json @@ -2,7 +2,7 @@ { "trigger": "scan_data", "source": "enter_gender", - "dest": "enter_location", + "dest": "enter_date_of_birth", "after": "cic_ussd.state_machine.logic.user.save_metadata_attribute_to_session_data", "conditions": "cic_ussd.state_machine.logic.validator.is_valid_gender_selection", "unless": "cic_ussd.state_machine.logic.validator.has_cached_user_metadata" diff --git a/apps/cic-ussd/transitions/name_setting_transitions.json b/apps/cic-ussd/transitions/name_setting_transitions.json index 7d3493e3..38b5e58c 100644 --- a/apps/cic-ussd/transitions/name_setting_transitions.json +++ b/apps/cic-ussd/transitions/name_setting_transitions.json @@ -15,7 +15,7 @@ { "trigger": "scan_data", "source": "enter_family_name", - "dest": "enter_date_of_birth", + "dest": "enter_gender", "after": "cic_ussd.state_machine.logic.user.save_metadata_attribute_to_session_data", "unless": "cic_ussd.state_machine.logic.validator.has_cached_user_metadata" }, diff --git a/apps/cic-ussd/var/lib/locale/ussd.en.yml b/apps/cic-ussd/var/lib/locale/ussd.en.yml index fae5eead..bfb6545a 100644 --- a/apps/cic-ussd/var/lib/locale/ussd.en.yml +++ b/apps/cic-ussd/var/lib/locale/ussd.en.yml @@ -55,7 +55,7 @@ en: CON My profile 1. Edit name 2. Edit gender - 3. Edit Age + 3. Edit age 4. Edit location 5. Edit products 6. View my profile diff --git a/apps/cic-ussd/var/lib/locale/ussd.sw.yml b/apps/cic-ussd/var/lib/locale/ussd.sw.yml index 8a8394e5..81690287 100644 --- a/apps/cic-ussd/var/lib/locale/ussd.sw.yml +++ b/apps/cic-ussd/var/lib/locale/ussd.sw.yml @@ -55,7 +55,7 @@ sw: CON Wasifu wangu 1. Weka jina 2. Weka jinsia - 3 Weka umri + 3. Weka umri 4. Weka eneo 5. Weka bidhaa 6. Angalia wasifu wako