summaryrefslogtreecommitdiff
path: root/spec/frontend/repository
diff options
context:
space:
mode:
authorIgor <idrozdov@gitlab.com>2019-07-17 13:06:19 +0000
committerNick Thomas <nick@gitlab.com>2019-07-17 13:06:19 +0000
commit0f46886880e46344856ede52dd3b500e4d6737ac (patch)
tree263867f1fba61ad987ca63d1253f15926d72d143 /spec/frontend/repository
parentb62c049f2db1e399dcd3c02b2507d444aeffe50d (diff)
downloadgitlab-ce-0f46886880e46344856ede52dd3b500e4d6737ac.tar.gz
Added submodule links to Submodule type in GraphQL API
This is part of migration of Folder View to Vue
Diffstat (limited to 'spec/frontend/repository')
-rw-r--r--spec/frontend/repository/components/table/row_spec.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/spec/frontend/repository/components/table/row_spec.js b/spec/frontend/repository/components/table/row_spec.js
index c566057ad3f..e539c560975 100644
--- a/spec/frontend/repository/components/table/row_spec.js
+++ b/spec/frontend/repository/components/table/row_spec.js
@@ -1,5 +1,5 @@
import { shallowMount, RouterLinkStub } from '@vue/test-utils';
-import { GlBadge } from '@gitlab/ui';
+import { GlBadge, GlLink } from '@gitlab/ui';
import { visitUrl } from '~/lib/utils/url_utility';
import TableRow from '~/repository/components/table/row.vue';
@@ -142,4 +142,18 @@ describe('Repository table row component', () => {
expect(vm.find(GlBadge).exists()).toBe(true);
});
+
+ it('renders commit and web links with href for submodule', () => {
+ factory({
+ id: '1',
+ path: 'test',
+ type: 'commit',
+ url: 'https://test.com',
+ submoduleTreeUrl: 'https://test.com/commit',
+ currentPath: '/',
+ });
+
+ expect(vm.find('a').attributes('href')).toEqual('https://test.com');
+ expect(vm.find(GlLink).attributes('href')).toEqual('https://test.com/commit');
+ });
});