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

[DUX-1985] Test the TUI #202

Open
9999years opened this issue Mar 1, 2024 · 0 comments
Open

[DUX-1985] Test the TUI #202

9999years opened this issue Mar 1, 2024 · 0 comments
Labels
linear Created by Linear-GitHub Sync

Comments

@9999years
Copy link
Member

The --tui is cool and we need a new framework to test it. I think asciinema fits the bill.

The basic idea is:

  • Let users customize the set of log events that are printed to stdout and the set of log events that are sent to the JSON logs separately (this will let us continue to use debug- and trace-level log events to drive the tests while keeping the output identical to what users will see when running ghciwatch in typical use-cases)
  • Run tests under asciinema to record terminal output
  • Insert asciicast marker events in the recording to denote timestamps to check screenshots at
  • Use the asciicast crate to parse the asciicast files and feed the output to the avt crate to render them onto a grid of characters, then compare the expected and actual output

The big missing feature here is mouse events. I'm not sure how to send mouse events to a program in an automated fashion.

From SyncLinear.com | DUX-1985

@github-actions github-actions bot added the linear Created by Linear-GitHub Sync label Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linear Created by Linear-GitHub Sync
Projects
None yet
Development

No branches or pull requests

1 participant