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
Validation workflow on card #1172
Validation workflow on card #1172
Conversation
…f card name is empty
Okay, I finally have some energy to look at stuff again. Thanks for your patience :) Looking at this, it is a good start but there are few small things:
|
@TheLastProject , hope you had a nice vacation.
|
No, inside the
Thanks 😅
It doesn't, but it seems ugly to me if in the edit view of the 3 elements that can have an invalid value only 1 ever uses the red exclamation point design. It can also confuse users if different fields on the same screen reacts in a different way to having an invalid value. I guess we can skip that but I don't want to release an update if the behaviour is inconsistent so I'll have to do the other 2 fields myself then before release :) |
@TheLastProject , thanks for the clarifications. I usually think it is best to keep the PR relevant to the issue and it isn't quite apparent that you want other things to be done in the same PR. I'll work on those changes and post a comment here when I'm done. |
… to use set/getError. Also removed boolean as it is not necessary
…iew to set set/get Error
@TheLastProject , I have made the changes you requested. |
app/src/main/java/protect/card_locker/LoyaltyCardEditActivity.java
Outdated
Show resolved
Hide resolved
app/src/main/java/protect/card_locker/LoyaltyCardEditActivity.java
Outdated
Show resolved
Hide resolved
app/src/main/java/protect/card_locker/LoyaltyCardEditActivity.java
Outdated
Show resolved
Hide resolved
@TheLastProject , I have made some adjustments to the code and removed the logic you highlighted, but am still seeing the same tests failing.
As you can see all of them are probably failing for the same exact reason. I'm trying to investigate why. |
app/src/main/java/protect/card_locker/LoyaltyCardEditActivity.java
Outdated
Show resolved
Hide resolved
Hmm, I'm not quite sure why the tests are failing. But given the change still has bugs I am not very upset the tests are currently failing. The tests may become an issue later though... |
… balance and removing previous used string value
…hebrew strings file
I'm not sure what you're expecting from me. The tests are failing, so this can't be merged. |
@TheLastProject, If you take a look at startWithoutParametersCaptureBarcodeCreateLoyaltyCard test for example, you can see that:
And the test fails from this assertion. This is again, because the logic has been changed if the cardId is empty.
And,
Since you requested these changes, let me know how you would like to proceed here. |
…A in all relevant places
…com/TomerPacific/Android into feature/validation-workflow-on-card
If the tests need changing after implementing the functionality because the tests turn out to not be correct but the functionality is, sure, change them. However, from quick testing, I see some functionality is still not correct: Creating a card without filling in name
Expected: "Card name cannot be empty" warning comes from the red icon Editing saved card
Expected: No warnings, because the card was saved so should be in a correct state It is logical that tests would fail if the behaviour is not correct yet. I'd recommend first fixing the behaviour before trying to change the tests, otherwise you may be changing tests into something that doesn't actually test the right thing. |
Fixes #1149
Added logic and string literal, called card_name_is_empty, to allow to show the hint in the edit text when creating/editing a card.
Translated the value to almost all languages.