praekelt/vumi-jssandbox-toolkit — pull request #189 by justinvdm (2014-06-10 20:50:38+00:00)
Title: Allow multiple inputs to be given in tests

Sometimes people need to send multiple inputs in a single test, for example, to test a state with multiple screens (`BookletState` and `PaginatedChoiceState`), or to test how their app handles a particular path of inputs.

The way this is done at the moment is to manually enter the state metadata and creator opts. This is confusing, and it is often possible for the states to behave differently in tests than in production because of badly set up metadata or creator opts.

The plan is to allow `tester.input()` to accept an array of inputs (on top of what it already accepts). Setups will only count for the first interaction, subsequent interactions will rely on the user data from the previous interaction, and checks will only happen after the last interaction.