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

Modified the GameListItem.vue component to render the players' usernames in the home page list of games #1103 #3

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

AlAnoud2003
Copy link

@AlAnoud2003 AlAnoud2003 commented Dec 9, 2024

Issue number

Relevant issue number

Please check the following

  • Do the tests still pass? (see Run the Tests)
  • Is the code formatted properly? (see Linting (Formatting))
  • For New Features:
    • Have tests been added to cover any new features or fixes?
    • Has the documentation been updated accordingly?

Please describe additional details for testing this change

This pull request updates the GameListItem.vue component file in the frontend to ensure that it expects the game to have an array of players and that on the home page's list of open games, it renders text displaying who specifically is in the game (players' usernames) based on the number of players in the game.

In GameListItem.vue:

  • Props: Added a ‘players’ prop to the component, which is a required array
  • Computed Property: Added a ‘playersText’ computed property to generate the text based on the number of players in the game.
  • Template: Updated the template to use the ‘playersText’ computed property to display the text describing who specifically is in the game.

Testing:

  • Modified the tests/e2e/specs/out-of-game/home.spec.js file to account for the modified GameListItem.vue component. Included test cases to display "Empty" when there are no players and the displaying of the players' usernames in the game list item.

…ed property called playersTextto generate correct player text, and updated template to use playersText to display the usernames
…to ensure the correct displaying of usernames based on the player count
…o test the rendering of the correct player information
@AlAnoud2003 AlAnoud2003 self-assigned this Dec 9, 2024
@AlAnoud2003 AlAnoud2003 changed the title Modified the GameListItem.vue component to render the players' usernames in the home page list of games #1128 Modified the GameListItem.vue component to render the players' usernames in the home page list of games #1103 Dec 12, 2024
@Hakaabi Hakaabi added the enhancement New feature or request label Dec 12, 2024
@Hakaabi Hakaabi added this to the Sprint 5 - Coretask milestone Dec 12, 2024
@Hakaabi Hakaabi self-requested a review December 12, 2024 20:54
Copy link

@Hakaabi Hakaabi left a comment

Choose a reason for hiding this comment

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

Good job on this modification! looks good!

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

Successfully merging this pull request may close these issues.

[Feature]: Replace the player counts in the Home Page with the player usernames
2 participants