Closed Regularmute closed 7 months ago
I guess the admin bypass is a good idea, but should have one or two verifying dialogs in the frontend before the request is sent to backend.
These changes are part of main now because these were included in Charts pull request by Antti.
Resolves #262
Refactors the tests regarding time logs and sprints to work independently and remove dependencies between tests. This will hopefully fix problems with the data visualization testing (#237 , #91 ) and prevent regressions.
To do this, following changes have been made:
IMPORTANT (commit bd35e620c52cf5daaa496c2e44751a8c9f42963b), the backend validation that prevents deleting a sprint that contains time logs is bypassed if the request comes from an admin. I'd like to hear opinions on whether or not this is alright, since currently there is no way for an admin to delete sprints through the UI except if they're added as a member of the group.
A new Cypress Command "DeleteAllSprints" has been created to reset the sprints between each test.
The test file has been edited to login as admin, delete all tests, login as a registered user then manually add 2 sprints between each test.
The existing tests have been refactored to account for this change.
The admin account TEST_ADMIN has been added as a member of the test group, since sprint deletion requests from non-group members is currently not possible even for admins.