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
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-06-19 03:09:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-06-19 03:09:54 +0300
commit7e1a2eecb0f25bcc69cafa2fd8615885794fd406 (patch)
treee6ce91e5449b8288959bb0ddb5acb29878e44d81 /spec
parent047eb7596938953e0e927dfae9096a9326c98a53 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r--spec/frontend/snippets/components/snippet_blob_actions_edit_spec.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/frontend/snippets/components/snippet_blob_actions_edit_spec.js b/spec/frontend/snippets/components/snippet_blob_actions_edit_spec.js
index 58f47e8b0dc..cb11e98cd35 100644
--- a/spec/frontend/snippets/components/snippet_blob_actions_edit_spec.js
+++ b/spec/frontend/snippets/components/snippet_blob_actions_edit_spec.js
@@ -8,8 +8,9 @@ import {
SNIPPET_MAX_BLOBS,
SNIPPET_BLOB_ACTION_CREATE,
SNIPPET_BLOB_ACTION_MOVE,
+ SNIPPET_LIMITATIONS,
} from '~/snippets/constants';
-import { s__ } from '~/locale';
+import { s__, sprintf } from '~/locale';
import { testEntries, createBlobFromTestEntry } from '../test_utils';
const TEST_BLOBS = [
@@ -40,6 +41,7 @@ describe('snippets/components/snippet_blob_actions_edit', () => {
}));
const findFirstBlobEdit = () => findBlobEdits().at(0);
const findAddButton = () => wrapper.find('[data-testid="add_button"]');
+ const findLimitationsText = () => wrapper.find('[data-testid="limitations_text"]');
const getLastActions = () => {
const events = wrapper.emitted().actions;
@@ -97,6 +99,10 @@ describe('snippets/components/snippet_blob_actions_edit', () => {
expect(button.props('disabled')).toBe(false);
});
+ it('do not show limitations text', () => {
+ expect(findLimitationsText().exists()).toBe(false);
+ });
+
describe('when add is clicked', () => {
beforeEach(() => {
findAddButton().vm.$emit('click');
@@ -276,6 +282,12 @@ describe('snippets/components/snippet_blob_actions_edit', () => {
it('should disable add button', () => {
expect(findAddButton().props('disabled')).toBe(true);
});
+
+ it('shows limitations text', () => {
+ expect(findLimitationsText().text()).toBe(
+ sprintf(SNIPPET_LIMITATIONS, { total: SNIPPET_MAX_BLOBS }),
+ );
+ });
});
describe('isValid prop', () => {