statuses unit tests

This commit is contained in:
Henry Jameson 2026-08-18 18:00:36 +03:00
commit 1396eeb71b
23 changed files with 860 additions and 742 deletions

View file

@ -1,25 +1,25 @@
<template>
<article class="thread-tree">
<Status
:key="status.id"
:key="statusId"
ref="statusComponent"
:statusoid="status"
:replies="getReplies(status.id)"
:status-id="statusId"
:replies="getReplies(statusId)"
:inline-expanded="collapsable && isExpanded"
:expandable="!isExpanded"
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
:in-conversation="isExpanded"
:focused="focused === status.id || focused === status.retweeted_status?.id"
:focused="focused === statusId"
:in-profile="inProfile"
:profile-user-id="profileUserId"
class="conversation-status conversation-status-treeview status-fadein panel-body"
:simple-tree="simple"
:thread-display-status="threadDisplayStatus[status.id]"
:thread-display-status="threadDisplayStatus[statusId]"
:can-dive="canDive"
@dive="$emit('dive', status.id)"
@goto="$emit('goto', status.id)"
@dive="$emit('dive', statusId)"
@goto="$emit('goto', statusId)"
@toggle-expanded="toggleExpanded"
@suspendable-state-change="e => $emit('suspendableStateChange', e)"
/>
@ -29,10 +29,10 @@
>
<ThreadTree
v-for="replyStatus in currentReplies"
:key="replyStatus.id"
:key="replyStatusId"
ref="childComponent"
:depth="depth + 1"
:status="replyStatus"
:status-id="replyStatusId"
:in-profile="inProfile"
:conversation="conversation"
@ -67,7 +67,7 @@
tag="button"
keypath="status.thread_follow_with_icon"
class="button-unstyled -link thread-tree-show-replies-button"
@click.prevent="$emit('dive', status.id)"
@click.prevent="$emit('dive', statusId)"
>
<template #icon>
<FAIcon
@ -76,7 +76,7 @@
</template>
<template #text>
<span>
{{ $t('status.thread_follow', { numStatus: totalReplyCount[status.id] }, totalReplyCount[status.id]) }}
{{ $t('status.thread_follow', { numStatus: totalReplyCount[statusId] }, totalReplyCount[statusId]) }}
</span>
</template>
</i18n-t>
@ -86,7 +86,7 @@
tag="button"
keypath="status.thread_show_full_with_icon"
class="button-unstyled -link thread-tree-show-replies-button"
@click.prevent="showThreadRecursively(status.id)"
@click.prevent="showThreadRecursively(statusId)"
>
<template #icon>
<FAIcon
@ -95,7 +95,7 @@
</template>
<template #text>
<span>
{{ $t('status.thread_show_full', { numStatus: totalReplyCount[status.id], depth: totalReplyDepth[status.id] }, totalReplyCount[status.id]) }}
{{ $t('status.thread_show_full', { numStatus: totalReplyCount[statusId], depth: totalReplyDepth[statusId] }, totalReplyCount[statusId]) }}
</span>
</template>
</i18n-t>