Comments (10)
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.
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.
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.
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.
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.
@franga2000 Are you still interested in working on this? Otherwise I'll see if I can integrate this into Catima myself.
from android.
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.
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.
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.
Fixed in #149
from android.
Related Issues (20)
- Exclude archived cards in ShortcutHelper HOT 1
- created data marix does not contain the proper information HOT 4
- Improve design of multi-barcode picker
- Sandbox PdfRenderer in a Service with android:isolatedProcess
- Highlight archived cards HOT 2
- Display loyalty cards as a text list, without thumbnails HOT 3
- Hide Card ID for binary content? HOT 2
- Loyalty card shortcut not updating with latest card information HOT 2
- About screen text can overflow into arrow HOT 1
- Proposal to Enhance Testing Infrastructure and Automate Workflows HOT 1
- Incorrect Implementation of describeContents() in LoyaltyCard Class HOT 3
- Google Play: "Can't install Catima (2.29.0)" HOT 3
- Errors in Spanish Translation HOT 1
- Cannot save balance in Arabic
- Option to disable the edit button on the lock screen HOT 3
- FR: Share text to app instead of image HOT 4
- Shortcut in control panel HOT 1
- Unable to open a card from the device control quick settings tile HOT 10
- Add an attached document (PDF) HOT 8
- can android.hardware.camera use required=false? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android.