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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
fee064be
Commit
fee064be
authored
Feb 03, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed modal lists dropdown not updating when list is deleted
parent
8c5e50e1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
6 deletions
+26
-6
app/assets/javascripts/boards/boards_bundle.js.es6
app/assets/javascripts/boards/boards_bundle.js.es6
+0
-4
app/assets/javascripts/boards/components/modal/lists_dropdown.js.es6
...javascripts/boards/components/modal/lists_dropdown.js.es6
+4
-1
app/assets/javascripts/boards/stores/modal_store.js.es6
app/assets/javascripts/boards/stores/modal_store.js.es6
+1
-1
spec/features/boards/add_issues_modal_spec.rb
spec/features/boards/add_issues_modal_spec.rb
+21
-0
No files found.
app/assets/javascripts/boards/boards_bundle.js.es6
View file @
fee064be
...
@@ -71,10 +71,6 @@ $(() => {
...
@@ -71,10 +71,6 @@ $(() => {
Store.addBlankState();
Store.addBlankState();
this.loading = false;
this.loading = false;
if (this.state.lists.length > 0) {
ModalStore.store.selectedList = this.state.lists[0];
}
});
});
}
}
});
});
...
...
app/assets/javascripts/boards/components/modal/lists_dropdown.js.es6
View file @
fee064be
...
@@ -11,9 +11,12 @@
...
@@ -11,9 +11,12 @@
},
},
computed: {
computed: {
selected() {
selected() {
return this.modal.selectedList;
return this.modal.selectedList
|| this.state.lists[0]
;
},
},
},
},
destroyed() {
this.modal.selectedList = null;
},
template: `
template: `
<div class="dropdown inline">
<div class="dropdown inline">
<button
<button
...
...
app/assets/javascripts/boards/stores/modal_store.js.es6
View file @
fee064be
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
selectedIssues: [],
selectedIssues: [],
showAddIssuesModal: false,
showAddIssuesModal: false,
activeTab: 'all',
activeTab: 'all',
selectedList:
{}
,
selectedList:
null
,
searchTerm: '',
searchTerm: '',
loading: false,
loading: false,
loadingNewPage: false,
loadingNewPage: false,
...
...
spec/features/boards/add_issues_modal_spec.rb
View file @
fee064be
...
@@ -76,6 +76,27 @@ describe 'Issue Boards add issue modal', :feature, :js do
...
@@ -76,6 +76,27 @@ describe 'Issue Boards add issue modal', :feature, :js do
end
end
end
end
context
'list dropdown'
do
it
'resets after deleting list'
do
page
.
within
(
'.add-issues-modal'
)
do
expect
(
find
(
'.add-issues-footer'
)).
to
have_button
(
planning
.
title
)
click_button
'Cancel'
end
first
(
'.board-delete'
).
click
click_button
(
'Add issues'
)
wait_for_vue_resource
page
.
within
(
'.add-issues-modal'
)
do
expect
(
find
(
'.add-issues-footer'
)).
not_to
have_button
(
planning
.
title
)
expect
(
find
(
'.add-issues-footer'
)).
to
have_button
(
label
.
title
)
end
end
end
context
'search'
do
context
'search'
do
it
'returns issues'
do
it
'returns issues'
do
page
.
within
(
'.add-issues-modal'
)
do
page
.
within
(
'.add-issues-modal'
)
do
...
...
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