@@ -125,9 +125,6 @@ async def exec_test(turn_context: TurnContext) -> None:
125
125
test_flow4 = await test_flow3 .send ("Give me twenty meters of cable" )
126
126
await test_flow4 .assert_reply ("You asked me for '20' meters of cable." )
127
127
128
- # TODO: retry_prompt in NumberPrompt appears to be broken
129
- # It when NumberPrompt fails to receive a number, it retries, prompting
130
- # with the prompt and not retry prompt in options
131
128
async def test_number_prompt_retry (self ):
132
129
async def exec_test (turn_context : TurnContext ) -> None :
133
130
dialog_context : DialogContext = await dialogs .create_context (turn_context )
@@ -161,14 +158,11 @@ async def exec_test(turn_context: TurnContext) -> None:
161
158
dialogs .add (number_prompt )
162
159
163
160
step1 = await adapter .send ("hello" )
164
- await step1 .assert_reply ("Enter a number." )
165
- # TODO: something is breaking in the validators or retry prompt
166
- # where it does not accept the 2nd answer after reprompting the user
167
- # for another value
168
- # step3 = await step2.send("hello")
169
- # step4 = await step3.assert_reply("You must enter a number.")
170
- # step5 = await step4.send("64")
171
- # await step5.assert_reply("Bot received the number '64'.")
161
+ step2 = await step1 .assert_reply ("Enter a number." )
162
+ step3 = await step2 .send ("hello" )
163
+ step4 = await step3 .assert_reply ("You must enter a number." )
164
+ step5 = await step4 .send ("64" )
165
+ await step5 .assert_reply ("Bot received the number '64'." )
172
166
173
167
async def test_number_uses_locale_specified_in_constructor (self ):
174
168
# Create new ConversationState with MemoryStorage and register the state as middleware.
@@ -272,13 +266,12 @@ async def validator(prompt_context: PromptValidatorContext):
272
266
273
267
step1 = await adapter .send ("hello" )
274
268
step2 = await step1 .assert_reply ("Enter a number." )
275
- await step2 .send ("150" )
276
- # TODO: something is breaking in the validators or retry prompt
277
- # where it does not accept the 2nd answer after reprompting the user
278
- # for another value
279
- # step4 = await step3.assert_reply("You must enter a positive number less than 100.")
280
- # step5 = await step4.send("64")
281
- # await step5.assert_reply("Bot received the number '64'.")
269
+ step3 = await step2 .send ("150" )
270
+ step4 = await step3 .assert_reply (
271
+ "You must enter a positive number less than 100."
272
+ )
273
+ step5 = await step4 .send ("64" )
274
+ await step5 .assert_reply ("Bot received the number '64'." )
282
275
283
276
async def test_float_number_prompt (self ):
284
277
async def exec_test (turn_context : TurnContext ) -> None :
0 commit comments