Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

pr-pilot-ai[bot]
Copy link

@pr-pilot-ai pr-pilot-ai bot commented Mar 12, 2024

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.

@hex337
Copy link
Owner

hex337 commented Mar 12, 2024

/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.

Copy link
Author

pr-pilot-ai bot commented Mar 12, 2024

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 test/views/meetings/meeting_list_spec.rb. They cover two scenarios:

  1. A class with some students and one teacher, validating that the displayed count matches the number of students.
  2. A class with a teacher, a few assistants, and a handful of students, ensuring that the displayed number matches only the count of the students.

This should help prevent any regressions in the future regarding the display of student counts in the meeting list view.

Task Log


render partial: 'meetings/meeting_list', locals: { meetings: [meeting] }

expect(rendered).to include("5")
Copy link
Owner

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.

Copy link
Author

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.

Task Log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant