diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
commit | 8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca (patch) | |
tree | 544930fb309b30317ae9797a9683768705d664c4 /spec/features/markdown | |
parent | 4b1de649d0168371549608993deac953eb692019 (diff) |
Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42
Diffstat (limited to 'spec/features/markdown')
-rw-r--r-- | spec/features/markdown/copy_as_gfm_spec.rb | 11 | ||||
-rw-r--r-- | spec/features/markdown/mermaid_spec.rb | 8 |
2 files changed, 11 insertions, 8 deletions
diff --git a/spec/features/markdown/copy_as_gfm_spec.rb b/spec/features/markdown/copy_as_gfm_spec.rb index fbf4e531db1..c9dc764f93b 100644 --- a/spec/features/markdown/copy_as_gfm_spec.rb +++ b/spec/features/markdown/copy_as_gfm_spec.rb @@ -7,10 +7,6 @@ RSpec.describe 'Copy as GFM', :js do include RepoHelpers include ActionView::Helpers::JavaScriptHelper - before do - sign_in(create(:admin)) - end - describe 'Copying rendered GFM' do before do @feat = MarkdownFeature.new @@ -18,6 +14,9 @@ RSpec.describe 'Copy as GFM', :js do # `markdown` helper expects a `@project` variable @project = @feat.project + user = create(:user) + @project.add_maintainer(user) + sign_in(user) visit project_issue_path(@project, @feat.issue) end @@ -650,6 +649,10 @@ RSpec.describe 'Copy as GFM', :js do describe 'Copying code' do let(:project) { create(:project, :repository) } + before do + sign_in(project.owner) + end + context 'from a diff' do shared_examples 'copying code from a diff' do context 'selecting one word of text' do diff --git a/spec/features/markdown/mermaid_spec.rb b/spec/features/markdown/mermaid_spec.rb index 58314a49c4b..23cdd9d2ce5 100644 --- a/spec/features/markdown/mermaid_spec.rb +++ b/spec/features/markdown/mermaid_spec.rb @@ -48,7 +48,7 @@ RSpec.describe 'Mermaid rendering', :js do expect(page.html.scan(expected).count).to be(4) end - it 'renders only 2 Mermaid blocks and ', :js, quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/234081' } do + it 'renders only 2 Mermaid blocks and', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/234081' do description = <<~MERMAID ```mermaid graph LR @@ -78,7 +78,7 @@ RSpec.describe 'Mermaid rendering', :js do end end - it 'correctly sizes mermaid diagram inside <details> block', :js do + it 'correctly sizes mermaid diagram inside <details> block' do description = <<~MERMAID <details> <summary>Click to show diagram</summary> @@ -112,7 +112,7 @@ RSpec.describe 'Mermaid rendering', :js do end end - it 'correctly sizes mermaid diagram block', :js do + it 'correctly sizes mermaid diagram block' do description = <<~MERMAID ```mermaid graph TD; @@ -134,7 +134,7 @@ RSpec.describe 'Mermaid rendering', :js do expect(page).to have_css('svg.mermaid[style*="max-width"][width="100%"]') end - it 'display button when diagram exceeds length', :js do + it 'display button when diagram exceeds length', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/287806' do graph_edges = "A-->B;B-->A;" * 420 description = <<~MERMAID |