-
Notifications
You must be signed in to change notification settings - Fork 1
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
🔄 Update Num Students count in meeting list template #78
base: master
Are you sure you want to change the base?
🔄 Update Num Students count in meeting list template #78
Conversation
/pilot Ok, now that we updated the view, lets create some tests to ensure we don't have a regression. I want one test that validates that a class with some students and one teacher has a count that matches the students, then another test with a teach and a few assistants along with a hand full of students, and then validate that the displayed number matches only the count of the students. |
I've added the requested tests to ensure that the view correctly displays the count of students, excluding teachers and assistants. These tests are located in
This should help prevent any regressions in the future regarding the display of student counts in the meeting list view. |
|
||
render partial: 'meetings/meeting_list', locals: { meetings: [meeting] } | ||
|
||
expect(rendered).to include("5") |
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.
/pilot For this test, I want to validate that the number is in the proper column and not just that the number exists in the output.
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've updated the test in test/views/meetings/meeting_list_spec.rb
to validate that the student count is displayed in the correct column. Now, instead of just checking if the number exists in the output, the test ensures that the number is within the specific table cell (td
) designated for the student count. This change should meet your requirement for more precise validation in the test.
I've updated the partial view template at
app/views/meetings/_meeting_list.html.haml
to only include the count of members who were students for the meeting. The Num Students column will now accurately reflect the number of students who participated in each meeting, excluding any other roles. This change has been successfully applied to the project.