diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-13 03:09:10 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-13 03:09:10 +0300 |
commit | 71d4234fa1047943240e129b73ca41e751711520 (patch) | |
tree | 648cb8c02eccd3c8e00be115d77422f23beabb66 /spec/support/matchers | |
parent | eef0c69d45082b370f1e41e50f12488a216944f2 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/matchers')
-rw-r--r-- | spec/support/matchers/markdown_matchers.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/support/matchers/markdown_matchers.rb b/spec/support/matchers/markdown_matchers.rb index 6e75fa58700..47cffad8c41 100644 --- a/spec/support/matchers/markdown_matchers.rb +++ b/spec/support/matchers/markdown_matchers.rb @@ -246,6 +246,33 @@ module MarkdownMatchers end end end + + # MermaidFilter + matcher :parse_mermaid do + set_default_markdown_messages + + match do |actual| + expect(actual).to have_selector('code.js-render-mermaid') + end + end + + # PLantumlFilter + matcher :parse_plantuml do + set_default_markdown_messages + + match do |actual| + expect(actual).to have_link(href: 'http://localhost:8080/png/U9npoazIqBLJ24uiIbImKl18pSd9vm80EtS5lW00') + end + end + + # KrokiFilter + matcher :parse_kroki do + set_default_markdown_messages + + match do |actual| + expect(actual).to have_link(href: 'http://localhost:8000/nomnoml/svg/eNqLDsgsSixJrUmtTHXOL80rsVLwzCupKUrMTNHQtC7IzMlJTE_V0KzhUlCITkpNLEqJ1dWNLkgsKsoviUUSs7KLTssvzVHIzS8tyYjligUAMhEd0g==') + end + end end # Monkeypatch the matcher DSL so that we can reduce some noisy duplication for |