Updated test mocks and logic to consistently use lowercase 'monalisa' for login names and display names for user assignees. Improved handling of dynamic assignee fetching in interactive flows by relying on searchFunc and metadata population, and clarified logic in FetchOptions to fetch assignees only when necessary. These changes ensure more accurate simulation of interactive assignment and better test coverage for actor assignee features.
Refactored the MultiSelectWithSearch function and related interfaces to use a MultiSelectSearchResult struct instead of multiple return values. This change improves clarity and extensibility of the search function signature, and updates all usages, mocks, and tests accordingly.
Added a comment explaining how to enable logging in expect-based tests by using expect.WithLogger. This helps developers debug by printing characters read to stdout.
Initial implementation of MultiSelectWithSearch:
- Implement by survey and accessible prompters. They use the same internal func under the hood.
- Implement in `gh preview prompter` for initial testing and demonstration
- Implement interface changes across the codebase and mocks to satisfy compiler.
- Implement tests for new MultiSelectWithSearch prompter
* Improve assertion for disabled echo
Signed-off-by: Babak K. Shandiz <babakks@github.com>
* Use `expect.RegExpPattern`
Signed-off-by: Babak K. Shandiz <babakks@github.com>
---------
Signed-off-by: Babak K. Shandiz <babakks@github.com>
- added support for `accessible_colors` configuration setting in `gh config` commandset
- updated default configuration file to contain `accessible_colors: disabled`
- add `GH_ACCESSIBLE_COLORS` env var to `gh environment`
- generated mocks via `go generate ./...` including previously missed prompter changes
This test was trying to block on `expect`’ing a string at the same
time the prompt was completed.
This doesn't need to happen for this test. It should just check for
the output from the Input prompt invocation.
Apparently, `gh` might not actually have an editor at the time we're prompting
the user if they want to use it for markdown editing. In the survey package,
there is a function that will handle fallback to the default editor based on
environment variables and parse it in the case the editor contains flags and
arguments for cases like Visual Studio Code.
Additionally, there are no tests for the EditorName function and the fact it
is loaded via `init` makes this difficult to test.
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>