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:
authorTim Zallmann <tzallmann@gitlab.com>2019-03-22 12:38:35 +0300
committerTim Zallmann <tzallmann@gitlab.com>2019-03-22 12:38:35 +0300
commite14b4b051ef4fda565b50b8d92644ab046dfcdbf (patch)
tree704ff7dfbb0e5106fde2ae6a8d7abe5e891432c2 /spec/javascripts
parent5765c5989a23e6db0f54440bc9bbdb37f5eb3677 (diff)
parent1a2bdb4366ab819a43e2df48124073c836564e37 (diff)
Merge branch '57540-filename-trailing-space' into 'master'
Implemented trimming for item's name in Web IDE Closes #57540 See merge request gitlab-org/gitlab-ce!26270
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/ide/components/new_dropdown/modal_spec.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/javascripts/ide/components/new_dropdown/modal_spec.js b/spec/javascripts/ide/components/new_dropdown/modal_spec.js
index d1a0964ccdd..0556feae46a 100644
--- a/spec/javascripts/ide/components/new_dropdown/modal_spec.js
+++ b/spec/javascripts/ide/components/new_dropdown/modal_spec.js
@@ -109,6 +109,18 @@ describe('new file modal component', () => {
expect(vm.entryName).toBe('index.js');
});
+
+ it('removes leading/trailing spaces when found in the new name', () => {
+ vm.entryName = ' index.js ';
+
+ expect(vm.entryName).toBe('index.js');
+ });
+
+ it('does not remove internal spaces in the file name', () => {
+ vm.entryName = ' In Praise of Idleness.txt ';
+
+ expect(vm.entryName).toBe('In Praise of Idleness.txt');
+ });
});
});