Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-04-04 00:08:25 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-04-04 00:08:25 +0300
commit21cf3e773d0527e95d761e7cc49bdbb2155183d3 (patch)
tree5ce861aa5c749a0b372efc4997d09a3fac726e87 /spec/frontend/import
parent7c8468c5ba828e1c1afe6ba0b25c77c130a69413 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/import')
-rw-r--r--spec/frontend/import/details/components/import_details_app_spec.js23
-rw-r--r--spec/frontend/import/details/mock_data.js31
2 files changed, 54 insertions, 0 deletions
diff --git a/spec/frontend/import/details/components/import_details_app_spec.js b/spec/frontend/import/details/components/import_details_app_spec.js
new file mode 100644
index 00000000000..178ce071de0
--- /dev/null
+++ b/spec/frontend/import/details/components/import_details_app_spec.js
@@ -0,0 +1,23 @@
+import { shallowMount } from '@vue/test-utils';
+import ImportDetailsApp from '~/import/details/components/import_details_app.vue';
+import { mockProject } from '../mock_data';
+
+describe('Import details app', () => {
+ let wrapper;
+
+ const createComponent = () => {
+ wrapper = shallowMount(ImportDetailsApp, {
+ propsData: {
+ project: mockProject,
+ },
+ });
+ };
+
+ describe('template', () => {
+ it('renders heading', () => {
+ createComponent();
+
+ expect(wrapper.find('h1').text()).toBe(ImportDetailsApp.i18n.pageTitle);
+ });
+ });
+});
diff --git a/spec/frontend/import/details/mock_data.js b/spec/frontend/import/details/mock_data.js
new file mode 100644
index 00000000000..514fb3a923d
--- /dev/null
+++ b/spec/frontend/import/details/mock_data.js
@@ -0,0 +1,31 @@
+export const mockProject = {
+ id: 26,
+ name: 'acl',
+ fullPath: '/root/acl',
+ fullName: 'Administrator / acl',
+ refsUrl: '/root/acl/refs',
+ importSource: 'namespace/acl',
+ importStatus: 'finished',
+ humanImportStatusName: 'finished',
+ providerLink: 'https://github.com/namespace/acl',
+ relationType: null,
+ stats: {
+ fetched: {
+ note: 1,
+ issue: 2,
+ label: 5,
+ collaborator: 2,
+ pullRequest: 1,
+ pullRequestMergedBy: 1,
+ },
+ imported: {
+ note: 1,
+ issue: 2,
+ label: 6,
+ collaborator: 3,
+ pullRequest: 1,
+ pullRequestMergedBy: 1,
+ pullRequestReviewRequest: 1,
+ },
+ },
+};