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/content_editor/components/formatting_toolbar_spec.js
parent91a7f1897e7cb14d60c2aaf3afa76ebdc879d939 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/content_editor/components/formatting_toolbar_spec.js')
-rw-r--r--spec/frontend/content_editor/components/formatting_toolbar_spec.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/frontend/content_editor/components/formatting_toolbar_spec.js b/spec/frontend/content_editor/components/formatting_toolbar_spec.js
index e04c6a00765..9d835381ff4 100644
--- a/spec/frontend/content_editor/components/formatting_toolbar_spec.js
+++ b/spec/frontend/content_editor/components/formatting_toolbar_spec.js
@@ -12,13 +12,14 @@ describe('content_editor/components/formatting_toolbar', () => {
let wrapper;
let trackingSpy;
- const buildWrapper = () => {
+ const buildWrapper = (props) => {
wrapper = shallowMountExtended(FormattingToolbar, {
stubs: {
GlTabs,
GlTab,
EditorModeSwitcher,
},
+ propsData: props,
});
};
@@ -73,4 +74,12 @@ describe('content_editor/components/formatting_toolbar', () => {
expect(wrapper.findComponent(EditorModeSwitcher).exists()).toBe(true);
});
+
+ describe('when attachment button is hidden', () => {
+ it('does not show the attachment button', () => {
+ buildWrapper({ hideAttachmentButton: true });
+
+ expect(wrapper.findByTestId('attachment').exists()).toBe(false);
+ });
+ });
});