Skip to content

Add Wiki Inherited Permissions Specs wiki_page_policy_spec and Create New UserHelpers Module

Valerie Burton requested to merge add-specs-for-wiki-inherited-permissions into master

What does this MR do and why?

This MR refactors and adds specs to spec/policies/wiki_page_policy_spec.rb which includes modified P1 test cases from the permissions wizard in https://gitlab.com/gitlab-org/quality/quality-engineering/team-tasks/-/issues/1407 in order to test inherited user permissions around the :read_wiki_policy.

A new UserHelpers module has been added as well to include methods such as create_user_from_membership, which was originally located in ProjectHelpers. This also contains the newly added build_user_from_membership method, similar to create_user_from_membership, but uses FactoryBot's build method for better performance.

Not every test case is added yet, and this will be one of several foundational MRs which will include examples and refactoring for other SETs to contribute. Once merged, the issue will be updated to reflect what additional tests will be needed.

Related to https://gitlab.com/gitlab-org/quality/quality-engineering/team-tasks/-/issues/1413

Epic: https://gitlab.com/groups/gitlab-org/quality/-/epics/35

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Valerie Burton

Merge request reports

Loading