-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spectre Argument Prompter #363
Conversation
and supporting test tooling
public void WhenBoolOperandMissing_Prompts() | ||
{ | ||
var testConsole = new AnsiTestConsole().Interactive(); | ||
testConsole.Input.PushCharacter('y'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tried PushCharacter, PushKey and PushText. They all fail with
No input available.
at Spectre.Console.Testing.TestConsoleInput.ReadKey(Boolean intercept) in //src/Spectre.Console.Testing/TestConsoleInput.cs:line 77
at Spectre.Console.Testing.TestConsoleInput.ReadKeyAsync(Boolean intercept, CancellationToken cancellationToken) in //src/Spectre.Console.Testing/TestConsoleInput.cs:line 83
{ | ||
var testConsole = new AnsiTestConsole().Interactive(); | ||
testConsole.Input.PushTextWithEnter("y"); | ||
testConsole.Input.PushTextWithEnter("y"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also tried PushText, PushKey, PushChar and they all failed with the following error, except... PushTextWithEnter only fails on the second prompt where the others failed on the first prompt.
No input available.
at Spectre.Console.Testing.TestConsoleInput.ReadKey(Boolean intercept) in //src/Spectre.Console.Testing/TestConsoleInput.cs:line 77
at Spectre.Console.Testing.TestConsoleInput.ReadKeyAsync(Boolean intercept, CancellationToken cancellationToken) in //src/Spectre.Console.Testing/TestConsoleInput.cs:line 83
piped input will continue to be served by our test console
To prompt for missing arguments. This works mostly as expected. We have a problem on the last Confirm for bool arguments and we need to determine the pattern to prompt for free-text lists