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

Disable konfetti for instrumentation tests #39

Closed
premnirmal opened this issue Jan 16, 2018 · 3 comments
Closed

Disable konfetti for instrumentation tests #39

premnirmal opened this issue Jan 16, 2018 · 3 comments
Labels

Comments

@premnirmal
Copy link

premnirmal commented Jan 16, 2018

Is there a way to do this accommodate this in to the library without explicitly disabling konfetti in instrumentation tests?

@DanielMartinus
Copy link
Owner

DanielMartinus commented Jan 28, 2018

Sorry I have no idea what you precisely mean

@premnirmal
Copy link
Author

premnirmal commented Jan 28, 2018

When running instrumentation tests on Android, animations should be disabled. If you disable animations on your device via developer settings, app animations should be disabled. For example: the android progress bar does not spin when running instrumentation tests-this is correct implementation.

The konfetti animation still runs when animations are disabled, and it also runs in instrumentation tests. This suggests that the library isn't adhering to Android guidelines.

An application developer should not have to write code that manually disables the konfetti animation in tests, the library should do that automatically.

Does that make sense?

@DanielMartinus
Copy link
Owner

DanielMartinus commented Feb 8, 2018

Ok, that makes sense. Konfetti currently implements a game-loop mechanism for updating the canvas. This is indeed running independent from the Animations of Android hence you're not able to turn them off, control the animation speed or by default disable instrumental tests.

I'll have to find out if support is available in the api of the platform to detect if the instrumental tests are running. If you have any pointers, any help is welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants