Skip to content

Refactor feature specs for group wikis [RUN AS-IF-FOSS]

Markus Koller requested to merge 228627-group-wiki-feature-specs-editing into master

What does this MR do?

Ref: #228627 (closed)

This extracts the feature specs for project wikis into shared examples, and reuses them for group wikis.

Most of the specs were ported directly with some small adjustments to make the wiki container generic:

  • Using the wiki_path / wiki_page_path route helpers.
  • Using wiki.container instead of project.

Some specs needed special treatment:

  • user_views_wiki_empty_spec tests the different conditions for the empty state message, which on projects can also link to the issues tracker. This was refactored into a shared example that can test the various conditions dynamically.

  • user_creates_wiki_page_spec and user_updates_wiki_page_spec were repeating some tests for project wikis in group and user namespaces. This duplication was removed, since these go through the same code paths and don't apply to group wikis.

  • user_creates_wiki_page_spec also contained tests for the wiki sidebar, these were extracted into their own shared examples.

  • Diffing wiki pages doesn't work yet with group wikis, so those tests are temporarily skipped.

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Markus Koller

Merge request reports