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
846cf06d
Commit
846cf06d
authored
Feb 10, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added specs
parent
86b2f90d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
15 deletions
+57
-15
app/assets/javascripts/boards/components/boards_backlog_help.js.es6
.../javascripts/boards/components/boards_backlog_help.js.es6
+2
-13
app/assets/javascripts/boards/mixins/modal_mixins.js.es6
app/assets/javascripts/boards/mixins/modal_mixins.js.es6
+7
-2
spec/features/boards/backlog_help_spec.rb
spec/features/boards/backlog_help_spec.rb
+48
-0
No files found.
app/assets/javascripts/boards/components/boards_backlog_help.js.es6
View file @
846cf06d
/* global Cookies */
const Vue = require('vue');
const Vue = require('vue');
const checkmarkIcon = require('../icons/checkmark');
const checkmarkIcon = require('../icons/checkmark');
...
@@ -10,16 +9,6 @@ module.exports = Vue.extend({
...
@@ -10,16 +9,6 @@ module.exports = Vue.extend({
data() {
data() {
return ModalStore.store;
return ModalStore.store;
},
},
methods: {
closeHelp(openModal) {
Store.state.helpHidden = true;
Cookies.set('boards_backlog_help_hidden', true);
if (openModal) {
this.toggleModal(true);
}
},
},
computed: {
computed: {
disabled() {
disabled() {
return !Store.state.lists
return !Store.state.lists
...
@@ -34,7 +23,7 @@ module.exports = Vue.extend({
...
@@ -34,7 +23,7 @@ module.exports = Vue.extend({
type="button"
type="button"
class="close"
class="close"
aria-label="Close backlog help"
aria-label="Close backlog help"
@click="
closeHelp
(false)">
@click="
toggleModal
(false)">
<i class="fa fa-times"></i>
<i class="fa fa-times"></i>
</button>
</button>
</h4>
</h4>
...
@@ -50,7 +39,7 @@ module.exports = Vue.extend({
...
@@ -50,7 +39,7 @@ module.exports = Vue.extend({
class="btn btn-success"
class="btn btn-success"
type="button"
type="button"
:disabled="disabled"
:disabled="disabled"
@click="
closeHelp
(true)">
@click="
toggleModal
(true)">
Add issues
Add issues
</button>
</button>
</div>
</div>
...
...
app/assets/javascripts/boards/mixins/modal_mixins.js.es6
View file @
846cf06d
/* global Cookies */
(() => {
(() => {
const Store = gl.issueBoards.BoardsStore;
const ModalStore = gl.issueBoards.ModalStore;
const ModalStore = gl.issueBoards.ModalStore;
gl.issueBoards.ModalMixins = {
gl.issueBoards.ModalMixins = {
methods: {
methods: {
toggleModal(toggle) {
toggleModal(toggleModal) {
ModalStore.store.showAddIssuesModal = toggle;
Cookies.set('boards_backlog_help_hidden', true);
Store.state.helpHidden = true;
ModalStore.store.showAddIssuesModal = toggleModal;
},
},
changeTab(tab) {
changeTab(tab) {
ModalStore.store.activeTab = tab;
ModalStore.store.activeTab = tab;
...
...
spec/features/boards/backlog_help_spec.rb
0 → 100644
View file @
846cf06d
require
'rails_helper'
describe
'Issue Boards'
,
:feature
,
:js
do
include
WaitForVueResource
let
(
:project
)
{
create
(
:empty_project
,
:public
)
}
let
(
:board
)
{
create
(
:board
,
project:
project
)
}
let
(
:user
)
{
create
(
:user
)
}
let!
(
:planning
)
{
create
(
:label
,
project:
project
,
name:
'Planning'
)
}
let!
(
:list1
)
{
create
(
:list
,
board:
board
,
label:
planning
,
position:
0
)
}
before
do
project
.
team
<<
[
user
,
:master
]
login_as
(
user
)
visit
namespace_project_board_path
(
project
.
namespace
,
project
,
board
)
wait_for_vue_resource
end
it
'shows backlog help box'
do
expect
(
page
).
to
have_selector
(
'.boards-backlog-help'
)
end
it
'closes backlog help box'
do
page
.
within
'.boards-backlog-help'
do
find
(
'.close'
).
click
end
expect
(
page
).
not_to
have_selector
(
'.boards-backlog-help'
)
end
it
'closes backlog help box when clicking add issues button inside box'
do
page
.
within
'.boards-backlog-help'
do
click_button
'Add issues'
end
expect
(
page
).
not_to
have_selector
(
'.boards-backlog-help'
)
end
it
'closes backlog help box when clicking add issues button'
do
page
.
within
'.issue-boards-search'
do
click_button
'Add issues'
end
expect
(
page
).
not_to
have_selector
(
'.boards-backlog-help'
)
end
end
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