diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /spec/frontend/ide/stores/modules/pane/getters_spec.js | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'spec/frontend/ide/stores/modules/pane/getters_spec.js')
-rw-r--r-- | spec/frontend/ide/stores/modules/pane/getters_spec.js | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/spec/frontend/ide/stores/modules/pane/getters_spec.js b/spec/frontend/ide/stores/modules/pane/getters_spec.js index 8a213323de0..a321571f058 100644 --- a/spec/frontend/ide/stores/modules/pane/getters_spec.js +++ b/spec/frontend/ide/stores/modules/pane/getters_spec.js @@ -7,20 +7,6 @@ describe('IDE pane module getters', () => { [TEST_VIEW]: true, }; - describe('isActiveView', () => { - it('returns true if given view matches currentView', () => { - const result = getters.isActiveView({ currentView: 'A' })('A'); - - expect(result).toBe(true); - }); - - it('returns false if given view does not match currentView', () => { - const result = getters.isActiveView({ currentView: 'A' })('B'); - - expect(result).toBe(false); - }); - }); - describe('isAliveView', () => { it('returns true if given view is in keepAliveViews', () => { const result = getters.isAliveView({ keepAliveViews: TEST_KEEP_ALIVE_VIEWS }, {})(TEST_VIEW); @@ -29,25 +15,25 @@ describe('IDE pane module getters', () => { }); it('returns true if given view is active view and open', () => { - const result = getters.isAliveView( - { ...state(), isOpen: true }, - { isActiveView: () => true }, - )(TEST_VIEW); + const result = getters.isAliveView({ ...state(), isOpen: true, currentView: TEST_VIEW })( + TEST_VIEW, + ); expect(result).toBe(true); }); it('returns false if given view is active view and closed', () => { - const result = getters.isAliveView(state(), { isActiveView: () => true })(TEST_VIEW); + const result = getters.isAliveView({ ...state(), currentView: TEST_VIEW })(TEST_VIEW); expect(result).toBe(false); }); it('returns false if given view is not activeView', () => { - const result = getters.isAliveView( - { ...state(), isOpen: true }, - { isActiveView: () => false }, - )(TEST_VIEW); + const result = getters.isAliveView({ + ...state(), + isOpen: true, + currentView: `${TEST_VIEW}_other`, + })(TEST_VIEW); expect(result).toBe(false); }); |