Button._start_active_affect
does not respect App.animation_level
#5072
Replies: 2 comments
-
We found the following entry in the FAQ which you may find helpful: Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review. This is an automated reply, generated by FAQtory |
Beta Was this translation helpful? Give feedback.
-
By using If you aren't interesting in simulating a user, you could do something like the following: await pilot.app.query(MyButton).press() |
Beta Was this translation helpful? Give feedback.
-
I think if
App.animation_level
is set to"none"
it should not run any active effect on the button. My use case is that for tests, if my pilot tries to click the same button twice in a row, it happens so fast that the-active
class is still set for the button and the click is consumed withoutself.press()
being called.My current work around is to patch this function.
mock.patch("textual.widgets._button.Button._start_active_affect")
Also nit but I think it should be start_active_effect and not start_active_affect
Beta Was this translation helpful? Give feedback.
All reactions