diff options
Diffstat (limited to 'spec/frontend/repository')
-rw-r--r-- | spec/frontend/repository/components/table/__snapshots__/row_spec.js.snap | 22 | ||||
-rw-r--r-- | spec/frontend/repository/components/table/row_spec.js | 9 |
2 files changed, 15 insertions, 16 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 5b5c9fd714e..97597ed8063 100644 --- a/spec/frontend/repository/components/table/__snapshots__/row_spec.js.snap +++ b/spec/frontend/repository/components/table/__snapshots__/row_spec.js.snap @@ -7,17 +7,16 @@ exports[`Repository table row component renders table row 1`] = ` <td class="tree-item-file-name cursor-default position-relative" > - <!----> - <a class="tree-item-link str-truncated" data-qa-selector="file_name_link" href="https://test.com" > - <i - aria-label="file" - class="fa fa-fw mr-1 fa-file-text-o" - role="img" + <file-icon-stub + class="mr-1 position-relative text-secondary" + cssclasses="position-relative file-icon" + filename="test" + size="16" /> <span class="position-relative" @@ -60,17 +59,16 @@ exports[`Repository table row component renders table row for path with special <td class="tree-item-file-name cursor-default position-relative" > - <!----> - <a class="tree-item-link str-truncated" data-qa-selector="file_name_link" href="https://test.com" > - <i - aria-label="file" - class="fa fa-fw mr-1 fa-file-text-o" - role="img" + <file-icon-stub + class="mr-1 position-relative text-secondary" + cssclasses="position-relative file-icon" + filename="test" + size="16" /> <span class="position-relative" diff --git a/spec/frontend/repository/components/table/row_spec.js b/spec/frontend/repository/components/table/row_spec.js index 7bb7ad6e5dd..cb2193e1d9a 100644 --- a/spec/frontend/repository/components/table/row_spec.js +++ b/spec/frontend/repository/components/table/row_spec.js @@ -1,7 +1,7 @@ import { shallowMount, RouterLinkStub } from '@vue/test-utils'; -import { GlBadge, GlLink, GlLoadingIcon } from '@gitlab/ui'; +import { GlBadge, GlLink, GlIcon } from '@gitlab/ui'; import TableRow from '~/repository/components/table/row.vue'; -import Icon from '~/vue_shared/components/icon.vue'; +import FileIcon from '~/vue_shared/components/file_icon.vue'; let vm; let $router; @@ -188,7 +188,8 @@ describe('Repository table row component', () => { vm.setData({ commit: { lockLabel: 'Locked by Root', committedDate: '2019-01-01' } }); return vm.vm.$nextTick().then(() => { - expect(vm.find(Icon).exists()).toBe(true); + expect(vm.find(GlIcon).exists()).toBe(true); + expect(vm.find(GlIcon).props('name')).toBe('lock'); }); }); @@ -202,6 +203,6 @@ describe('Repository table row component', () => { loadingPath: 'test', }); - expect(vm.find(GlLoadingIcon).exists()).toBe(true); + expect(vm.find(FileIcon).props('loading')).toBe(true); }); }); |