mirror of
https://github.com/mattermost/mattermost-mobile.git
synced 2026-11-07 19:30:14 +00:00
Two findings from an expert review pass over the run-32126493462 failures.
app/actions/remote/post.test.ts — the patchPost mock had the wrong signature. The
client takes a single object (`patchPost(postPatch: Partial<Post> & {id: string})`,
app/client/rest/posts.ts:64) and editPost calls it as
`client.patchPost({message, id, file_ids})`, but the mock destructured two
positional args `(message: string, postId: string)`. So it received the object as
`message`, `undefined` as `postId`, and every editPost test asserted against a
post whose id was undefined and whose message was an object. Corrected, and added
a test that asserts the edited body actually lands in the database — it fails with
the old mock (`Expected: "edited message content" Received: ""`) and passes with
the new one, so the mock bug is real and now covered.
custom_status/index.tsx — clearCustomStatus discarded the result of
updateLocalCustomStatus. The call was not awaited and its `{error}` was dropped, so
a failed local write left the row showing a status the server had already cleared,
with no retry affordance and nothing logged. Await it and raise the existing retry
message, matching the branch above it that already does this for unsetCustomStatus.
To be clear about scope: this is the dropped-error path, not a root cause for
MM-T4990_4 / MM-T3891. Awaiting does not make observeCurrentUser emit any sooner,
so it cannot by itself explain a 20s assertion failure. Those two remain open.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| actions | ||
| client | ||
| components | ||
| constants | ||
| context | ||
| database | ||
| helpers | ||
| hooks | ||
| i18n | ||
| init | ||
| keyboard | ||
| managers | ||
| products | ||
| queries | ||
| routes | ||
| screens | ||
| store | ||
| utils | ||