diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-23 21:08:27 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-23 21:08:27 +0300 |
commit | 3ca896b640def57a58485def308748b2fccbd0bb (patch) | |
tree | 7aead6484759d2a473bf9776aa7d87632f1e105f /spec/frontend/vue_shared/components/markdown | |
parent | abdb550f6937ce69ec38954f24ef221d07637438 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/vue_shared/components/markdown')
-rw-r--r-- | spec/frontend/vue_shared/components/markdown/markdown_editor_spec.js | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/spec/frontend/vue_shared/components/markdown/markdown_editor_spec.js b/spec/frontend/vue_shared/components/markdown/markdown_editor_spec.js index 26a74036b10..b149a597fa2 100644 --- a/spec/frontend/vue_shared/components/markdown/markdown_editor_spec.js +++ b/spec/frontend/vue_shared/components/markdown/markdown_editor_spec.js @@ -120,17 +120,24 @@ describe('vue_shared/component/markdown/markdown_editor', () => { }); }); - it.each` - desc | supportsQuickActions - ${'passes render_quick_actions param to renderMarkdownPath if quick actions are enabled'} | ${true} - ${'does not pass render_quick_actions param to renderMarkdownPath if quick actions are disabled'} | ${false} - `('$desc', async ({ supportsQuickActions }) => { - buildWrapper({ propsData: { supportsQuickActions } }); + it('passes render_quick_actions param to renderMarkdownPath if quick actions are enabled', async () => { + buildWrapper({ propsData: { supportsQuickActions: true } }); + + await enableContentEditor(); + + expect(mock.history.post).toHaveLength(1); + expect(mock.history.post[0].url).toContain(`render_quick_actions=true`); + }); + + // quarantine flaky spec: https://gitlab.com/gitlab-org/gitlab/-/issues/411565 + // eslint-disable-next-line jest/no-disabled-tests + it.skip('does not pass render_quick_actions param to renderMarkdownPath if quick actions are disabled', async () => { + buildWrapper({ propsData: { supportsQuickActions: false } }); await enableContentEditor(); expect(mock.history.post).toHaveLength(1); - expect(mock.history.post[0].url).toContain(`render_quick_actions=${supportsQuickActions}`); + expect(mock.history.post[0].url).toContain(`render_quick_actions=false`); }); it('enables content editor switcher when contentEditorEnabled prop is true', () => { @@ -178,7 +185,9 @@ describe('vue_shared/component/markdown/markdown_editor', () => { expect(findMarkdownField().find('textarea').attributes('disabled')).toBe(undefined); }); - it('disables content editor when disabled prop is true', async () => { + // quarantine flaky spec: https://gitlab.com/gitlab-org/gitlab/-/issues/404734 + // eslint-disable-next-line jest/no-disabled-tests + it.skip('disables content editor when disabled prop is true', async () => { buildWrapper({ propsData: { disabled: true } }); await enableContentEditor(); |