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
4df7e5e3
Commit
4df7e5e3
authored
Oct 11, 2017
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update Edit button specs
parent
f18d1da6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
9 deletions
+17
-9
spec/features/boards/multiple_boards_spec.rb
spec/features/boards/multiple_boards_spec.rb
+2
-1
spec/javascripts/boards/components/labels_select_spec.js
spec/javascripts/boards/components/labels_select_spec.js
+15
-8
No files found.
spec/features/boards/multiple_boards_spec.rb
View file @
4df7e5e3
...
@@ -153,10 +153,11 @@ describe 'Multiple Issue Boards', :js do
...
@@ -153,10 +153,11 @@ describe 'Multiple Issue Boards', :js do
click_button
board
.
name
click_button
board
.
name
page
.
within
(
'.dropdown-menu'
)
do
page
.
within
(
'.dropdown-menu'
)
do
expect
(
page
).
to
have_content
(
'Edit board'
)
expect
(
page
).
not_to
have_content
(
'Create new board'
)
expect
(
page
).
not_to
have_content
(
'Create new board'
)
expect
(
page
).
not_to
have_content
(
'Delete board'
)
expect
(
page
).
not_to
have_content
(
'Delete board'
)
end
end
expect
(
page
).
to
have_content
(
'Edit board'
)
end
end
it
'shows a mention that boards are hidden when multiple boards are created'
do
it
'shows a mention that boards are hidden when multiple boards are created'
do
...
...
spec/javascripts/boards/components/labels_select_spec.js
View file @
4df7e5e3
...
@@ -39,11 +39,10 @@ describe('LabelsSelect', () => {
...
@@ -39,11 +39,10 @@ describe('LabelsSelect', () => {
setFixtures
(
'
<div class="test-container"></div>
'
);
setFixtures
(
'
<div class="test-container"></div>
'
);
const
deferred
=
new
jQuery
.
Deferred
();
const
deferred
=
new
jQuery
.
Deferred
();
spyOn
(
$
,
'
ajax
'
).
and
.
returnValue
(
deferred
);
spyOn
(
$
,
'
ajax
'
).
and
.
returnValue
(
deferred
.
resolve
([
deferred
.
resolve
([
label
,
label
,
label2
,
label2
,
]);
])
)
;
// eslint-disable-next-line no-new
// eslint-disable-next-line no-new
new
IssuableContext
();
new
IssuableContext
();
...
@@ -64,13 +63,21 @@ describe('LabelsSelect', () => {
...
@@ -64,13 +63,21 @@ describe('LabelsSelect', () => {
Vue
.
nextTick
(
done
);
Vue
.
nextTick
(
done
);
});
});
describe
(
'
canEdit false
'
,
()
=>
{
});
describe
(
'
canEdit
'
,
()
=>
{
describe
(
'
canEdit
'
,
()
=>
{
it
(
'
shows edit link
'
,
()
=>
{
it
(
'
hides Edit button
'
,
(
done
)
=>
{
vm
.
canEdit
=
false
;
Vue
.
nextTick
(()
=>
{
expect
(
document
.
querySelector
(
'
.edit-link
'
)).
toBeFalsy
();
done
();
});
});
it
(
'
shows Edit button if true
'
,
(
done
)
=>
{
vm
.
canEdit
=
true
;
Vue
.
nextTick
(()
=>
{
expect
(
document
.
querySelector
(
'
.edit-link
'
)).
toBeTruthy
();
done
();
});
});
});
});
});
...
...
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