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:
Diffstat (limited to 'spec/frontend/invite_members/mock_data')
-rw-r--r--spec/frontend/invite_members/mock_data/api_responses.js62
-rw-r--r--spec/frontend/invite_members/mock_data/group_modal.js1
-rw-r--r--spec/frontend/invite_members/mock_data/member_modal.js1
3 files changed, 16 insertions, 48 deletions
diff --git a/spec/frontend/invite_members/mock_data/api_responses.js b/spec/frontend/invite_members/mock_data/api_responses.js
index a3e426376d8..4ad3b6aeb66 100644
--- a/spec/frontend/invite_members/mock_data/api_responses.js
+++ b/spec/frontend/invite_members/mock_data/api_responses.js
@@ -1,12 +1,12 @@
-const INVITATIONS_API_EMAIL_INVALID = {
+const EMAIL_INVALID = {
message: { error: 'email contains an invalid email address' },
};
-const INVITATIONS_API_ERROR_EMAIL_INVALID = {
+const ERROR_EMAIL_INVALID = {
error: 'email contains an invalid email address',
};
-const INVITATIONS_API_EMAIL_RESTRICTED = {
+const EMAIL_RESTRICTED = {
message: {
'email@example.com':
"The member's email address is not allowed for this project. Go to the Admin area > Sign-up restrictions, and check Allowed domains for sign-ups.",
@@ -14,65 +14,31 @@ const INVITATIONS_API_EMAIL_RESTRICTED = {
status: 'error',
};
-const INVITATIONS_API_MULTIPLE_EMAIL_RESTRICTED = {
+const MULTIPLE_RESTRICTED = {
message: {
'email@example.com':
"The member's email address is not allowed for this project. Go to the Admin area > Sign-up restrictions, and check Allowed domains for sign-ups.",
'email4@example.com':
"The member's email address is not allowed for this project. Go to the Admin area > Sign-up restrictions, and check the Domain denylist.",
- },
- status: 'error',
-};
-
-const INVITATIONS_API_EMAIL_TAKEN = {
- message: {
- 'email@example.org': 'Invite email has already been taken',
- },
- status: 'error',
-};
-
-const MEMBERS_API_MEMBER_ALREADY_EXISTS = {
- message: 'Member already exists',
-};
-
-const MEMBERS_API_SINGLE_USER_RESTRICTED = {
- message: {
- user: [
+ root:
"The member's email address is not allowed for this project. Go to the Admin area > Sign-up restrictions, and check Allowed domains for sign-ups.",
- ],
},
+ status: 'error',
};
-const MEMBERS_API_SINGLE_USER_ACCESS_LEVEL = {
+const EMAIL_TAKEN = {
message: {
- access_level: [
- 'should be greater than or equal to Owner inherited membership from group Gitlab Org',
- ],
+ 'email@example.org': "The member's email address has already been taken",
},
-};
-
-const MEMBERS_API_MULTIPLE_USERS_RESTRICTED = {
- message:
- "root: The member's email address is not allowed for this project. Go to the Admin area > Sign-up restrictions, and check Allowed domains for sign-ups. and user18: The member's email address is not allowed for this project. Go to the Admin area > Sign-up restrictions, and check the Domain denylist. and john_doe31: The member's email address is not allowed for this project. Go to the Admin area > Sign-up restrictions, and check Email restrictions for sign-ups.",
status: 'error',
};
-export const apiPaths = {
- GROUPS_MEMBERS: '/api/v4/groups/1/members',
- GROUPS_INVITATIONS: '/api/v4/groups/1/invitations',
-};
-
-export const membersApiResponse = {
- MEMBER_ALREADY_EXISTS: MEMBERS_API_MEMBER_ALREADY_EXISTS,
- SINGLE_USER_ACCESS_LEVEL: MEMBERS_API_SINGLE_USER_ACCESS_LEVEL,
- SINGLE_USER_RESTRICTED: MEMBERS_API_SINGLE_USER_RESTRICTED,
- MULTIPLE_USERS_RESTRICTED: MEMBERS_API_MULTIPLE_USERS_RESTRICTED,
-};
+export const GROUPS_INVITATIONS_PATH = '/api/v4/groups/1/invitations';
export const invitationsApiResponse = {
- EMAIL_INVALID: INVITATIONS_API_EMAIL_INVALID,
- ERROR_EMAIL_INVALID: INVITATIONS_API_ERROR_EMAIL_INVALID,
- EMAIL_RESTRICTED: INVITATIONS_API_EMAIL_RESTRICTED,
- MULTIPLE_EMAIL_RESTRICTED: INVITATIONS_API_MULTIPLE_EMAIL_RESTRICTED,
- EMAIL_TAKEN: INVITATIONS_API_EMAIL_TAKEN,
+ EMAIL_INVALID,
+ ERROR_EMAIL_INVALID,
+ EMAIL_RESTRICTED,
+ MULTIPLE_RESTRICTED,
+ EMAIL_TAKEN,
};
diff --git a/spec/frontend/invite_members/mock_data/group_modal.js b/spec/frontend/invite_members/mock_data/group_modal.js
index c05c4edb7d0..c8588683885 100644
--- a/spec/frontend/invite_members/mock_data/group_modal.js
+++ b/spec/frontend/invite_members/mock_data/group_modal.js
@@ -1,5 +1,6 @@
export const propsData = {
id: '1',
+ rootId: '1',
name: 'test name',
isProject: false,
invalidGroups: [],
diff --git a/spec/frontend/invite_members/mock_data/member_modal.js b/spec/frontend/invite_members/mock_data/member_modal.js
index 590502909b2..1b0cc57fb5b 100644
--- a/spec/frontend/invite_members/mock_data/member_modal.js
+++ b/spec/frontend/invite_members/mock_data/member_modal.js
@@ -1,5 +1,6 @@
export const propsData = {
id: '1',
+ rootId: '1',
name: 'test name',
isProject: false,
accessLevels: { Guest: 10, Reporter: 20, Developer: 30, Maintainer: 40, Owner: 50 },