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

Implement tests for sharing project queries #16032

Merged
merged 41 commits into from
Jul 12, 2024
Merged

Conversation

klaustopher
Copy link
Contributor

@klaustopher klaustopher commented Jul 3, 2024

Follow up to #15971 adding all the tests


Tests

NOTE: Not being able to edit means you can make changes to the query but then it only offers the "Save as" function

  • User Permissible service for non-project scoped resources are not tested yet
  • Tests for the SharesController
  • Tests for the sharing strategies
  • Feature Tests for the entire ProjectQuery sharing workflow
    • Adding a share and accessing the project query with the shared user (@aaron-contreras)
    • Adding a share with edit and changing with the shared user ( @aaron-contreras )
    • Making a query public and accessing it with another user (not allowed to edit) ( @aaron-contreras )
    • Making a query public and adding a share with edit permission and then editing it as shared user ( @aaron-contreras )
    • Making a query public and the owner not having the manage_public_project_queries and not being able to edit ( @aaron-contreras )

Found while writing specs

  • Re-work UserDetailsComponent to be entity specific (current work package specific details don't fit with a non-project scoped resource like a project query) ▶️ Move sub description of each share into the strategy #16090
  • As a user that has been shared a project list with edit permissions, I'm not able to edit the project query by clicking "Save"

See: https://community.openproject.org/work_packages/55163

@klaustopher klaustopher changed the title Start SharesController specs Implement tests for sharing project queries Jul 3, 2024
Base automatically changed from implementation/55163-build-sharing-modal to release/14.3 July 4, 2024 06:33
@aaron-contreras aaron-contreras self-assigned this Jul 10, 2024
@klaustopher
Copy link
Contributor Author

@HDinger notified me that the preview in LookBook was broken. This is fixed in 8f9e0af and this already uncovered a bug of a hardcoded title :D

@aaron-contreras aaron-contreras force-pushed the sharing-tests branch 2 times, most recently from 69efdfd to 91d5334 Compare July 11, 2024 19:59
@aaron-contreras aaron-contreras force-pushed the sharing-tests branch 2 times, most recently from 3ba40d8 to cf3ebd4 Compare July 11, 2024 21:28
@klaustopher klaustopher marked this pull request as ready for review July 12, 2024 06:18
@klaustopher
Copy link
Contributor Author

Approved!

@klaustopher klaustopher merged commit 616a6c6 into release/14.3 Jul 12, 2024
8 of 9 checks passed
@klaustopher klaustopher deleted the sharing-tests branch July 12, 2024 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants