Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/bot/__tests__/acceptReviewRequest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -138,6 +145,7 @@ describe('acceptReviewRequest', () => {
expectedHackerRankUrlBlock,
expectedHackerRankInstructionsBlock,
expectedHackerRankAccountHelpBlock,
expectedTestInfoBlock,
);
expect(reviewCloser.closeReviewIfComplete).toHaveBeenCalledWith(app, '123');
});
Expand Down
5 changes: 5 additions & 0 deletions src/bot/acceptReviewRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
9 changes: 1 addition & 8 deletions src/services/__tests__/ChatService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 0 additions & 4 deletions src/utils/RequestBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
),
),
},
};
Expand Down
Loading