From 22aee38b5c8e23ff663a52f1ee053e12fe267cd1 Mon Sep 17 00:00:00 2001 From: Kyle Hoehns <9507268+kylehoehns@users.noreply.github.com> Date: Wed, 10 Dec 2025 11:44:48 -0600 Subject: [PATCH] send test expectations after teammate accepts --- src/bot/__tests__/acceptReviewRequest.test.ts | 8 ++++++++ src/bot/acceptReviewRequest.ts | 5 +++++ src/services/__tests__/ChatService.test.ts | 9 +-------- src/utils/RequestBuilder.ts | 4 ---- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/bot/__tests__/acceptReviewRequest.test.ts b/src/bot/__tests__/acceptReviewRequest.test.ts index f04a8950..3f9b261f 100644 --- a/src/bot/__tests__/acceptReviewRequest.test.ts +++ b/src/bot/__tests__/acceptReviewRequest.test.ts @@ -48,6 +48,13 @@ describe('acceptReviewRequest', () => { text: "_Don't have a HackerRank account? Ping <@requester123> and they'll make one for you._", }, }; + const expectedTestInfoBlock = { + type: 'section', + text: { + type: 'mrkdwn', + text: '*Test Information:*\nThe test has 4 questions: 2 easy and 2 medium difficulty.\nSection 1 contains the easy questions, Section 2 contains the medium questions.\nCandidates should try to solve one problem from each section.\nThey have 70 minutes total to complete the test.', + }, + }; async function callHandleAccept() { const action = buildMockActionParam(); @@ -138,6 +145,7 @@ describe('acceptReviewRequest', () => { expectedHackerRankUrlBlock, expectedHackerRankInstructionsBlock, expectedHackerRankAccountHelpBlock, + expectedTestInfoBlock, ); expect(reviewCloser.closeReviewIfComplete).toHaveBeenCalledWith(app, '123'); }); diff --git a/src/bot/acceptReviewRequest.ts b/src/bot/acceptReviewRequest.ts index 980a510f..01588a98 100644 --- a/src/bot/acceptReviewRequest.ts +++ b/src/bot/acceptReviewRequest.ts @@ -102,6 +102,11 @@ export const acceptReviewRequest = { `_Don't have a HackerRank account? Ping ${mention({ id: review.requestorId })} and they'll make one for you._`, ), ); + blocks.push( + textBlock( + '*Test Information:*\nThe test has 4 questions: 2 easy and 2 medium difficulty.\nSection 1 contains the easy questions, Section 2 contains the medium questions.\nCandidates should try to solve one problem from each section.\nThey have 70 minutes total to complete the test.', + ), + ); await chatService.updateDirectMessage(client, user.id, messageTimestamp, blocks); await userRepo.markNowAsLastReviewedDate(user.id); diff --git a/src/services/__tests__/ChatService.test.ts b/src/services/__tests__/ChatService.test.ts index d6c919b2..c28b6e80 100644 --- a/src/services/__tests__/ChatService.test.ts +++ b/src/services/__tests__/ChatService.test.ts @@ -76,14 +76,7 @@ describe('ChatService', () => { *Candidate Type: ${candidateTypeDisplay}* -*The review is needed by end of day Today* - -*Test Information:* - -The test has 4 questions: 2 easy and 2 medium difficulty. -Section 1 contains the easy questions, Section 2 contains the medium questions. -Candidates should try to solve one problem from each section. -They have 70 minutes total to complete the test.`; +*The review is needed by end of day Today*`; await chatService.sendRequestReviewMessage( client, reviewerId, diff --git a/src/utils/RequestBuilder.ts b/src/utils/RequestBuilder.ts index 9e8d3a06..e2f22a4e 100644 --- a/src/utils/RequestBuilder.ts +++ b/src/utils/RequestBuilder.ts @@ -56,10 +56,6 @@ export const requestBuilder = { ul(...languages), bold(`Candidate Type: ${candidateTypeDisplay}`), bold(`The review is needed by end of day ${deadlineDisplay}`), - compose( - bold('Test Information:'), - 'The test has 4 questions: 2 easy and 2 medium difficulty.\nSection 1 contains the easy questions, Section 2 contains the medium questions.\nCandidates should try to solve one problem from each section.\nThey have 70 minutes total to complete the test.', - ), ), }, };