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
ad8d93e5
Commit
ad8d93e5
authored
Sep 01, 2021
by
Florie Guibert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add issue board sidebar test in board_content spec
parent
f842475e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
9 deletions
+27
-9
spec/frontend/boards/components/board_content_spec.js
spec/frontend/boards/components/board_content_spec.js
+27
-9
No files found.
spec/frontend/boards/components/board_content_spec.js
View file @
ad8d93e5
...
@@ -7,6 +7,7 @@ import EpicsSwimlanes from 'ee_component/boards/components/epics_swimlanes.vue';
...
@@ -7,6 +7,7 @@ import EpicsSwimlanes from 'ee_component/boards/components/epics_swimlanes.vue';
import
getters
from
'
ee_else_ce/boards/stores/getters
'
;
import
getters
from
'
ee_else_ce/boards/stores/getters
'
;
import
BoardColumn
from
'
~/boards/components/board_column.vue
'
;
import
BoardColumn
from
'
~/boards/components/board_column.vue
'
;
import
BoardContent
from
'
~/boards/components/board_content.vue
'
;
import
BoardContent
from
'
~/boards/components/board_content.vue
'
;
import
BoardContentSidebar
from
'
~/boards/components/board_content_sidebar.vue
'
;
import
{
mockLists
,
mockListsWithModel
}
from
'
../mock_data
'
;
import
{
mockLists
,
mockListsWithModel
}
from
'
../mock_data
'
;
Vue
.
use
(
Vuex
);
Vue
.
use
(
Vuex
);
...
@@ -23,6 +24,7 @@ describe('BoardContent', () => {
...
@@ -23,6 +24,7 @@ describe('BoardContent', () => {
isShowingEpicsSwimlanes
:
false
,
isShowingEpicsSwimlanes
:
false
,
boardLists
:
mockLists
,
boardLists
:
mockLists
,
error
:
undefined
,
error
:
undefined
,
issuableType
:
'
issue
'
,
};
};
const
createStore
=
(
state
=
defaultState
)
=>
{
const
createStore
=
(
state
=
defaultState
)
=>
{
...
@@ -51,21 +53,37 @@ describe('BoardContent', () => {
...
@@ -51,21 +53,37 @@ describe('BoardContent', () => {
});
});
};
};
beforeEach
(()
=>
{
createComponent
();
});
afterEach
(()
=>
{
afterEach
(()
=>
{
wrapper
.
destroy
();
wrapper
.
destroy
();
});
});
it
(
'
renders a BoardColumn component per list
'
,
()
=>
{
describe
(
'
default
'
,
()
=>
{
expect
(
wrapper
.
findAllComponents
(
BoardColumn
)).
toHaveLength
(
mockListsWithModel
.
length
);
beforeEach
(()
=>
{
createComponent
();
});
it
(
'
renders a BoardColumn component per list
'
,
()
=>
{
expect
(
wrapper
.
findAllComponents
(
BoardColumn
)).
toHaveLength
(
mockListsWithModel
.
length
);
});
it
(
'
renders BoardContentSidebar
'
,
()
=>
{
expect
(
wrapper
.
find
(
BoardContentSidebar
).
exists
()).
toBe
(
true
);
});
it
(
'
does not display EpicsSwimlanes component
'
,
()
=>
{
expect
(
wrapper
.
find
(
EpicsSwimlanes
).
exists
()).
toBe
(
false
);
expect
(
wrapper
.
find
(
GlAlert
).
exists
()).
toBe
(
false
);
});
});
});
it
(
'
does not display EpicsSwimlanes component
'
,
()
=>
{
describe
(
'
when issuableType is not issue
'
,
()
=>
{
expect
(
wrapper
.
find
(
EpicsSwimlanes
).
exists
()).
toBe
(
false
);
beforeEach
(()
=>
{
expect
(
wrapper
.
find
(
GlAlert
).
exists
()).
toBe
(
false
);
createComponent
({
state
:
{
issuableType
:
'
foo
'
}
});
});
it
(
'
does not render BoardContentSidebar
'
,
()
=>
{
expect
(
wrapper
.
find
(
BoardContentSidebar
).
exists
()).
toBe
(
false
);
});
});
});
describe
(
'
can admin list
'
,
()
=>
{
describe
(
'
can admin list
'
,
()
=>
{
...
...
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