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

fixtures.js « graphql « import_groups « import_entities « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d1bd52693b6fdd2b805f55b4c9b0aaa8fe136bbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import { clientTypenames } from '~/import_entities/import_groups/graphql/client_factory';

export const generateFakeEntry = ({ id, status, ...rest }) => ({
  __typename: clientTypenames.BulkImportSourceGroup,
  web_url: `https://fake.host/${id}`,
  full_path: `fake_group_${id}`,
  full_name: `fake_name_${id}`,
  import_target: {
    target_namespace: 'root',
    new_name: `group${id}`,
  },
  last_import_target: {
    target_namespace: 'root',
    new_name: `last-group${id}`,
  },
  id,
  progress: {
    id: `test-${id}`,
    status,
  },
  validation_errors: [],
  ...rest,
});

export const statusEndpointFixture = {
  importable_data: [
    {
      id: 2595438,
      full_name: 'AutoBreakfast',
      full_path: 'auto-breakfast',
      web_url: 'https://gitlab.com/groups/auto-breakfast',
    },
    {
      id: 4347861,
      full_name: 'GitLab Data',
      full_path: 'gitlab-data',
      web_url: 'https://gitlab.com/groups/gitlab-data',
    },
    {
      id: 5723700,
      full_name: 'GitLab Services',
      full_path: 'gitlab-services',
      web_url: 'https://gitlab.com/groups/gitlab-services',
    },
    {
      id: 349181,
      full_name: 'GitLab-examples',
      full_path: 'gitlab-examples',
      web_url: 'https://gitlab.com/groups/gitlab-examples',
    },
  ],
};

export const availableNamespacesFixture = [
  { id: 24, full_path: 'Commit451' },
  { id: 22, full_path: 'gitlab-org' },
  { id: 23, full_path: 'gnuwget' },
  { id: 25, full_path: 'jashkenas' },
];