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

Fix/tests not passing pr135 #142

Closed
wants to merge 21 commits into from
Closed

Conversation

TeddyRoncin
Copy link
Member

Do not merge this one, it only exists for debug purposes, see PR#135

Changements

Breaking changes

Ce qu'il reste à faire (POUR LES DRAFTS)

  • Vérifier le build
  • Lint
  • Supprimer les console.log / code commenté

Teddy Roncin and others added 21 commits September 30, 2023 06:00
refactor: when a cart is paid, refunded or forced paid, teams can be locked or unlocked
fix: we didn't check that the tournament wasn't full before locking the team

fix: we didn't check that the team was full before locking team

fix: discord was not setup
…re is no place left

fix: there was a problem when fetching player tickets in updateCart() operation
* added tests for route POST /etupay/callback
* removed tests for route POST /teams/current/lock
* added the tests
* fixed a bug where a team could be not full but force pay would still lock it
(or put it on the waiting list)
* fixed some typos in the name of the tests of the file etupay/callback.test.ts
* added some await at the end of a test to make sure instructions have finished running
* added tests
* fixed a bug in file operations/carts.ts where the check of the name of the item was done wrong
* added tests
* changed signature of the kickUser method : it now takes the user and not only its id
* fixed a bug where any type of members made the team be unlocked when they were kicked / they left
* route DELETE /teams/current/users/current no longer needs the team to not be locked
* added tests
* route DELETE /teams/current/users/:userId no longer needs the team to not be locked
* added tests
* the team can now be locked to make the request (it will still return an error tho,
but not due to the fact that it is locked, but instead that it is full)
* fixed bugs with the remake of functions kickUser and joinTeam (in the team operations file)
* added tests
* team can now be locked to delete it
* a team that is locked and deleted now lets its place to a team in the waiting list
* removed the middleware isTeamNotLocked, and its usages
* removed the tests that tested that middleware
* added tests to verify a team in the queue would be moved to the locked teams
if necessary with routes :
	- DELETE /teams/current/users/:userId
	- DELETE /teams/current/users/current
	- POST /admin/carts/:cartId/refund
* linted code
* for operation imports : replaced single function imports by gobal imports
* team can now be locked OR in the queue
* added test for that
* a test was not passing because there was neither casters nor cashprizes on the tournaments
@codecov
Copy link

codecov bot commented Oct 1, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (3c39425) 96.45% compared to head (fca96a8) 96.67%.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #142      +/-   ##
==========================================
+ Coverage   96.45%   96.67%   +0.21%     
==========================================
  Files         108      107       -1     
  Lines        2231     2257      +26     
  Branches      317      324       +7     
==========================================
+ Hits         2152     2182      +30     
+ Misses         42       40       -2     
+ Partials       37       35       -2     
Files Coverage Δ
src/controllers/admin/users/replace.ts 100.00% <100.00%> (ø)
src/controllers/discord/oauth.ts 100.00% <100.00%> (+4.54%) ⬆️
src/controllers/teams/acceptRequest.ts 100.00% <100.00%> (ø)
src/controllers/teams/deleteTeam.ts 100.00% <100.00%> (ø)
src/controllers/teams/kickUser.ts 100.00% <100.00%> (ø)
src/controllers/teams/leaveTeam.ts 100.00% <100.00%> (ø)
src/controllers/teams/promoteCaptain.ts 100.00% <100.00%> (ø)
src/controllers/teams/refuseTeamRequest.ts 100.00% <100.00%> (ø)
src/controllers/teams/updateTeam.ts 100.00% <100.00%> (ø)
src/middlewares/team.ts 100.00% <ø> (+5.88%) ⬆️
... and 2 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TeddyRoncin TeddyRoncin closed this Oct 1, 2023
@TeddyRoncin TeddyRoncin deleted the fix/tests-not-passing-pr135 branch October 1, 2023 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants