Describe the bug
We had a custom setUserInput that allowed us to use RegEx in our definitions of QR buttons, to account for different times of day. Previously the transcript object that was passed to the setUserInput contained the 'actual' values, having been updated by the line transcript.steps = transcriptSteps.filter(s => s) (currently line 532 in src/scripting/Convo.js) at the end of each loop of the iteration of conversation.
However, since commit 119cd1dcd438120f888cb7e88e02e2fde58bc2db, the transcript.steps = transcriptSteps.filter(s => s) line has moved to the finally block, where it is not called until after the end of the loop that begins on line 278 of src/scripting/Convo.js (previously that code block was called as a callback after each iteration of the mapSeries. This means that during the conversation, the custom setUserInput does not have access to the transcript (which includes the actual values).
To Reproduce
Write a custom setUserInput and see that the transcript parameter is an empty array when it is called.
Expected behavior
The transcript array should contain the values, rather than be an empty array.
Botium Version
Botium Core 1.12.2 (latest)
Proposed Fix
Either move the line back into the loop, or update lines 310, 311 and 312 to mirror
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the bug We had a custom setUserInput that allowed us to use RegEx in our definitions of QR buttons, to account for different times of day. Previously the
transcript
object that was passed to the setUserInput contained the 'actual' values, having been updated by the linetranscript.steps = transcriptSteps.filter(s => s)
(currently line 532 insrc/scripting/Convo.js
) at the end of each loop of the iteration ofconversation
.However, since commit
119cd1dcd438120f888cb7e88e02e2fde58bc2db
, thetranscript.steps = transcriptSteps.filter(s => s)
line has moved to thefinally
block, where it is not called until after the end of the loop that begins on line 278 ofsrc/scripting/Convo.js
(previously that code block was called as a callback after each iteration of themapSeries
. This means that during the conversation, the custom setUserInput does not have access to the transcript (which includes the actual values).To Reproduce Write a custom setUserInput and see that the transcript parameter is an empty array when it is called.
Expected behavior The transcript array should contain the values, rather than be an empty array.
Botium Version Botium Core 1.12.2 (latest)
Proposed Fix Either move the line back into the loop, or update lines 310, 311 and 312 to mirror
(adding transcriptSteps to the
...rest
argument)