android / android/socialite

Android tests are failing

Open
#122 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
721
Forks
162
PR merge metrics
No merged PRs in 30d

Description

The tests that assert the pre-populated message count are failing due to the deletion logic in the 'Add second message' feature, which results in only one pre-populated message.

The expected message count is 2, but actual message count is 1.

```
fun SupportSQLiteDatabase.populateInitialData() {
...

// Add second message <<< This one is removed.
insert(
table = "Message",
conflictAlgorithm = SQLiteDatabase.CONFLICT_NONE,
values = ContentValues().apply {
put("id", (index * 2).toLong() + 1L)
put("chatId", chatIds[index])
put("senderId", contact.id)
put("text", "I will reply in 5 seconds")
put("timestamp", now + chatIds[index])
},
)
...
}
```

Contributor guide

Open the contributing guide

Research direction

Run the failing Android tests and inspect populateInitialData(), especially the deletion logic around the “Add second message” feature. Confirm why the inserted second Message is removed, then verify the pre-populated data contains two messages per expected case and the tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin, sqlite
Domain
database, mobile, testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.