Skip to content

Commit 520b4bb

Browse files
committed
Update tests
1 parent d99e1b6 commit 520b4bb

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

tests/actions/ReportTest.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5429,9 +5429,11 @@ describe('actions/Report', () => {
54295429
expect(pendingResponse?.reportAction.actorAccountID).toBe(CONST.ACCOUNT_ID.CONCIERGE);
54305430
expect(pendingResponse?.displayAfter).toBeGreaterThan(Date.now() - CONCIERGE_RESPONSE_DELAY_MS);
54315431

5432-
// Verify the typing indicator was set
5432+
// Verify the client did NOT set REPORT_USER_IS_TYPING. The server-owned
5433+
// agentZeroProcessingIndicator is the source of truth for the "Concierge is thinking..."
5434+
// state during the delayed pre-generated response window.
54335435
const typingStatus = await getOnyxValue(`${ONYXKEYS.COLLECTION.REPORT_USER_IS_TYPING}${REPORT_ID}` as const);
5434-
expect(typingStatus?.[CONST.ACCOUNT_ID.CONCIERGE]).toBe(true);
5436+
expect(typingStatus?.[CONST.ACCOUNT_ID.CONCIERGE]).toBeFalsy();
54355437
});
54365438

54375439
it('should create Concierge response with timestamp strictly after the user comment', async () => {

tests/unit/hooks/usePendingConciergeResponse.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ describe('usePendingConciergeResponse', () => {
6767
const pendingResponse = await getOnyxValue(`${ONYXKEYS.COLLECTION.PENDING_CONCIERGE_RESPONSE}${REPORT_ID}` as const);
6868
expect(pendingResponse).toBeUndefined();
6969

70-
// And the typing indicator should be cleared
70+
// And the typing state should be left untouched
7171
const typingStatus = await getOnyxValue(`${ONYXKEYS.COLLECTION.REPORT_USER_IS_TYPING}${REPORT_ID}` as const);
72-
expect(typingStatus?.[CONST.ACCOUNT_ID.CONCIERGE]).toBe(false);
72+
expect(typingStatus?.[CONST.ACCOUNT_ID.CONCIERGE]).toBe(true);
7373
});
7474

7575
it('should not move the action before the delay elapses', async () => {
@@ -175,9 +175,9 @@ describe('usePendingConciergeResponse', () => {
175175
const pendingResponse = await getOnyxValue(`${ONYXKEYS.COLLECTION.PENDING_CONCIERGE_RESPONSE}${REPORT_ID}` as const);
176176
expect(pendingResponse).toBeUndefined();
177177

178-
// And the typing indicator should be cleared
178+
// And the typing state should be left untouched
179179
const typingStatus = await getOnyxValue(`${ONYXKEYS.COLLECTION.REPORT_USER_IS_TYPING}${REPORT_ID}` as const);
180-
expect(typingStatus?.[CONST.ACCOUNT_ID.CONCIERGE]).toBe(false);
180+
expect(typingStatus?.[CONST.ACCOUNT_ID.CONCIERGE]).toBe(true);
181181
});
182182

183183
it('should do nothing when there is no pending response', async () => {

0 commit comments

Comments
 (0)