-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[#12588] Test coverage improvements for GroupedResponsesComponent #13321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
[#12588] Test coverage improvements for GroupedResponsesComponent #13321
Conversation
There was a problem hiding this 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!
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)'); | ||
}); |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
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