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.
cic-ussd-e2e/README.md

49 lines
895 B
Markdown
Raw Normal View History

2022-03-24 17:40:15 +01:00
# cic-ussd-e2e
2022-03-24 17:38:49 +01:00
> Mocking user interaction with cic-ussd
2022-03-24 17:40:15 +01:00
## Setup
2022-03-24 17:38:49 +01:00
**Pre-requisites**
2 accounts each with:
- Initial pin set
- Some SRF Balance
**Environment**
- Node.js
- Install dependencies with `$ npm i`
2022-03-24 17:40:15 +01:00
## Running tests
2022-03-24 17:38:49 +01:00
```bash
$ npm run test
```
2022-03-24 17:40:15 +01:00
## Scenarios
2022-03-24 17:38:49 +01:00
| Test | Description |
| ---------------- | ---------------------------- |
| 1_initial_menu | Main menu > Help > Exit |
| 2_display_sarafu | Main menu > My Sarafu > Exit |
2022-03-24 17:40:15 +01:00
### Writing your own scenario
2022-03-24 17:38:49 +01:00
- 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
2022-03-24 17:40:15 +01:00
- For any menu traversal, remember to append a `*` before the next input, this correctly mocks AT webhooks e.g.
2022-03-24 17:38:49 +01:00
```bash
# Initial Main menu, no input
""
# Input 1
"1"
# Input 2
"1*2"
# Input 99
"1*2*99"
```