mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-11-01 08:12:43 +00:00
test(integration): verify unread/starred cross views keep the acted-on row
Adds 11-cross-view-retain.spec.ts: with the Unread cross view open, reading a mail keeps it in the list (status + unread counter update only, no removal); with the Starred cross view open, un-starring keeps it. Both force the focus/push refresh that previously dropped the row and assert it survives. Supporting test hooks: - thread-list-item: expose data-starred on the row. - email-context-menu: testId ctx-star / ctx-unstar on the star item. - integration helpers: expectEmailStarred (app.ts), setFlagged (jmap.ts). - integration policy.json: enable crossStarredViewEnabled. Verified: 08-shared-moves-style run of 11-cross-view-retain → 2/2 passed against the dockerized stack.
This commit is contained in:
@@ -372,6 +372,7 @@ export function EmailContextMenu({
|
||||
label={isStarred ? t("unstar") : t("star")}
|
||||
onClick={() => handleAction(onToggleStar!)}
|
||||
disabled={!onToggleStar}
|
||||
testId={isStarred ? "ctx-unstar" : "ctx-star"}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
||||
@@ -190,6 +190,7 @@ const SingleEmailItem = React.forwardRef<HTMLDivElement, SingleEmailItemProps>(
|
||||
data-email-id={email.id}
|
||||
data-subject={email.subject || ''}
|
||||
data-unread={isUnread ? 'true' : 'false'}
|
||||
data-starred={email.keywords?.$flagged ? 'true' : 'false'}
|
||||
className={cn(
|
||||
"relative group cursor-pointer select-none transition-shadow duration-200 border-b border-border overflow-hidden",
|
||||
resolvedRowTint ? resolvedRowTint : (
|
||||
|
||||
Reference in New Issue
Block a user