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

Rework unit tests #336

Open
PoignardAzur opened this issue Apr 17, 2024 · 0 comments
Open

Rework unit tests #336

PoignardAzur opened this issue Apr 17, 2024 · 0 comments
Labels
masonry Issues relating to the Masonry widget layer

Comments

@PoignardAzur
Copy link
Contributor

Masonry currently has a bunch of tests that check basic features of the widget-handling code (eg that focus is properly updated when a textbox is disabled).

However, these tests depend on the Command event, which is being removed as part of the Winit refactor to simplify the code. Since making these tests work without commands is complex, and the features being tested are subject to change anyway, some of those tests will be temporarily commented-out.

On the long term, these tests should be added back. This involves multiple steps:

  • Implement a Harness::get_widget_mut(WidgetId) method as a substitute for targeting changes through commands.
  • Update various helper widgets to work with WidgetMut.
  • Go over basic widget-handling features and documenting what should happen in what conditions. For each expected behavior, create or repurpose a test.

I expect the steps to be implemented some time shortly after the Winit refactor.

@PoignardAzur PoignardAzur added the masonry Issues relating to the Masonry widget layer label Apr 19, 2024
@DJMcNab DJMcNab transferred this issue from linebender/masonry Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
masonry Issues relating to the Masonry widget layer
Projects
None yet
Development

No branches or pull requests

1 participant