diff options
Diffstat (limited to 'spec/frontend/ide/stores/mutations/file_spec.js')
-rw-r--r-- | spec/frontend/ide/stores/mutations/file_spec.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/spec/frontend/ide/stores/mutations/file_spec.js b/spec/frontend/ide/stores/mutations/file_spec.js index cd308ee9991..9b96b910fcb 100644 --- a/spec/frontend/ide/stores/mutations/file_spec.js +++ b/spec/frontend/ide/stores/mutations/file_spec.js @@ -356,6 +356,14 @@ describe('IDE store file mutations', () => { expect(localState.changedFiles.length).toBe(1); }); + + it('bursts unused seal', () => { + expect(localState.unusedSeal).toBe(true); + + mutations.ADD_FILE_TO_CHANGED(localState, localFile.path); + + expect(localState.unusedSeal).toBe(false); + }); }); describe('REMOVE_FILE_FROM_CHANGED', () => { @@ -366,6 +374,14 @@ describe('IDE store file mutations', () => { expect(localState.changedFiles.length).toBe(0); }); + + it('bursts unused seal', () => { + expect(localState.unusedSeal).toBe(true); + + mutations.REMOVE_FILE_FROM_CHANGED(localState, localFile.path); + + expect(localState.unusedSeal).toBe(false); + }); }); describe.each` @@ -517,6 +533,19 @@ describe('IDE store file mutations', () => { }, ); + describe('STAGE_CHANGE', () => { + it('bursts unused seal', () => { + expect(localState.unusedSeal).toBe(true); + + mutations.STAGE_CHANGE(localState, { + path: localFile.path, + diffInfo: localStore.getters.getDiffInfo(localFile.path), + }); + + expect(localState.unusedSeal).toBe(false); + }); + }); + describe('TOGGLE_FILE_CHANGED', () => { it('updates file changed status', () => { mutations.TOGGLE_FILE_CHANGED(localState, { |