diff options
Diffstat (limited to 'spec/support/matchers/markdown_matchers.rb')
-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 |