Code Monkey home page Code Monkey logo

Comments (10)

TheLastProject avatar TheLastProject commented on July 20, 2024 1

Yeah, both features are pretty much good, just some unit tests and/or cleanups. You will have to make new PRs though and point them towards this repo (TheLastProject/Catima) I'm afraid, because Loyalty Card Keychain is no longer actively developed. But I'd still happily include these features.

from android.

TheLastProject avatar TheLastProject commented on July 20, 2024

Comment by brarcher
Saturday Oct 26, 2019 at 18:59 GMT


Thanks for the change.

Do you think it would be possible to test this change in Robolectric? There are tests for this activity in LoyaltyCardViewActivityTest. There are a few tests which set settings. I've not tested window flags before to see if they are set, but I'm expecting it is possible. Could you look into adding a simple test?

from android.

TheLastProject avatar TheLastProject commented on July 20, 2024

Comment by franga2000
Monday Oct 28, 2019 at 11:20 GMT


I doubt the kind of testing that Robolectric does would be of much use here. From what I've read about it, the best we could do is test whether the flags were actually set, but that would effectively just test whether the Window.addFlags method works.

A more interesting test would be whether the actual functionality of "screen doesn't time out" and "window stays above lock screen" works, but that would require something that runs on a full system. UIAutomator might be able to do it, but I'm not 100%.

from android.

TheLastProject avatar TheLastProject commented on July 20, 2024

Comment by brarcher
Friday Nov 01, 2019 at 04:53 GMT


I doubt the kind of testing that Robolectric does would be of much use here. From what I've read about it, the best we could do is test whether the flags were actually set, but that would effectively just test whether the Window.addFlags method works.

I think that a Robolectric test would ensure that the behavior of setting/clearing the setting has the expected behavior on the Window's flag. I'd count that as a success! The UI Automator would be more interesting, however the test setup I have for the project does not easily support running an emulator, so I'd like to avoid that path if possible.

Is it OK to add a Robolectric test for the setting, showing that the Window flags are set as expected?

from android.

TheLastProject avatar TheLastProject commented on July 20, 2024

Comment by franga2000
Friday Nov 01, 2019 at 18:04 GMT


Ok. I'll add in the following week when I get back to by workstation.

from android.

TheLastProject avatar TheLastProject commented on July 20, 2024

@franga2000 Are you still interested in working on this? Otherwise I'll see if I can integrate this into Catima myself.

from android.

franga2000 avatar franga2000 commented on July 20, 2024

Wow, I completely forgot about this! 😅 I probably won't be able to work on this before the holidays, as I'm currently swimming in work, but if you don't mind waiting until then I can do it. I was actually using my version with this change for almost a year and it worked flawlessly, so I'm guessing it just needs some cleanup.

Same goes for #51

from android.

TheLastProject avatar TheLastProject commented on July 20, 2024

Well, we're almost three months further. So if I don't hear from you soon I will try to hook your old code into Catima myself unless you mind :)

from android.

franga2000 avatar franga2000 commented on July 20, 2024

I really need to start keeping a list of open PRs, because this is like the 5th one I've forgotten about in the last like 6 months 🤦...

Sorry about the wait! I just rebased the changes, sent a PR and am currently fixing the half-finished test code I wrote for the original PR.

from android.

TheLastProject avatar TheLastProject commented on July 20, 2024

Fixed in #149

from android.

Related Issues (20)

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.