Open Mang0codes opened 1 month ago
Nice work! This looks good
As far as the failing test it looks like the test will need a little bit of a re-work as well, considering we're looking for a outdated gameList that is (now) refreshed and hiding closed games upon reconnection of the socket
If you have any questions you can reach out in the #code channel on our Discord
Nice work! This looks good
As far as the failing test it looks like the test will need a little bit of a re-work as well, considering we're looking for a outdated gameList that is (now) refreshed and hiding closed games upon reconnection of the socket
If you have any questions you can reach out in the #code channel on our Discord
Thanks for reviewing. Can you please elaborate what I can do now?
Nice work! This looks good As far as the failing test it looks like the test will need a little bit of a re-work as well, considering we're looking for a outdated gameList that is (now) refreshed and hiding closed games upon reconnection of the socket If you have any questions you can reach out in the #code channel on our Discord
Thanks for reviewing. Can you please elaborate what I can do now?
When we wrote this test we checked that it was not possible to join a outdated game when the socket refreshed, after your code, the list refreshes on socket reconnect and the outdated games are no longer shown and can't be selected to join. I think it might be sufficient to make sure that there is no games in the list now. @itsalaidbacklife, thoughts?
@Mang0codes I think it's sufficient to change the failing assertion to make sure there are no games in the list
@Mang0codes I think it's sufficient to change the failing assertion to make sure there are no games in the list
Did you mean like this?? Before it was:
cy.get('[data-cy=game-list-item]').should('have.length', 1);
Yea I think that would work, making sure we check length = 0
@Haviles04 Can you please review the changes. I think I'm still missing something
In the failing test case, I think we can likely remove lines 299-302 and replace them with a copy of line 307
@Mang0codes are you still interested in working on this?
@Mang0codes are you still interested in working on this?
I don't have much experience with writing tests... You can assign this to someone else
Issue number
Relevant issue number
Please check the following
Please describe additional details for testing this change
Changes Made: Updated src/plugins/sockets/connectivityEvents.js to handle the case when the route is ROUTE_NAME_HOME. If the user is on the homepage when the socket reconnects, the gameListStore.requestGameList() method is called to retrieve the most recent list of available games. Imported and instantiated the gameListStore in connectivityEvents.js to make this functionality available.