Skip to content
代码片段 群组 项目
未验证 提交 6616af5d 编辑于 作者: Paul Slaughter's avatar Paul Slaughter 提交者: GitLab
浏览文件

Merge branch '456327-dcf-display-mermaid-plots-in-project-ci-cd-setting-pages' into 'master'

No related branches found
No related tags found
无相关合并请求
...@@ -12,6 +12,7 @@ import { initCiSecureFiles } from '~/ci_secure_files'; ...@@ -12,6 +12,7 @@ import { initCiSecureFiles } from '~/ci_secure_files';
import initDeployTokens from '~/deploy_tokens'; import initDeployTokens from '~/deploy_tokens';
import { initProjectRunnersRegistrationDropdown } from '~/ci/runner/project_runners/register'; import { initProjectRunnersRegistrationDropdown } from '~/ci/runner/project_runners/register';
import { initGeneralPipelinesOptions } from '~/ci_settings_general_pipeline'; import { initGeneralPipelinesOptions } from '~/ci_settings_general_pipeline';
import { renderGFM } from '~/behaviors/markdown/render_gfm';
// Initialize expandable settings panels // Initialize expandable settings panels
initSettingsPanels(); initSettingsPanels();
...@@ -42,3 +43,5 @@ initRefSwitcherBadges(); ...@@ -42,3 +43,5 @@ initRefSwitcherBadges();
initTokenAccess(); initTokenAccess();
initCiSecureFiles(); initCiSecureFiles();
initGeneralPipelinesOptions(); initGeneralPipelinesOptions();
renderGFM(document.getElementById('js-shared-runners-markdown'));
...@@ -9,4 +9,4 @@ ...@@ -9,4 +9,4 @@
- c.with_body do - c.with_body do
%p= s_('Runners|%{link_start}These runners%{link_end} are available to all groups and projects.').html_safe % { link_start: shared_link_start, link_end: '</a>'.html_safe } %p= s_('Runners|%{link_start}These runners%{link_end} are available to all groups and projects.').html_safe % { link_start: shared_link_start, link_end: '</a>'.html_safe }
- if Gitlab::CurrentSettings.shared_runners_text.present? - if Gitlab::CurrentSettings.shared_runners_text.present?
= markdown(Gitlab::CurrentSettings.current_application_settings.shared_runners_text) #js-shared-runners-markdown= markdown(Gitlab::CurrentSettings.current_application_settings.shared_runners_text)
import { renderGFM } from '~/behaviors/markdown/render_gfm';
jest.mock('~/behaviors/markdown/render_gfm');
describe('CI/CD Settings', () => {
it('calls `renderGFM` to ensure that all gitlab-flavoured markdown is rendered on the CI/CD Settings page', async () => {
jest.spyOn(document, 'getElementById').getMockImplementation();
await import('~/pages/projects/settings/ci_cd/show');
expect(document.getElementById).toHaveBeenCalledWith('js-shared-runners-markdown');
expect(renderGFM).toHaveBeenCalledTimes(1);
});
});
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册