diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-03 16:48:23 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-03 16:48:23 +0300 |
commit | 4c6095ca9375c4b88dafc35ca064ab8a21771d6c (patch) | |
tree | a1c1628d6c9a9c58e6206fc8306bba2a79e27db9 /spec | |
parent | 9b7331ec40066a8edfc3452ec6658aad89b56126 (diff) |
Add latest changes from gitlab-org/gitlab@16-1-stable-ee
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/markdown/sandboxed_mermaid_spec.rb | 5 | ||||
-rw-r--r-- | spec/frontend/behaviors/markdown/render_sandboxed_mermaid_spec.js | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/spec/features/markdown/sandboxed_mermaid_spec.rb b/spec/features/markdown/sandboxed_mermaid_spec.rb index f8a535191da..87696eb82e5 100644 --- a/spec/features/markdown/sandboxed_mermaid_spec.rb +++ b/spec/features/markdown/sandboxed_mermaid_spec.rb @@ -16,8 +16,9 @@ RSpec.describe 'Sandboxed Mermaid rendering', :js, feature_category: :team_plann MERMAID end - let_it_be(:expected) do - %(<iframe src="/-/sandbox/mermaid" sandbox="allow-scripts allow-popups" frameborder="0" scrolling="no") + let(:expected) do + src = "http://#{Capybara.current_session.server.host}:#{Capybara.current_session.server.port}/-/sandbox/mermaid" + %(<iframe src="#{src}" sandbox="allow-scripts allow-popups" frameborder="0" scrolling="no") end context 'in an issue' do diff --git a/spec/frontend/behaviors/markdown/render_sandboxed_mermaid_spec.js b/spec/frontend/behaviors/markdown/render_sandboxed_mermaid_spec.js index de0e5063e49..88312a780d1 100644 --- a/spec/frontend/behaviors/markdown/render_sandboxed_mermaid_spec.js +++ b/spec/frontend/behaviors/markdown/render_sandboxed_mermaid_spec.js @@ -9,7 +9,7 @@ import renderMermaid, { describe('Mermaid diagrams renderer', () => { // Finders - const findMermaidIframes = () => document.querySelectorAll('iframe[src="/-/sandbox/mermaid"]'); + const findMermaidIframes = () => document.querySelectorAll('iframe[src*="/-/sandbox/mermaid"]'); const findDangerousMermaidAlert = () => createWrapper(document.querySelector('[data-testid="alert-warning"]')); |