Refactor feature specs for group wikis [RUN AS-IF-FOSS]
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 ofproject
.
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
anduser_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.
- This will soon be fixed in !42610 (merged).
Screenshots
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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