-
Notifications
You must be signed in to change notification settings - Fork 8
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
[PR] Using Riverpod and REST API in Phoenix #28
Conversation
Codecov Report
@@ Coverage Diff @@
## master #28 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 6 6
Lines 84 84
=========================================
Hits 84 84
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@LuchoTurtle can you please pick this up after you have looked into: #27 (comment) 🙏 |
I'm taking this up as part of dwyl/product-roadmap#40. This PR is a bit outdated so I had some trouble having to get it working with newer Flutter versions. Had to work on upgrading the dependencies, changing Podfiles, The tests don't work on my computer, though. I'm looking at doing a semi-overhaul to this repo, to update it and using Though we ought to discuss this further on tomorrow's standup. Still, there is work to be done until then so I'll be doing this. |
I fixed some bugs where the user couldn't create todos and properly check them. The tests weren't working and I got one fixed, which took too much time for what it was worth. It feels like I'm fighting an uphill battle with this because I'm dealing with outdated specs and generated files on both Android and Apple, so there is a lot of unexpected behavior with this. This PR deals with an outdated version of Getting a single integration test to run was time-consuming, having resulted in lots of workarounds just to get it working. For example, here's a snippet testing a simple widget so it was workable when calling Widget testWidget = Localizations(
locale: const Locale('en', 'US'),
delegates: const <LocalizationsDelegate<dynamic>>[
DefaultWidgetsLocalizations.delegate,
DefaultMaterialLocalizations.delegate,
],
child: MediaQuery(
data: new MediaQueryData(),
child: Material(
child: ProviderScope(
overrides: [
todolistProvider.overrideWith((ref) {
return todoList;
})
],
// Our application, which will read from todoListProvider to display the todo-list.
// You may extract this into a MyApp widget
child: Scaffold(body: TodoListWidget()))))); I feel like this is not sustainable if I want to get this out quickly. I'm bringing this up in tomorrow's standup but I feel like I should revamp this repo with a newly-generated project and follow Additionally, I think this repo gains importance as it is related to the It's up to you though, this is my recommendation as I feel like I'm wasting more time than what it's worth. If you give me the green light, I'll continue to work on this PR but "start from scratch" (not really but you get my point). |
Thank you for this very insightful comment on |
Going to go ahead and start from scratch but using the same pieces of code written by @SimonLab on the new one so his efforts don't go to waste 👍 |
@LuchoTurtle Thanks for sharing your progress + plans. Very insightful. 💡 Good luck on your quest. 👌 |
@LuchoTurtle nice one. thanks for the update. hope you have a great weekend. ☀️ 🙌 |
I will now resume this task, following the creation of dwyl/phoenix-todo-list-tutorial#60. |
I'm basically finished with this when it comes to implementation. I have tests on my local change but I haven't committed them because they are falling and I'm pulling my hair as to why. I shall continue tomorrow. I'm also finishing the README to make use of the API. |
Created a "repositoryProvider" that is used to fetch the repository instance. We can mock "repositoryProvider" when testing.
Had to fix the tests that were failing. Took a while to figure out how I could mock HTTP requests when using providers from All these changes were reflected in the README as well, which is basically finalized at this point. Now I'm going to be focusing on finishing the tests so I get back to 100% coverage and push the changes. |
This should be ready for review. Added the tests, fixed typos and re-wrote the README according to changes needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent Work @SimonLab & @LuchoTurtle 🎉
ref: #18
and secondarily #27