hex337 / quantum-attendance

An attendance program for Quantum Martial Arts
MIT License
3 stars 2 forks source link

🔄 Update Num Students count in meeting list template #78

Open arcane-engine[bot] opened 7 months ago

arcane-engine[bot] commented 7 months ago

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 commented 7 months ago

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

arcane-engine[bot] commented 7 months ago

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