[Feature] Search users / show friends / add friend / delete friend #115
Conversation
Codecov Report
@@ Coverage Diff @@
## master #115 +/- ##
==========================================
- Coverage 86.22% 83.51% -2.71%
==========================================
Files 37 37
Lines 1183 1189 +6
Branches 123 129 +6
==========================================
- Hits 1020 993 -27
- Misses 101 130 +29
- Partials 62 66 +4 |
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.
Could you rebase this and see how you can improve some of test coverage?
* Add sample error container to handle graphql error (#112) * Add sample error container for graphql error * Add error asset * Implement [ErrorView] shared component * Set timer before judging the navigation on startup * Implement [ChannelCreate] screen to start chatting with multiple users (#113) * Enhance [SearchTextInput] for [SearchUser] * Add [ChannelCreate] screen and fab in [Channel] screen * Enhance [ErrorView] and use it in EmptyListComponent - Add ability to set custom title, body, buttonText and hide button. * Implement [ChannelCreate] screen wich [CheckBox] * CheckBox toggle on press * Fix [UserListItem] child width * Add ability render tablet with testUtils * Improve test coverage * Add query to collect users * Attach apollo to collect actual data from server('hackatalk-server') * Fix tsc errors * Rebase upstream master branch * Add "MockedProvider" and clear console.error's Warning message - Add "MockedProvider" in test code - make following warning message disappear "Warning: An update to Screen inside a test was not wrapped in act" * Apollo Error Handling and add refetch typing * Add useQuery's error handling test case Co-authored-by: Hyo Chan Jang <dooboolab@gmail.com>
* Add friends * Show user name run effect if data changes * Show loading and error * Modify test code * lint * SearchUser: update test code to resolve snapshot test failure * Add friends * Show user name run effect if data changes * Show loading and error * Modify test code * lint * Fix refetch generic type * Add friends * Show user name run effect if data changes * Show loading and error * Modify test code * lint * Add friends * Fix refetch generic type * Delete comments Co-authored-by: TaeSeong Park <imf4@naver.com>
* squash commits * Revert test file back, Co-authored-by: Gordon <godon019@gmail.com> Co-authored-by: Ted Kim <dev.ted.kim@gmail.com> * remove incompatible codes Co-authored-by: Ted Kim <dev.ted.kim@gmail.com>
* Implement remove friend mutation * Implement remove friend * Refactor ProfileModal.deleteFriend, delete mutation * Refactor ProfileModal * Implement <ProfileModal/> test code * Refactor naming remove to delete * Refactor remove to delete * Fix mutation wrong argument error * Implement delete the friend in list when the friend is deleted * Fix lint * Update <ProfileModal/> test case * Update snapshots * Update readme * Delete comments * Implement to use QUERY_FRIENDS of useQuery than useFriendContext when delete a user and update friend list * Update <ProfileModal/> test code
* implement updated "users" graphql query * update "users" graphql's query variables * Update snapshot of 'ProfileModal' * Some version of PODS updated via 'pod install' * Update 'users' query and type * Implement "Relay-style cursor pagination" * Implement basic test code * Filled in Missing fields of result of 'QUERY_FRIENDS' * Add test case: "change text in SearchTextInput"
… files ``` ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. ... TypeError: stacktraceParser.parse is not a function ```
* Update props of ProfileModal * Update testcases of ProfileModal * Refactor ProfileModal.test
* Use ternary operators in rendering & add retrieved variable "isFriendAlreadyAdded" * Remove legacy codes * Figuring out what is the reason of problem when testing: " Network error: No more mocked responses for the query: query users($filter: Boolean, $user: UserQueryInput, $first: Int, $last: Int, $before: String, $after: String) " * Friend: Remove legacy code * Add "ios/assets/" to gitgnore list * Refactor funciton name & Add attribute in Props to inject from caller
@hyochan I think I ready to merge it. but ci/circleci: android returns error
maybe it's circieci's configuration problem? |
@hyochan and also I modified content of |
Thanks for the great work everyone! I'll handle the rest. |
- Checking friend been added in totally differnt way. Check the return value from the mutation query!
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.
Well done all you wonderful people!
There are few things I want to mention here.
- Try to add logics such as
useMutation
inProfileModalProvider
instead inProfileModal
itself. It is more general way as in redux container pattern. - Try to add input types for graphql along with the queries and not in which you'd like to use query.
- Add
enter
after theparagraph
. Single lines of code can stay together withoutenter
but it looks much better withnext line
if the codes are in paragraph.
For number 1, it should be enhanced in the near future.
Thank you again for all your hard work and bring things in the community.
@all-contributors please add @00aney for code, test. |
I've put up a pull request to add @00aney! 🎉 |
@all-contributors please add @qkreltms for code, test. |
I've put up a pull request to add @qkreltms! 🎉 |
Description
Features and Contributors
Related Issues
resolve #106
#98
Tests
MockedProvider
Checklist
Before you create this PR confirms that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.yarn lint && yarn tsc
yarn test
oryarn test -u
if you need to update snapshot.