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>2022-12-20 17:22:11 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-20 17:22:11 +0300
commit0c872e02b2c822e3397515ec324051ff540f0cd5 (patch)
treece2fb6ce7030e4dad0f4118d21ab6453e5938cdd /spec/frontend/projects/settings/repository/branch_rules/mock_data.js
parentf7e05a6853b12f02911494c4b3fe53d9540d74fc (diff)
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'spec/frontend/projects/settings/repository/branch_rules/mock_data.js')
-rw-r--r--spec/frontend/projects/settings/repository/branch_rules/mock_data.js68
1 files changed, 46 insertions, 22 deletions
diff --git a/spec/frontend/projects/settings/repository/branch_rules/mock_data.js b/spec/frontend/projects/settings/repository/branch_rules/mock_data.js
index 8aa03a12996..6f506882c36 100644
--- a/spec/frontend/projects/settings/repository/branch_rules/mock_data.js
+++ b/spec/frontend/projects/settings/repository/branch_rules/mock_data.js
@@ -1,3 +1,22 @@
+export const accessLevelsMockResponse = [
+ {
+ __typename: 'PushAccessLevelEdge',
+ node: {
+ __typename: 'PushAccessLevel',
+ accessLevel: 40,
+ accessLevelDescription: 'Developers',
+ },
+ },
+ {
+ __typename: 'PushAccessLevelEdge',
+ node: {
+ __typename: 'PushAccessLevel',
+ accessLevel: 40,
+ accessLevelDescription: 'Maintainers',
+ },
+ },
+];
+
export const branchRulesMockResponse = {
data: {
project: {
@@ -9,34 +28,34 @@ export const branchRulesMockResponse = {
{
name: 'main',
isDefault: true,
+ matchingBranchesCount: 1,
branchProtection: {
allowForcePush: true,
- codeOwnerApprovalRequired: true,
- },
- approvalRules: {
- nodes: [{ id: 1 }],
- __typename: 'ApprovalProjectRuleConnection',
- },
- externalStatusChecks: {
- nodes: [{ id: 1 }, { id: 2 }],
- __typename: 'BranchRule',
+ mergeAccessLevels: {
+ edges: [],
+ __typename: 'MergeAccessLevelConnection',
+ },
+ pushAccessLevels: {
+ edges: accessLevelsMockResponse,
+ __typename: 'PushAccessLevelConnection',
+ },
},
__typename: 'BranchRule',
},
{
name: 'test-*',
isDefault: false,
+ matchingBranchesCount: 2,
branchProtection: {
allowForcePush: false,
- codeOwnerApprovalRequired: false,
- },
- approvalRules: {
- nodes: [],
- __typename: 'ApprovalProjectRuleConnection',
- },
- externalStatusChecks: {
- nodes: [],
- __typename: 'BranchRule',
+ mergeAccessLevels: {
+ edges: [],
+ __typename: 'MergeAccessLevelConnection',
+ },
+ pushAccessLevels: {
+ edges: [],
+ __typename: 'PushAccessLevelConnection',
+ },
},
__typename: 'BranchRule',
},
@@ -57,17 +76,22 @@ export const branchRuleProvideMock = {
export const branchRulePropsMock = {
name: 'main',
isDefault: true,
+ matchingBranchesCount: 1,
branchProtection: {
allowForcePush: true,
- codeOwnerApprovalRequired: true,
+ codeOwnerApprovalRequired: false,
+ pushAccessLevels: {
+ edges: accessLevelsMockResponse,
+ },
},
- approvalRulesTotal: 1,
- statusChecksTotal: 2,
+ approvalRulesTotal: 0,
+ statusChecksTotal: 0,
};
export const branchRuleWithoutDetailsPropsMock = {
- name: 'main',
+ name: 'branch-1',
isDefault: false,
+ matchingBranchesCount: 1,
branchProtection: {
allowForcePush: false,
codeOwnerApprovalRequired: false,