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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-17 03:09:00 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-17 03:09:00 +0300
commitefb0c7f501e4a8883796b5acfdc584e2720febba (patch)
treea5870a33d1154a555a46b293aac42dbb4197b31d /spec/frontend/ide/stores
parent727b1a890c8e44440414c59611e9ead34d6edc93 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/ide/stores')
-rw-r--r--spec/frontend/ide/stores/modules/pane/actions_spec.js76
1 files changed, 40 insertions, 36 deletions
diff --git a/spec/frontend/ide/stores/modules/pane/actions_spec.js b/spec/frontend/ide/stores/modules/pane/actions_spec.js
index 8c0aeaff5b3..8c56714e0ed 100644
--- a/spec/frontend/ide/stores/modules/pane/actions_spec.js
+++ b/spec/frontend/ide/stores/modules/pane/actions_spec.js
@@ -8,14 +8,7 @@ describe('IDE pane module actions', () => {
describe('toggleOpen', () => {
it('dispatches open if closed', done => {
- testAction(
- actions.toggleOpen,
- TEST_VIEW,
- { isOpen: false },
- [],
- [{ type: 'open', payload: TEST_VIEW }],
- done,
- );
+ testAction(actions.toggleOpen, TEST_VIEW, { isOpen: false }, [], [{ type: 'open' }], done);
});
it('dispatches close if opened', done => {
@@ -24,37 +17,48 @@ describe('IDE pane module actions', () => {
});
describe('open', () => {
- it('commits SET_OPEN', done => {
- testAction(actions.open, null, {}, [{ type: types.SET_OPEN, payload: true }], [], done);
- });
+ describe('with a view specified', () => {
+ it('commits SET_OPEN and SET_CURRENT_VIEW', done => {
+ testAction(
+ actions.open,
+ TEST_VIEW,
+ {},
+ [
+ { type: types.SET_OPEN, payload: true },
+ { type: types.SET_CURRENT_VIEW, payload: TEST_VIEW.name },
+ ],
+ [],
+ done,
+ );
+ });
- it('commits SET_CURRENT_VIEW if view is given', done => {
- testAction(
- actions.open,
- TEST_VIEW,
- {},
- [
- { type: types.SET_OPEN, payload: true },
- { type: types.SET_CURRENT_VIEW, payload: TEST_VIEW.name },
- ],
- [],
- done,
- );
+ it('commits KEEP_ALIVE_VIEW if keepAlive is true', done => {
+ testAction(
+ actions.open,
+ TEST_VIEW_KEEP_ALIVE,
+ {},
+ [
+ { type: types.SET_OPEN, payload: true },
+ { type: types.SET_CURRENT_VIEW, payload: TEST_VIEW_KEEP_ALIVE.name },
+ { type: types.KEEP_ALIVE_VIEW, payload: TEST_VIEW_KEEP_ALIVE.name },
+ ],
+ [],
+ done,
+ );
+ });
});
- it('commits KEEP_ALIVE_VIEW if keepAlive is true', done => {
- testAction(
- actions.open,
- TEST_VIEW_KEEP_ALIVE,
- {},
- [
- { type: types.SET_OPEN, payload: true },
- { type: types.SET_CURRENT_VIEW, payload: TEST_VIEW_KEEP_ALIVE.name },
- { type: types.KEEP_ALIVE_VIEW, payload: TEST_VIEW_KEEP_ALIVE.name },
- ],
- [],
- done,
- );
+ describe('without a view specified', () => {
+ it('commits SET_OPEN', done => {
+ testAction(
+ actions.open,
+ undefined,
+ {},
+ [{ type: types.SET_OPEN, payload: true }],
+ [],
+ done,
+ );
+ });
});
});