diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/javascripts/lib/utils/common_utils_spec.js | 1 | ||||
-rw-r--r-- | spec/javascripts/sidebar/assignees_spec.js | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/spec/javascripts/lib/utils/common_utils_spec.js b/spec/javascripts/lib/utils/common_utils_spec.js index efff233451e..0fb90c3b78c 100644 --- a/spec/javascripts/lib/utils/common_utils_spec.js +++ b/spec/javascripts/lib/utils/common_utils_spec.js @@ -183,6 +183,7 @@ describe('common_utils', () => { scope: 'all', page: '2', }); + expect(commonUtils.parseQueryStringIntoObject('scope=all')).toEqual({ scope: 'all' }); expect(commonUtils.parseQueryStringIntoObject()).toEqual({}); }); diff --git a/spec/javascripts/sidebar/assignees_spec.js b/spec/javascripts/sidebar/assignees_spec.js index 6076fb07bc9..eced4925489 100644 --- a/spec/javascripts/sidebar/assignees_spec.js +++ b/spec/javascripts/sidebar/assignees_spec.js @@ -91,6 +91,7 @@ describe('Assignee component', () => { expect(assignee.querySelector('.avatar').getAttribute('alt')).toEqual( `${UsersMock.user.name}'s avatar`, ); + expect(assignee.querySelector('.author').innerText.trim()).toEqual(UsersMock.user.name); }); @@ -154,6 +155,7 @@ describe('Assignee component', () => { expect(first.querySelector('.avatar').getAttribute('alt')).toEqual( `${users[0].name}'s avatar`, ); + expect(first.querySelector('.author').innerText.trim()).toEqual(users[0].name); const second = collapsed.children[1]; @@ -162,6 +164,7 @@ describe('Assignee component', () => { expect(second.querySelector('.avatar').getAttribute('alt')).toEqual( `${users[1].name}'s avatar`, ); + expect(second.querySelector('.author').innerText.trim()).toEqual(users[1].name); }); @@ -185,6 +188,7 @@ describe('Assignee component', () => { expect(first.querySelector('.avatar').getAttribute('alt')).toEqual( `${users[0].name}'s avatar`, ); + expect(first.querySelector('.author').innerText.trim()).toEqual(users[0].name); const second = collapsed.children[1]; @@ -219,6 +223,7 @@ describe('Assignee component', () => { expect(component.$el.querySelectorAll('.user-item').length).toEqual( component.defaultRenderCount, ); + expect(component.$el.querySelector('.user-list-more')).not.toBe(null); const usersLabelExpectation = users.length - component.defaultRenderCount; |