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

mock_data.js « branch_rules « repository « settings « projects « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8aa03a129966dd5f17d26c57cf908ea03c22144b (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
export const branchRulesMockResponse = {
  data: {
    project: {
      id: '123',
      __typename: 'Project',
      branchRules: {
        __typename: 'BranchRuleConnection',
        nodes: [
          {
            name: 'main',
            isDefault: true,
            branchProtection: {
              allowForcePush: true,
              codeOwnerApprovalRequired: true,
            },
            approvalRules: {
              nodes: [{ id: 1 }],
              __typename: 'ApprovalProjectRuleConnection',
            },
            externalStatusChecks: {
              nodes: [{ id: 1 }, { id: 2 }],
              __typename: 'BranchRule',
            },
            __typename: 'BranchRule',
          },
          {
            name: 'test-*',
            isDefault: false,
            branchProtection: {
              allowForcePush: false,
              codeOwnerApprovalRequired: false,
            },
            approvalRules: {
              nodes: [],
              __typename: 'ApprovalProjectRuleConnection',
            },
            externalStatusChecks: {
              nodes: [],
              __typename: 'BranchRule',
            },
            __typename: 'BranchRule',
          },
        ],
      },
    },
  },
};

export const appProvideMock = {
  projectPath: 'some/project/path',
};

export const branchRuleProvideMock = {
  branchRulesPath: 'settings/repository/branch_rules',
};

export const branchRulePropsMock = {
  name: 'main',
  isDefault: true,
  branchProtection: {
    allowForcePush: true,
    codeOwnerApprovalRequired: true,
  },
  approvalRulesTotal: 1,
  statusChecksTotal: 2,
};

export const branchRuleWithoutDetailsPropsMock = {
  name: 'main',
  isDefault: false,
  branchProtection: {
    allowForcePush: false,
    codeOwnerApprovalRequired: false,
  },
  approvalRulesTotal: 0,
  statusChecksTotal: 0,
};