summaryrefslogtreecommitdiff
path: root/spec/javascripts/notes
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2019-02-20 14:51:06 +0000
committerPhil Hughes <me@iamphill.com>2019-02-20 14:51:06 +0000
commit810a8b78b6ab09ea0259f5b6487d9ff2499d3caf (patch)
treebea1f98fd41cfbfa3bb2fb396921c40c0ab9cf44 /spec/javascripts/notes
parentd7db2232f0cdb901f50d44f0887997ab9bb426b4 (diff)
downloadgitlab-ce-810a8b78b6ab09ea0259f5b6487d9ff2499d3caf.tar.gz
CE backport of design-management-issue-tab
Backports template and Vue changes from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/9632 to CE
Diffstat (limited to 'spec/javascripts/notes')
-rw-r--r--spec/javascripts/notes/components/note_app_spec.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/javascripts/notes/components/note_app_spec.js b/spec/javascripts/notes/components/note_app_spec.js
index d5c0bf6b25d..82f58dafc78 100644
--- a/spec/javascripts/notes/components/note_app_spec.js
+++ b/spec/javascripts/notes/components/note_app_spec.js
@@ -83,6 +83,8 @@ describe('note_app', () => {
describe('render', () => {
beforeEach(() => {
+ setFixtures('<div class="js-discussions-count"></div>');
+
Vue.http.interceptors.push(mockData.individualNoteInterceptor);
wrapper = mountComponent();
});
@@ -127,6 +129,14 @@ describe('note_app', () => {
it('should render form comment button as disabled', () => {
expect(wrapper.find('.js-note-new-discussion').attributes('disabled')).toEqual('disabled');
});
+
+ it('updates discussions badge', done => {
+ setTimeout(() => {
+ expect(document.querySelector('.js-discussions-count').textContent).toEqual('2');
+
+ done();
+ });
+ });
});
describe('while fetching data', () => {