Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-08 18:10:00 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-08 18:10:00 +0300
commit0ebbf19f2d2b87e1f2aca1c59efde1aa6a766cf6 (patch)
treeb45534e86659ab6fa97c240563651b2e03dfce4d /spec/features/markdown
parentccc2dc45a3e8fab3dfeda097be601b16c5beff13 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/markdown')
-rw-r--r--spec/features/markdown/mermaid_spec.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/features/markdown/mermaid_spec.rb b/spec/features/markdown/mermaid_spec.rb
index 75c1d03b638..c4994838d26 100644
--- a/spec/features/markdown/mermaid_spec.rb
+++ b/spec/features/markdown/mermaid_spec.rb
@@ -247,6 +247,36 @@ RSpec.describe 'Mermaid rendering', :js do
expect(page).to have_selector('.js-lazy-render-mermaid-container')
end
end
+
+ it 'renders without any limits on wiki page', :js do
+ graph_edges = "A-->B;B-->A;"
+
+ description = <<~MERMAID
+ ```mermaid
+ graph LR
+ #{graph_edges}
+ ```
+ MERMAID
+
+ description *= 51
+
+ project = create(:project, :public)
+
+ wiki_page = build(:wiki_page, { container: project, content: description })
+ wiki_page.create message: 'mermaid test commit' # rubocop:disable Rails/SaveBang
+ wiki_page = project.wiki.find_page(wiki_page.slug)
+
+ visit project_wiki_path(project, wiki_page)
+
+ wait_for_requests
+ wait_for_mermaid
+
+ page.within('.js-wiki-page-content') do
+ expect(page).not_to have_selector('.lazy-alert-shown')
+
+ expect(page).not_to have_selector('.js-lazy-render-mermaid-container')
+ end
+ end
end
def wait_for_mermaid