diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /spec/frontend/sidebar/components/assignees/assignees_spec.js | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'spec/frontend/sidebar/components/assignees/assignees_spec.js')
-rw-r--r-- | spec/frontend/sidebar/components/assignees/assignees_spec.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/spec/frontend/sidebar/components/assignees/assignees_spec.js b/spec/frontend/sidebar/components/assignees/assignees_spec.js index 6971ae2f9ed..d422292ed9e 100644 --- a/spec/frontend/sidebar/components/assignees/assignees_spec.js +++ b/spec/frontend/sidebar/components/assignees/assignees_spec.js @@ -1,10 +1,10 @@ import { GlIcon } from '@gitlab/ui'; import { mount } from '@vue/test-utils'; -import { nextTick } from 'vue'; import { trimText } from 'helpers/text_helper'; import UsersMockHelper from 'helpers/user_mock_data_helper'; import Assignee from '~/sidebar/components/assignees/assignees.vue'; import AssigneeAvatarLink from '~/sidebar/components/assignees/assignee_avatar_link.vue'; +import CollapsedAssigneeList from '~/sidebar/components/assignees/collapsed_assignee_list.vue'; import UsersMock from '../../mock_data'; describe('Assignee component', () => { @@ -66,10 +66,8 @@ describe('Assignee component', () => { editable: true, }); - jest.spyOn(wrapper.vm, '$emit'); - wrapper.find('[data-testid="assign-yourself"]').trigger('click'); + await wrapper.find('[data-testid="assign-yourself"]').trigger('click'); - await nextTick(); expect(wrapper.emitted('assign-self')).toHaveLength(1); }); }); @@ -166,7 +164,11 @@ describe('Assignee component', () => { editable: true, }); - expect(wrapper.vm.sortedAssigness[0].can_merge).toBe(true); + expect(wrapper.findComponent(CollapsedAssigneeList).props('users')[0]).toEqual( + expect.objectContaining({ + can_merge: true, + }), + ); }); it('passes the sorted assignees to the uncollapsed-assignee-list', () => { |