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:
authorKushal Pandya <kushalspandya@gmail.com>2019-06-25 14:42:03 +0300
committerKushal Pandya <kushalspandya@gmail.com>2019-06-25 14:42:03 +0300
commit546355f734f74c040d0ef0917ade50751fd90731 (patch)
tree1a40935ecb508b52bf8b19114a1e55b4659f0e85 /spec
parent938db9132245b0b33574ffee3dfcf770aa005620 (diff)
parent875cba9d99b49ace61a5dfc52b4fe365893f4b37 (diff)
Merge branch '60860-keep-empty-folders-in-tree' into 'master'
Keep empty folders in the tree list Closes #60860 See merge request gitlab-org/gitlab-ce!29196
Diffstat (limited to 'spec')
-rw-r--r--spec/javascripts/ide/stores/actions_spec.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/javascripts/ide/stores/actions_spec.js b/spec/javascripts/ide/stores/actions_spec.js
index 37354283cab..537152f5eed 100644
--- a/spec/javascripts/ide/stores/actions_spec.js
+++ b/spec/javascripts/ide/stores/actions_spec.js
@@ -492,6 +492,33 @@ describe('Multi-file store actions', () => {
done,
);
});
+
+ it('does not delete a folder after it is emptied', done => {
+ const testFolder = {
+ type: 'tree',
+ tree: [],
+ };
+ const testEntry = {
+ path: 'testFolder/entry-to-delete',
+ parentPath: 'testFolder',
+ opened: false,
+ tree: [],
+ };
+ testFolder.tree.push(testEntry);
+ store.state.entries = {
+ testFolder,
+ 'testFolder/entry-to-delete': testEntry,
+ };
+
+ testAction(
+ deleteEntry,
+ 'testFolder/entry-to-delete',
+ store.state,
+ [{ type: types.DELETE_ENTRY, payload: 'testFolder/entry-to-delete' }],
+ [{ type: 'burstUnusedSeal' }, { type: 'triggerFilesChange' }],
+ done,
+ );
+ });
});
describe('renameEntry', () => {