Skip to content
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

Closed
wants to merge 7 commits into from
Closed

Spectre Argument Prompter #363

wants to merge 7 commits into from

Conversation

drewburlingame
Copy link
Collaborator

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

and supporting test tooling
@drewburlingame drewburlingame changed the base branch from master to spectre October 28, 2021 13:04
public void WhenBoolOperandMissing_Prompts()
{
var testConsole = new AnsiTestConsole().Interactive();
testConsole.Input.PushCharacter('y');
Copy link
Collaborator Author

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");
Copy link
Collaborator Author

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

@drewburlingame drewburlingame deleted the spectre-prompt branch November 3, 2021 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant