Skip to content

Create spec/requests/api/markdown_snapshot_spec.rb

Chad Woolley requested to merge caw-glfm-static-html-snapshot-spec into master

What does this MR do and why?

Create spec/requests/api/markdown_snapshot_spec.rb

  • This is the first iteration of replacing the existing spec/requests/api/markdown_golden_master_spec.rb with a new spec based on the GLFM specification example snapshots.
  • Currently there are only standard CommonMark/GitHub markdown examples, no GitLab-specific examples. This should mean no variable HTML like styles or reference IDs, and therefore this spec is stable and safe to commit to master. The examples and cases will be handled by future MRs (see Tracking Issue: Implement GLFM scripts per the ... (#361241))

See https://docs.gitlab.com/ee/development/gitlab_flavored_markdown/specification_guide/#update-example-snapshotsrb-script for more context on this and related scripts.

Related: Tracking Issue: Implement GLFM scripts per the ... (#361241)

How to set up and validate locally

  1. Run spec/requests/api/markdown_snapshot_spec.rb, it should pass.
  2. Try running it again with FOCUSED_MARKDOWN_EXAMPLES set to 02_01__preliminaries__tabs__001, it should run only that example.
  3. Try running it again with FOCUSED_MARKDOWN_EXAMPLES set to 02_01__preliminaries__tabs__001,02_01__preliminaries__tabs__003, it should run only those two examples.

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 Chad Woolley

Merge request reports