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>2023-05-25 15:07:22 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-25 15:07:22 +0300
commitfc4faf47ac4e5f1ddc40640c42c32405c38c9455 (patch)
treef6d8642f577eda485efc0570300b5da28f0a7dfe /spec/frontend/vue_shared
parent91a7f1897e7cb14d60c2aaf3afa76ebdc879d939 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/vue_shared')
-rw-r--r--spec/frontend/vue_shared/components/markdown/markdown_editor_spec.js14
1 files changed, 14 insertions, 0 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 72454c113b0..e54e261b8e4 100644
--- a/spec/frontend/vue_shared/components/markdown/markdown_editor_spec.js
+++ b/spec/frontend/vue_shared/components/markdown/markdown_editor_spec.js
@@ -174,6 +174,20 @@ describe('vue_shared/component/markdown/markdown_editor', () => {
});
});
+ describe('when attachments are disabled', () => {
+ beforeEach(() => {
+ buildWrapper({ propsData: { disableAttachments: true } });
+ });
+
+ it('disables canAttachFile', () => {
+ expect(findMarkdownField().props().canAttachFile).toBe(false);
+ });
+
+ it('passes `attach-file` to restrictedToolBarItems', () => {
+ expect(findMarkdownField().props().restrictedToolBarItems).toContain('attach-file');
+ });
+ });
+
describe('disabled', () => {
it('disables markdown field when disabled prop is true', () => {
buildWrapper({ propsData: { disabled: true } });