Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
3054fc2c
Commit
3054fc2c
authored
Aug 19, 2020
by
Albert Salim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch 'ss/mv-swimlanes-comp-to-ee' into 'master'"
This reverts merge request !38724
parent
de1b0a2b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
61 additions
and
299 deletions
+61
-299
app/assets/javascripts/boards/components/board_content.vue
app/assets/javascripts/boards/components/board_content.vue
+60
-8
app/assets/javascripts/boards/components/board_content_layout.vue
...ts/javascripts/boards/components/board_content_layout.vue
+0
-50
app/assets/javascripts/boards/index.js
app/assets/javascripts/boards/index.js
+1
-1
ee/app/assets/javascripts/boards/components/board_content.vue
...pp/assets/javascripts/boards/components/board_content.vue
+0
-54
ee/spec/frontend/boards/components/board_content_spec.js
ee/spec/frontend/boards/components/board_content_spec.js
+0
-80
spec/frontend/boards/components/board_content_layout_spec.js
spec/frontend/boards/components/board_content_layout_spec.js
+0
-66
spec/frontend/boards/components/board_content_spec.js
spec/frontend/boards/components/board_content_spec.js
+0
-40
No files found.
app/assets/javascripts/boards/components/board_content.vue
View file @
3054fc2c
<
script
>
import
BoardContentLayout
from
'
~/boards/components/board_content_layout.vue
'
;
import
BoardColumn
from
'
~/boards/components/board_column.vue
'
;
import
{
mapState
}
from
'
vuex
'
;
import
BoardColumn
from
'
ee_else_ce/boards/components/board_column.vue
'
;
import
EpicsSwimlanes
from
'
ee_component/boards/components/epics_swimlanes.vue
'
;
import
glFeatureFlagMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
export
default
{
components
:
{
BoardContentLayout
,
BoardColumn
,
EpicsSwimlanes
,
},
mixins
:
[
glFeatureFlagMixin
()],
props
:
{
lists
:
{
type
:
Array
,
required
:
true
,
},
canAdminList
:
{
type
:
Boolean
,
required
:
true
,
},
groupId
:
{
type
:
Number
,
required
:
false
,
default
:
null
,
},
disabled
:
{
type
:
Boolean
,
required
:
true
,
},
issueLinkBase
:
{
type
:
String
,
required
:
true
,
},
rootPath
:
{
type
:
String
,
required
:
true
,
},
boardId
:
{
type
:
String
,
required
:
true
,
},
},
computed
:
{
...
mapState
([
'
isShowingEpicsSwimlanes
'
,
'
boardLists
'
]),
isSwimlanesOn
()
{
return
this
.
glFeatures
.
boardsWithSwimlanes
&&
this
.
isShowingEpicsSwimlanes
;
},
},
};
</
script
>
<
template
>
<board-content-layout
v-bind=
"$attrs"
>
<template
#board-content-decoration
="
{ lists, canAdminList, groupId, disabled, issueLinkBase, rootPath, boardId }"
<div>
<div
v-if=
"!isSwimlanesOn"
class=
"boards-list gl-w-full gl-py-5 gl-px-3 gl-white-space-nowrap"
data-qa-selector=
"boards_list"
>
<board-column
v-for=
"list in lists"
...
...
@@ -27,6 +69,16 @@ export default {
:root-path=
"rootPath"
:board-id=
"boardId"
/>
</
template
>
</board-content-layout>
</div>
<epics-swimlanes
v-else
ref=
"swimlanes"
:lists=
"boardLists"
:can-admin-list=
"canAdminList"
:disabled=
"disabled"
:board-id=
"boardId"
:group-id=
"groupId"
:root-path=
"rootPath"
/>
</div>
</
template
>
app/assets/javascripts/boards/components/board_content_layout.vue
deleted
100644 → 0
View file @
de1b0a2b
<
script
>
export
default
{
props
:
{
lists
:
{
type
:
Array
,
required
:
true
,
},
canAdminList
:
{
type
:
Boolean
,
required
:
true
,
},
groupId
:
{
type
:
Number
,
required
:
false
,
default
:
null
,
},
disabled
:
{
type
:
Boolean
,
required
:
true
,
},
issueLinkBase
:
{
type
:
String
,
required
:
true
,
},
rootPath
:
{
type
:
String
,
required
:
true
,
},
boardId
:
{
type
:
String
,
required
:
true
,
},
isSwimlanesOff
:
{
type
:
Boolean
,
required
:
false
,
default
:
false
,
},
},
};
</
script
>
<
template
>
<div
:class=
"
{ 'boards-list gl-w-full gl-py-5 gl-px-3 gl-white-space-nowrap': isSwimlanesOff }"
data-qa-selector="boards_list"
data-testid="boards_list"
>
<slot
name=
"board-content-decoration"
v-bind=
"$props"
></slot>
</div>
</
template
>
app/assets/javascripts/boards/index.js
View file @
3054fc2c
...
...
@@ -4,7 +4,6 @@ import { mapActions } from 'vuex';
import
'
ee_else_ce/boards/models/issue
'
;
import
'
ee_else_ce/boards/models/list
'
;
import
BoardContent
from
'
ee_else_ce/boards/components/board_content.vue
'
;
import
BoardSidebar
from
'
ee_else_ce/boards/components/board_sidebar
'
;
import
initNewListDropdown
from
'
ee_else_ce/boards/components/new_list_dropdown
'
;
import
boardConfigToggle
from
'
ee_else_ce/boards/config_toggle
'
;
...
...
@@ -19,6 +18,7 @@ import {
}
from
'
ee_else_ce/boards/ee_functions
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
BoardContent
from
'
~/boards/components/board_content.vue
'
;
import
createDefaultClient
from
'
~/lib/graphql
'
;
import
Flash
from
'
~/flash
'
;
import
{
__
}
from
'
~/locale
'
;
...
...
ee/app/assets/javascripts/boards/components/board_content.vue
deleted
100644 → 0
View file @
de1b0a2b
<
script
>
import
{
mapState
}
from
'
vuex
'
;
import
glFeatureFlagMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
EpicsSwimlanes
from
'
ee_component/boards/components/epics_swimlanes.vue
'
;
import
BoardContentLayout
from
'
~/boards/components/board_content_layout.vue
'
;
import
BoardColumn
from
'
ee_component/boards/components/board_column.vue
'
;
export
default
{
components
:
{
BoardColumn
,
BoardContentLayout
,
EpicsSwimlanes
,
},
mixins
:
[
glFeatureFlagMixin
()],
computed
:
{
...
mapState
([
'
isShowingEpicsSwimlanes
'
,
'
boardLists
'
]),
isSwimlanesOn
()
{
return
this
.
glFeatures
.
boardsWithSwimlanes
&&
this
.
isShowingEpicsSwimlanes
;
},
},
};
</
script
>
<
template
>
<board-content-layout
v-bind=
"$attrs"
:is-swimlanes-off=
"!isSwimlanesOn"
>
<template
#board-content-decoration
="
{ lists, canAdminList, disabled, boardId, groupId, issueLinkBase, rootPath }"
>
<epics-swimlanes
v-if=
"isSwimlanesOn"
ref=
"swimlanes"
:lists=
"boardLists"
:can-admin-list=
"canAdminList"
:disabled=
"disabled"
:board-id=
"boardId"
:group-id=
"groupId"
:root-path=
"rootPath"
/>
<board-column
v-for=
"list in lists"
v-else
:key=
"list.id"
ref=
"board"
:can-admin-list=
"canAdminList"
:group-id=
"groupId"
:list=
"list"
:disabled=
"disabled"
:issue-link-base=
"issueLinkBase"
:root-path=
"rootPath"
:board-id=
"boardId"
/>
</
template
>
</board-content-layout>
</template>
ee/spec/frontend/boards/components/board_content_spec.js
deleted
100644 → 0
View file @
de1b0a2b
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
Vuex
from
'
vuex
'
;
import
axios
from
'
axios
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
BoardContent
from
'
ee_component/boards/components/board_content.vue
'
;
import
List
from
'
~/boards/models/list
'
;
import
BoardColumn
from
'
ee_component/boards/components/board_column.vue
'
;
import
EpicsSwimlanes
from
'
ee_component/boards/components/epics_swimlanes.vue
'
;
import
defaultState
from
'
ee_component/boards/stores/state
'
;
import
{
mockLists
}
from
'
../mock_data
'
;
const
localVue
=
createLocalVue
();
localVue
.
use
(
Vuex
);
describe
(
'
ee/BoardContent
'
,
()
=>
{
let
store
;
let
wrapper
;
let
mock
;
const
createStore
=
(
state
=
defaultState
())
=>
{
store
=
new
Vuex
.
Store
({
state
,
actions
:
{
fetchIssuesForAllLists
:
()
=>
{},
},
});
};
const
createComponent
=
(
boardsWithSwimlanes
=
false
)
=>
{
wrapper
=
mount
(
BoardContent
,
{
localVue
,
store
,
propsData
:
{
lists
:
mockLists
.
map
(
listMock
=>
new
List
(
listMock
)),
canAdminList
:
true
,
groupId
:
1
,
disabled
:
false
,
issueLinkBase
:
''
,
rootPath
:
''
,
boardId
:
''
,
},
provide
:
{
glFeatures
:
{
boardsWithSwimlanes
,
},
},
});
};
beforeEach
(()
=>
{
mock
=
new
MockAdapter
(
axios
);
});
afterEach
(()
=>
{
mock
.
restore
();
});
describe
(
'
when isSwimlanes and boardsWithSwimlanes
'
,
()
=>
{
beforeEach
(()
=>
{
createStore
();
store
.
state
.
isShowingEpicsSwimlanes
=
true
;
createComponent
(
true
);
});
it
(
'
renders EpicsSwimlanes
'
,
()
=>
{
expect
(
wrapper
.
find
(
EpicsSwimlanes
).
exists
()).
toBe
(
true
);
});
});
it
(
'
finds BoardColumns
'
,
()
=>
{
createStore
();
createComponent
();
expect
(
wrapper
.
findAll
(
BoardColumn
).
length
).
toBe
(
mockLists
.
length
);
});
});
spec/frontend/boards/components/board_content_layout_spec.js
deleted
100644 → 0
View file @
de1b0a2b
import
{
mount
}
from
'
@vue/test-utils
'
;
import
BoardContentLayout
from
'
~/boards/components/board_content_layout.vue
'
;
const
TestComponent
=
{
components
:
{
BoardContentLayout
},
template
:
`
<div>
<board-content-layout v-bind="$attrs">
<template v-slot:board-content-decoration="{ groupId }">
<p data-testid="child">{{ groupId }}</p>
</template>
</board-content-layout>
</div>
`
,
};
describe
(
'
BoardContentLayout
'
,
()
=>
{
let
wrapper
;
const
groupId
=
1
;
const
createComponent
=
props
=>
{
wrapper
=
mount
(
TestComponent
,
{
propsData
:
{
lists
:
[],
canAdminList
:
true
,
groupId
,
disabled
:
false
,
issueLinkBase
:
''
,
rootPath
:
''
,
boardId
:
''
,
...
props
,
},
});
};
afterEach
(()
=>
{
wrapper
.
destroy
();
wrapper
=
null
;
});
it
(
'
renders children in the slot
'
,
()
=>
{
createComponent
();
expect
(
wrapper
.
find
(
'
[data-testid="child"]
'
).
exists
()).
toBe
(
true
);
});
it
(
'
renders groupId from the scoped slot
'
,
()
=>
{
createComponent
();
expect
(
wrapper
.
find
(
'
[data-testid="child"]
'
).
text
()).
toContain
(
groupId
);
});
describe
(
'
when isSwimlanesOff
'
,
()
=>
{
it
(
'
renders the correct class on the root div
'
,
()
=>
{
createComponent
({
isSwimlanesOff
:
true
});
expect
(
wrapper
.
find
(
'
[data-testid="boards_list"]
'
).
classes
()).
toEqual
([
'
boards-list
'
,
'
gl-w-full
'
,
'
gl-py-5
'
,
'
gl-px-3
'
,
'
gl-white-space-nowrap
'
,
]);
});
});
});
spec/frontend/boards/components/board_content_spec.js
deleted
100644 → 0
View file @
de1b0a2b
import
{
mount
}
from
'
@vue/test-utils
'
;
import
axios
from
'
axios
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
BoardContent
from
'
~/boards/components/board_content.vue
'
;
import
BoardColumn
from
'
~/boards/components/board_column.vue
'
;
import
List
from
'
~/boards/models/list
'
;
import
{
listObj
}
from
'
../mock_data
'
;
describe
(
'
BoardContent
'
,
()
=>
{
let
wrapper
;
let
mock
;
const
createComponent
=
()
=>
{
wrapper
=
mount
(
BoardContent
,
{
propsData
:
{
lists
:
[
new
List
(
listObj
)],
canAdminList
:
true
,
groupId
:
1
,
disabled
:
false
,
issueLinkBase
:
''
,
rootPath
:
''
,
boardId
:
''
,
},
});
};
beforeEach
(()
=>
{
mock
=
new
MockAdapter
(
axios
);
});
afterEach
(()
=>
{
mock
.
restore
();
});
it
(
'
finds BoardColumns
'
,
()
=>
{
createComponent
();
expect
(
wrapper
.
findAll
(
BoardColumn
).
length
).
toBe
(
1
);
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment