Skip to content

Conversation

ctxsmith25
Copy link

Part of #12588

Increased unit test coverage for GroupedResponsesComponent from 54.17% to 100%.
Added test cases in src/web/app/components/question-responses/grouped-responses/grouped-responses.component.ts

@jasonqiu212 jasonqiu212 added the s.ToReview The PR is waiting for review(s) label May 25, 2025
Copy link
Contributor

@jasonqiu212 jasonqiu212 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ctxsmith25 Thank you for contributing the TEAMMATES! Just a few nits below, but the rest of the PR LGTM!

Comment on lines +155 to +167
it('teamInfo: should return correct team info for GRQ mode', () => {
component.isGrq = true;
const teamInfo = component.teamInfo;
expect(teamInfo['recipient']).toBe('(Team 2)');
expect(teamInfo['giver']).toBe('(Team 1)');
});

it('teamInfo: should return correct team info for RGQ mode', () => {
component.isGrq = false;
const teamInfo = component.teamInfo;
expect(teamInfo['recipient']).toBe('(Team 2)');
expect(teamInfo['giver']).toBe('(Team 1)');
});
Copy link
Contributor

@jasonqiu212 jasonqiu212 May 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe setting isGrq does not impact the results of teamInfo(). Can we combine these 2 test cases?

allResponses: [emptyTeamResponse],
};
component.responses = [emptyTeamQuestionOutput];
component.isGrq = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to above, setting isGrq does not impact the results. Can we remove this?

allResponses: [noTeamResponse],
};
component.responses = [noTeamQuestionOutput];
component.isGrq = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s.ToReview The PR is waiting for review(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants