summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-11-09 09:17:14 +0000
committerFatih Acet <acetfatih@gmail.com>2016-11-10 17:53:34 +0300
commit948b4828ce75b56ddc71ac08c5e3a8a08b405fcc (patch)
treee7c00a270b56b6521fcfb3ef2eb65eb6cecffd41
parenta9349f5734410b57cf5434262727d2df3aa11fa4 (diff)
downloadgitlab-ce-948b4828ce75b56ddc71ac08c5e3a8a08b405fcc.tar.gz
Issue board spec fixes
-rw-r--r--app/assets/javascripts/boards/stores/boards_store.js.es62
-rw-r--r--app/assets/javascripts/diff_notes/components/resolve_count.js.es62
-rw-r--r--spec/features/boards/new_issue_spec.rb2
3 files changed, 4 insertions, 2 deletions
diff --git a/app/assets/javascripts/boards/stores/boards_store.js.es6 b/app/assets/javascripts/boards/stores/boards_store.js.es6
index 1d5071657b7..3af71fcc081 100644
--- a/app/assets/javascripts/boards/stores/boards_store.js.es6
+++ b/app/assets/javascripts/boards/stores/boards_store.js.es6
@@ -27,6 +27,8 @@
const list = new List(listObj);
this.state.lists.push(list);
+ this.state.lists = _.sortBy(this.state.lists, 'position');
+
return list;
},
new (listObj) {
diff --git a/app/assets/javascripts/diff_notes/components/resolve_count.js.es6 b/app/assets/javascripts/diff_notes/components/resolve_count.js.es6
index b78d63314da..9522ccb49da 100644
--- a/app/assets/javascripts/diff_notes/components/resolve_count.js.es6
+++ b/app/assets/javascripts/diff_notes/components/resolve_count.js.es6
@@ -15,7 +15,7 @@
return this.resolvedDiscussionCount === this.discussionCount;
},
resolvedCountText() {
- return this.discussionCount === 0 ? 'discussion' : 'discussions';
+ return this.discussionCount === 1 ? 'discussion' : 'discussions';
}
}
});
diff --git a/spec/features/boards/new_issue_spec.rb b/spec/features/boards/new_issue_spec.rb
index 760a8967123..a03cd6fbf2d 100644
--- a/spec/features/boards/new_issue_spec.rb
+++ b/spec/features/boards/new_issue_spec.rb
@@ -46,7 +46,7 @@ describe 'Issue Boards new issue', feature: true, js: true do
click_button 'Cancel'
- expect(page).to have_selector('.board-new-issue-form', visible: false)
+ expect(page).not_to have_selector('.board-new-issue-form')
end
end