e2e tests with node tap
This repository has been archived on 2022-03-31. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Mohamed Sohail aff3177395
project: (init) ussd-e2e
2022-03-24 19:38:49 +03:00
tests project: (init) ussd-e2e 2022-03-24 19:38:49 +03:00
.gitignore project: (init) ussd-e2e 2022-03-24 19:38:49 +03:00
.taprc project: (init) ussd-e2e 2022-03-24 19:38:49 +03:00
README.md project: (init) ussd-e2e 2022-03-24 19:38:49 +03:00
lib.js project: (init) ussd-e2e 2022-03-24 19:38:49 +03:00
package.json project: (init) ussd-e2e 2022-03-24 19:38:49 +03:00
yarn.lock project: (init) ussd-e2e 2022-03-24 19:38:49 +03:00

README.md

cic-ussd-e2e

Mocking user interaction with cic-ussd

Setup

Pre-requisites

2 accounts each with:

  • Initial pin set
  • Some SRF Balance

Environment

  • Node.js
  • Install dependencies with $ npm i

Running tests

$ npm run test

Scenarios

Test Description
1_initial_menu Main menu > Help > Exit
2_display_sarafu Main menu > My Sarafu > Exit

Writing your own scenario

  • Each scenario should exit since this test suite doesn't pass around past session info
  • Control wait between menus with the wait(time in ms) function
  • Follow any spec
  • For any traversing through menus, remember to append a * and the next input, this is to correctly mock AT webhooks e.g.
# Initial Main menu, no input
""
# Input 1
"1"
# Input 2
"1*2"
# Input 99
"1*2*99"