Skip to content
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

Added tests for capturing createdAt values and list function behavior #273

Merged
merged 8 commits into from
Feb 21, 2024

Conversation

cameronvoell
Copy link
Contributor

@cameronvoell cameronvoell commented Feb 20, 2024

This PR adds tests for checking the order returned from list(), listGroups(), and listAll(), stream(), streamGroups(), and streamAll(), and compares createdAt field of items returned from list functions to createdAt field of items returned by createGroup/Conversation functions.

My recommendation is to merge these new tests with the comments they have about where behavior is currently inconsistent between android and iOS. We can then update the tests as the below issues are fixed.

Android iOS

Issues Documented in the tests:

listGroups issues: See #276

  1. conversations.listGroups() returns in reverse chronological on iOS, and chronological order on Android
  2. createdAt field returned by listGroups() does not match the createdAt of group returned by createGroup function on Android when the group was created by someone other than the client who called listGroups()

list / listAll issues: See #277

  1. conversations.listAll() sets values to createdAt for groups that do not match the values of createdAt returned from createGroup function.
  2. list() and listAll() methods for conversations returns in Chronological order for iOS and reverse Chronological order for Android

stream/streamAll issue: See #278

  • Both stream() and streamAll() the createAt value of a group returned does not match the createdAt value of the group returned by the createGroup() method on Android only.

Base automatically changed from cv/example-app-ui-improve-1 to beta February 20, 2024 21:12
@cameronvoell cameronvoell marked this pull request as ready for review February 21, 2024 01:06
@cameronvoell cameronvoell requested a review from a team as a code owner February 21, 2024 01:06
// BUG - List returns in Reverse Chronological order on iOS
// and Chronological order on Android
const first = isIos() ? 1 : 0
const second = isIos() ? 0 : 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a tracking issue for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#276, and there's two more issues linked in the description 👍

@cameronvoell cameronvoell merged commit 1af1972 into beta Feb 21, 2024
5 of 6 checks passed
@cameronvoell cameronvoell deleted the cv/created-at-tests branch February 21, 2024 03:11
Copy link
Contributor

🎉 This PR is included in version 1.28.0-beta.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link
Contributor

🎉 This PR is included in version 1.30.0-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link
Contributor

🎉 This PR is included in version 1.31.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants