Coder Social home page Coder Social logo

Comments (8)

VictorAlbertos avatar VictorAlbertos commented on August 17, 2024 1

@johnjohndoe I thin this is the exactly opposite scenario ;)

@twyatt Yes. I think I'm going to document the issue. Thanks for your feedback!

from deviceanimationtestrule.

VictorAlbertos avatar VictorAlbertos commented on August 17, 2024

Thanks @twyatt for your feedback :)

The problem is that I do not know what would be the best approach to deal with this limitation.

Because this library is meant to be used only for integration testing, so, I think that targeting to api 21 would be more a burden that nothing else. Because doing that, the user of this library is going to need to override the min sdk set by this library ad hoc. Because no one is going to set 21 as the min target xD. But, this requirement is only for the device in which the test are going to be run.

So, what do you think? Any better ideas?

Thanks!

from deviceanimationtestrule.

johnjohndoe avatar johnjohndoe commented on August 17, 2024

@twyatt In case you did not see @VictorAlbertos' post on how to bypass the minSdkVersion limitation.

from deviceanimationtestrule.

twyatt avatar twyatt commented on August 17, 2024

@VictorAlbertos, from what I can find (Disabling Animations in Espresso for Android Testing and Gist: Disable animations for Espresso tests), it seems that issuing adb commands would be necessary for disabling animations pre API 21? Which is probably outside the scope of what you intended for this project?

That being said, perhaps it would be helpful to have the API limitation documented? When I stumbled on this gem I assumed it worked down to API 16 (based on the build.gradle in the sample app).

from deviceanimationtestrule.

johnjohndoe avatar johnjohndoe commented on August 17, 2024

@VictorAlbertos Maybe, I misunderstand the issue.
@twyatt For completeness - this article on "Setting animation scale for Android UI tests" might interest you.

from deviceanimationtestrule.

twyatt avatar twyatt commented on August 17, 2024

@johnjohndoe Thanks for linking the article!

Although I'm not sure what is going wrong for me, as neither the method discussed in the article (nor the Gradle plugin mentioned) worked for me. 😢

Even tried issuing adb commands (as mentioned in tasomaniac's comment) without success.

So, I still have yet to find a reliable means of disabling animations for testing (that is compatible pre API 21) without having to manually update settings on every emulator.

from deviceanimationtestrule.

tir38 avatar tir38 commented on August 17, 2024

May I suggest some sort of fail safe that checks API level before executing this code? Right now, if I run tests on API < 21 i'll just see a crash with no indication of why. It would be nice if I either got a log warning "Hey we were unable to turn off animations", or at the very least just do nothing (i.e. keep animations turned on)

from deviceanimationtestrule.

VictorAlbertos avatar VictorAlbertos commented on August 17, 2024

@tir38 do you care to submit a PR? Thanks.

from deviceanimationtestrule.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.