diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-12 12:06:18 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-12 12:06:18 +0000 |
commit | 1b7381e998ff4b33ec8f633766030082e95f10c8 (patch) | |
tree | 952eb7afc179cdf64cafedc7f23384741a51661b /spec | |
parent | 7801d133b6c33917a3a151c7a8db5243b148a487 (diff) | |
download | gitlab-ce-1b7381e998ff4b33ec8f633766030082e95f10c8.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r-- | spec/frontend/repository/components/table/__snapshots__/row_spec.js.snap | 2 | ||||
-rw-r--r-- | spec/frontend/repository/components/table/row_spec.js | 14 |
2 files changed, 16 insertions, 0 deletions
diff --git a/spec/frontend/repository/components/table/__snapshots__/row_spec.js.snap b/spec/frontend/repository/components/table/__snapshots__/row_spec.js.snap index d55dc553031..f8e65a51297 100644 --- a/spec/frontend/repository/components/table/__snapshots__/row_spec.js.snap +++ b/spec/frontend/repository/components/table/__snapshots__/row_spec.js.snap @@ -25,6 +25,8 @@ exports[`Repository table row component renders table row 1`] = ` <!----> <!----> + + <!----> </td> <td diff --git a/spec/frontend/repository/components/table/row_spec.js b/spec/frontend/repository/components/table/row_spec.js index 565a46bb957..04a5e0778a1 100644 --- a/spec/frontend/repository/components/table/row_spec.js +++ b/spec/frontend/repository/components/table/row_spec.js @@ -2,6 +2,7 @@ import { shallowMount, RouterLinkStub } from '@vue/test-utils'; import { GlBadge, GlLink } from '@gitlab/ui'; import { visitUrl } from '~/lib/utils/url_utility'; import TableRow from '~/repository/components/table/row.vue'; +import Icon from '~/vue_shared/components/icon.vue'; jest.mock('~/lib/utils/url_utility'); @@ -156,4 +157,17 @@ describe('Repository table row component', () => { expect(vm.find('a').attributes('href')).toEqual('https://test.com'); expect(vm.find(GlLink).attributes('href')).toEqual('https://test.com/commit'); }); + + it('renders lock icon', () => { + factory({ + id: '1', + path: 'test', + type: 'tree', + currentPath: '/', + }); + + vm.setData({ commit: { lockLabel: 'Locked by Root', committedDate: '2019-01-01' } }); + + expect(vm.find(Icon).exists()).toBe(true); + }); }); |