mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
fix eslint warnigs for core project (#7506)
This commit is contained in:
@@ -15,16 +15,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export let fakeApps = {
|
||||
export const fakeApps = {
|
||||
size: 2, total: 2, start: 0,
|
||||
data: [
|
||||
{
|
||||
id: 1, defaultAppId: null, name: 'Sales-Fakes-App', description: 'desc-fake1', modelId: 22,
|
||||
theme: 'theme-1-fake', icon: 'glyphicon-asterisk', 'deploymentId': '111', 'tenantId': null
|
||||
theme: 'theme-1-fake', icon: 'glyphicon-asterisk', deploymentId: '111', tenantId: null
|
||||
},
|
||||
{
|
||||
id: 2, defaultAppId: null, name: 'health-care-Fake', description: 'desc-fake2', modelId: 33,
|
||||
theme: 'theme-2-fake', icon: 'glyphicon-asterisk', 'deploymentId': '444', 'tenantId': null
|
||||
theme: 'theme-2-fake', icon: 'glyphicon-asterisk', deploymentId: '444', tenantId: null
|
||||
}
|
||||
]
|
||||
};
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { BpmUserModel } from '../models';
|
||||
|
||||
export let fakeBpmUserNoImage = {
|
||||
export const fakeBpmUserNoImage = {
|
||||
apps: [],
|
||||
capabilities: 'fake-capability',
|
||||
company: 'fake-company',
|
||||
@@ -39,7 +39,7 @@ export let fakeBpmUserNoImage = {
|
||||
type: 'fake-type'
|
||||
};
|
||||
|
||||
export let fakeBpmUser = new BpmUserModel({
|
||||
export const fakeBpmUser = new BpmUserModel({
|
||||
apps: [],
|
||||
capabilities: null,
|
||||
company: 'fake-company',
|
||||
@@ -61,7 +61,7 @@ export let fakeBpmUser = new BpmUserModel({
|
||||
type: 'fake-type'
|
||||
});
|
||||
|
||||
export let fakeBpmEditedUser = {
|
||||
export const fakeBpmEditedUser = {
|
||||
apps: [],
|
||||
capabilities: 'fake-capability',
|
||||
company: 'fake-company',
|
||||
|
@@ -15,76 +15,76 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export let fakeUser1 = {
|
||||
'enabled': true,
|
||||
'firstName': 'firstName',
|
||||
'lastName': 'lastName',
|
||||
'email': 'fake-email@dom.com',
|
||||
'emailNotificationsEnabled': true,
|
||||
'company': {},
|
||||
'id': 'fake-email@dom.com',
|
||||
'avatarId': '123-123-123'
|
||||
export const fakeUser1 = {
|
||||
enabled: true,
|
||||
firstName: 'firstName',
|
||||
lastName: 'lastName',
|
||||
email: 'fake-email@dom.com',
|
||||
emailNotificationsEnabled: true,
|
||||
company: {},
|
||||
id: 'fake-email@dom.com',
|
||||
avatarId: '123-123-123'
|
||||
};
|
||||
|
||||
export let fakeUser2 = {
|
||||
'enabled': true,
|
||||
'firstName': 'some',
|
||||
'lastName': 'one',
|
||||
'email': 'some-one@somegroup.com',
|
||||
'emailNotificationsEnabled': true,
|
||||
'company': {},
|
||||
'id': 'fake-email@dom.com',
|
||||
'avatarId': '001-001-001'
|
||||
export const fakeUser2 = {
|
||||
enabled: true,
|
||||
firstName: 'some',
|
||||
lastName: 'one',
|
||||
email: 'some-one@somegroup.com',
|
||||
emailNotificationsEnabled: true,
|
||||
company: {},
|
||||
id: 'fake-email@dom.com',
|
||||
avatarId: '001-001-001'
|
||||
};
|
||||
|
||||
export let fakeContentComments = {
|
||||
export const fakeContentComments = {
|
||||
list: {
|
||||
'pagination': {
|
||||
'count': 4,
|
||||
'hasMoreItems': false,
|
||||
'totalItems': 4,
|
||||
'skipCount': 0,
|
||||
'maxItems': 100
|
||||
pagination: {
|
||||
count: 4,
|
||||
hasMoreItems: false,
|
||||
totalItems: 4,
|
||||
skipCount: 0,
|
||||
maxItems: 100
|
||||
},
|
||||
entries: [{
|
||||
'entry': {
|
||||
'createdAt': '2018-03-27T10:55:45.725+0000',
|
||||
'createdBy': fakeUser1,
|
||||
'edited': false,
|
||||
'modifiedAt': '2018-03-27T10:55:45.725+0000',
|
||||
'canEdit': true,
|
||||
'modifiedBy': fakeUser1,
|
||||
'canDelete': true,
|
||||
'id': '35a0cea7-b6d0-4abc-9030-f4e461dd1ac7',
|
||||
'content': 'fake-message-1'
|
||||
entry: {
|
||||
createdAt: '2018-03-27T10:55:45.725+0000',
|
||||
createdBy: fakeUser1,
|
||||
edited: false,
|
||||
modifiedAt: '2018-03-27T10:55:45.725+0000',
|
||||
canEdit: true,
|
||||
modifiedBy: fakeUser1,
|
||||
canDelete: true,
|
||||
id: '35a0cea7-b6d0-4abc-9030-f4e461dd1ac7',
|
||||
content: 'fake-message-1'
|
||||
}
|
||||
}, {
|
||||
'entry': {
|
||||
'createdAt': '2018-03-27T10:55:45.725+0000',
|
||||
'createdBy': fakeUser2,
|
||||
'edited': false,
|
||||
'modifiedAt': '2018-03-27T10:55:45.725+0000',
|
||||
'canEdit': true,
|
||||
'modifiedBy': fakeUser2,
|
||||
'canDelete': true,
|
||||
'id': '35a0cea7-b6d0-4abc-9030-f4e461dd1ac7',
|
||||
'content': 'fake-message-2'
|
||||
entry: {
|
||||
createdAt: '2018-03-27T10:55:45.725+0000',
|
||||
createdBy: fakeUser2,
|
||||
edited: false,
|
||||
modifiedAt: '2018-03-27T10:55:45.725+0000',
|
||||
canEdit: true,
|
||||
modifiedBy: fakeUser2,
|
||||
canDelete: true,
|
||||
id: '35a0cea7-b6d0-4abc-9030-f4e461dd1ac7',
|
||||
content: 'fake-message-2'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
export let fakeContentComment = {
|
||||
'entry': {
|
||||
'createdAt': '2018-03-29T11:49:51.735+0000',
|
||||
'createdBy': fakeUser1,
|
||||
'edited': false,
|
||||
'modifiedAt': '2018-03-29T11:49:51.735+0000',
|
||||
'canEdit': true,
|
||||
'modifiedBy': fakeUser1,
|
||||
'canDelete': true,
|
||||
'id': '4d07cdc5-f00c-4391-b39d-a842b12478b2',
|
||||
'content': 'fake-comment-message'
|
||||
export const fakeContentComment = {
|
||||
entry: {
|
||||
createdAt: '2018-03-29T11:49:51.735+0000',
|
||||
createdBy: fakeUser1,
|
||||
edited: false,
|
||||
modifiedAt: '2018-03-29T11:49:51.735+0000',
|
||||
canEdit: true,
|
||||
modifiedBy: fakeUser1,
|
||||
canDelete: true,
|
||||
id: '4d07cdc5-f00c-4391-b39d-a842b12478b2',
|
||||
content: 'fake-comment-message'
|
||||
}
|
||||
};
|
||||
|
@@ -18,11 +18,11 @@
|
||||
import { CommentModel } from '../models/comment.model';
|
||||
import { UserProcessModel } from '../models/user-process.model';
|
||||
|
||||
export let fakeUser1 = { id: 1, email: 'fake-email@dom.com', firstName: 'firstName', lastName: 'lastName' };
|
||||
export const fakeUser1 = { id: 1, email: 'fake-email@dom.com', firstName: 'firstName', lastName: 'lastName' };
|
||||
|
||||
export let fakeUser2 = { id: 1001, email: 'some-one@somegroup.com', firstName: 'some', lastName: 'one' };
|
||||
export const fakeUser2 = { id: 1001, email: 'some-one@somegroup.com', firstName: 'some', lastName: 'one' };
|
||||
|
||||
export let fakeTasksComment = {
|
||||
export const fakeTasksComment = {
|
||||
size: 2, total: 2, start: 0,
|
||||
data: [
|
||||
{
|
||||
@@ -34,7 +34,7 @@ export let fakeTasksComment = {
|
||||
]
|
||||
};
|
||||
|
||||
export let fakeProcessComment = new CommentModel({id: 1, message: 'Test', created: new Date('2016-11-10T03:37:30.010+0000'), createdBy: new UserProcessModel({
|
||||
export const fakeProcessComment = new CommentModel({id: 1, message: 'Test', created: new Date('2016-11-10T03:37:30.010+0000'), createdBy: new UserProcessModel({
|
||||
id: 13,
|
||||
firstName: 'Wilbur',
|
||||
lastName: 'Adams',
|
||||
|
@@ -133,7 +133,7 @@ export const createNewPersonMock = {
|
||||
email: 'fakeEcm@ecmUser.com'
|
||||
};
|
||||
|
||||
export function getFakeUserWithContentAdminCapability(): PersonEntry {
|
||||
export const getFakeUserWithContentAdminCapability = (): PersonEntry => {
|
||||
const fakeEcmUserWithAdminCapabilities = {
|
||||
...fakeEcmUser,
|
||||
capabilities: {
|
||||
@@ -142,9 +142,9 @@ export function getFakeUserWithContentAdminCapability(): PersonEntry {
|
||||
};
|
||||
const mockPerson = new Person(fakeEcmUserWithAdminCapabilities);
|
||||
return { entry: mockPerson };
|
||||
}
|
||||
};
|
||||
|
||||
export function getFakeUserWithContentUserCapability(): PersonEntry {
|
||||
export const getFakeUserWithContentUserCapability = (): PersonEntry => {
|
||||
const fakeEcmUserWithAdminCapabilities = {
|
||||
...fakeEcmUser,
|
||||
capabilities: {
|
||||
@@ -153,4 +153,4 @@ export function getFakeUserWithContentUserCapability(): PersonEntry {
|
||||
};
|
||||
const mockPerson = new Person(fakeEcmUserWithAdminCapabilities);
|
||||
return { entry: mockPerson };
|
||||
}
|
||||
};
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -59,7 +59,7 @@ export const formReadonlyTwoTextFields: any = {
|
||||
visibilityCondition: null,
|
||||
numberOfColumns: 2,
|
||||
fields: {
|
||||
'1': [
|
||||
1: [
|
||||
{
|
||||
fieldType: 'FormFieldRepresentation',
|
||||
id: 'firstname',
|
||||
@@ -134,7 +134,7 @@ export const formReadonlyTwoTextFields: any = {
|
||||
visibilityCondition: null
|
||||
}
|
||||
],
|
||||
'2': [
|
||||
2: [
|
||||
{
|
||||
fieldType: 'FormFieldRepresentation',
|
||||
id: 'lastname',
|
||||
|
@@ -56,7 +56,7 @@ export const formDefVisibilitiFieldDependsOnNextOne: any = {
|
||||
visibilityCondition: null,
|
||||
numberOfColumns: 2,
|
||||
fields: {
|
||||
'1': [
|
||||
1: [
|
||||
{
|
||||
fieldType: 'RestFieldRepresentation',
|
||||
id: 'country',
|
||||
@@ -123,7 +123,7 @@ export const formDefVisibilitiFieldDependsOnNextOne: any = {
|
||||
requestHeaders: null
|
||||
}
|
||||
],
|
||||
'2': [
|
||||
2: [
|
||||
{
|
||||
fieldType: 'FormFieldRepresentation',
|
||||
id: 'name',
|
||||
@@ -222,7 +222,7 @@ export const formDefVisibilitiFieldDependsOnPreviousOne: any = {
|
||||
visibilityCondition: null,
|
||||
numberOfColumns: 2,
|
||||
fields: {
|
||||
'1': [
|
||||
1: [
|
||||
{
|
||||
fieldType: 'FormFieldRepresentation',
|
||||
id: 'name',
|
||||
@@ -265,7 +265,7 @@ export const formDefVisibilitiFieldDependsOnPreviousOne: any = {
|
||||
visibilityCondition: null
|
||||
}
|
||||
],
|
||||
'2': [
|
||||
2: [
|
||||
{
|
||||
fieldType: 'RestFieldRepresentation',
|
||||
id: 'country',
|
||||
|
@@ -59,7 +59,7 @@ export const formDefinitionTwoTextFields: any = {
|
||||
visibilityCondition: null,
|
||||
numberOfColumns: 2,
|
||||
fields: {
|
||||
'1': [
|
||||
1: [
|
||||
{
|
||||
fieldType: 'FormFieldRepresentation',
|
||||
id: 'firstname',
|
||||
@@ -102,7 +102,7 @@ export const formDefinitionTwoTextFields: any = {
|
||||
visibilityCondition: null
|
||||
}
|
||||
],
|
||||
'2': [
|
||||
2: [
|
||||
{
|
||||
fieldType: 'FormFieldRepresentation',
|
||||
id: 'lastname',
|
||||
@@ -204,7 +204,7 @@ export const formDefinitionDropdownField: any = {
|
||||
visibilityCondition: null,
|
||||
numberOfColumns: 2,
|
||||
fields: {
|
||||
'1': [
|
||||
1: [
|
||||
{
|
||||
fieldType: 'RestFieldRepresentation',
|
||||
id: 'country',
|
||||
@@ -266,7 +266,7 @@ export const formDefinitionDropdownField: any = {
|
||||
requestHeaders: null
|
||||
}
|
||||
],
|
||||
'2': []
|
||||
2: []
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -326,7 +326,7 @@ export const formDefinitionRequiredField: any = {
|
||||
visibilityCondition: null,
|
||||
numberOfColumns: 2,
|
||||
fields: {
|
||||
'1': [
|
||||
1: [
|
||||
{
|
||||
fieldType: 'RestFieldRepresentation',
|
||||
id: 'country',
|
||||
@@ -388,7 +388,7 @@ export const formDefinitionRequiredField: any = {
|
||||
requestHeaders: null
|
||||
}
|
||||
],
|
||||
'2': []
|
||||
2: []
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@@ -63,7 +63,7 @@ export const formModelTabs: any = {
|
||||
visibilityCondition: null,
|
||||
numberOfColumns: 2,
|
||||
fields: {
|
||||
'1': [
|
||||
1: [
|
||||
{
|
||||
fieldType: 'AmountFieldRepresentation',
|
||||
id: 'label',
|
||||
@@ -108,7 +108,7 @@ export const formModelTabs: any = {
|
||||
currency: null
|
||||
}
|
||||
],
|
||||
'2': [
|
||||
2: [
|
||||
{
|
||||
fieldType: 'FormFieldRepresentation',
|
||||
id: 'label1',
|
||||
@@ -187,7 +187,7 @@ export const formModelTabs: any = {
|
||||
visibilityCondition: null,
|
||||
numberOfColumns: 2,
|
||||
fields: {
|
||||
'1': [
|
||||
1: [
|
||||
{
|
||||
fieldType: 'FormFieldRepresentation',
|
||||
id: 'label2',
|
||||
@@ -230,7 +230,7 @@ export const formModelTabs: any = {
|
||||
visibilityCondition: null
|
||||
}
|
||||
],
|
||||
'2': []
|
||||
2: []
|
||||
}
|
||||
}
|
||||
],
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -19,27 +19,27 @@ import { IdentityGroupModel, IdentityGroupCountModel } from '../models/identity-
|
||||
import { IdentityRoleModel } from '../models/identity-role.model';
|
||||
import { IdentityJoinGroupRequestModel } from '../services/identity-user.service.interface';
|
||||
|
||||
export const mockIdentityGroup1 = <IdentityGroupModel> {
|
||||
export const mockIdentityGroup1 = {
|
||||
id: 'mock-group-id-1', name: 'Mock Group 1', path: '/mock', subGroups: []
|
||||
};
|
||||
} as IdentityGroupModel;
|
||||
|
||||
export const mockIdentityGroup2 = <IdentityGroupModel> {
|
||||
export const mockIdentityGroup2 = {
|
||||
id: 'mock-group-id-2', name: 'Mock Group 2', path: '', subGroups: []
|
||||
};
|
||||
} as IdentityGroupModel;
|
||||
|
||||
export const mockIdentityGroup3 = <IdentityGroupModel> {
|
||||
export const mockIdentityGroup3 = {
|
||||
id: 'mock-group-id-3', name: 'Mock Group 3', path: '', subGroups: []
|
||||
};
|
||||
} as IdentityGroupModel;
|
||||
|
||||
export const mockIdentityGroup4 = <IdentityGroupModel> {
|
||||
export const mockIdentityGroup4 = {
|
||||
id: 'mock-group-id-4', name: 'Mock Group 4', path: '', subGroups: []
|
||||
};
|
||||
} as IdentityGroupModel;
|
||||
|
||||
export const mockIdentityGroup5 = <IdentityGroupModel> {
|
||||
export const mockIdentityGroup5 = {
|
||||
id: 'mock-group-id-5', name: 'Mock Group 5', path: '', subGroups: []
|
||||
};
|
||||
} as IdentityGroupModel;
|
||||
|
||||
export const mockIdentityGroupsCount = <IdentityGroupCountModel> { count: 10 };
|
||||
export const mockIdentityGroupsCount = { count: 10 } as IdentityGroupCountModel;
|
||||
|
||||
export const mockIdentityGroups = [
|
||||
mockIdentityGroup1, mockIdentityGroup2, mockIdentityGroup3, mockIdentityGroup4, mockIdentityGroup5
|
||||
@@ -62,15 +62,15 @@ export const clientRoles: IdentityRoleModel[] = [
|
||||
|
||||
export const mockJoinGroupRequest: IdentityJoinGroupRequestModel = {userId: 'mock-hser-id', groupId: 'mock-group-id', realm: 'mock-realm-name'};
|
||||
|
||||
export const mockGroup1 = <IdentityGroupModel> {
|
||||
export const mockGroup1 = {
|
||||
id: 'mock-group-id-1', name: 'Mock Group 1', path: '/mock', subGroups: []
|
||||
};
|
||||
} as IdentityGroupModel;
|
||||
|
||||
export const mockGroup2 = <IdentityGroupModel> {
|
||||
export const mockGroup2 = {
|
||||
id: 'mock-group-id-2', name: 'Mock Group 2', path: '', subGroups: []
|
||||
};
|
||||
} as IdentityGroupModel;
|
||||
|
||||
export const mockGroups = [
|
||||
<IdentityGroupModel> { id: 'mock-group-id-1', name: 'Mock Group 1', path: '/mock', subGroups: [] },
|
||||
<IdentityGroupModel> { id: 'mock-group-id-2', name: 'Mock Group 2', path: '', subGroups: [] }
|
||||
{ id: 'mock-group-id-1', name: 'Mock Group 1', path: '/mock', subGroups: [] } as IdentityGroupModel,
|
||||
{ id: 'mock-group-id-2', name: 'Mock Group 2', path: '', subGroups: [] } as IdentityGroupModel
|
||||
];
|
||||
|
@@ -22,7 +22,7 @@ export const mockIdentityUser1: IdentityUserModel = { id: 'mock-user-id-1', user
|
||||
export const mockIdentityUser2: IdentityUserModel = { id: 'mock-user-id-2', username: 'userName2', firstName: 'first-name-2', lastName: 'last-name-2', email: 'abcd@xyz.com'};
|
||||
export const mockIdentityUser3: IdentityUserModel = { id: 'mock-user-id-3', username: 'userName3', firstName: 'first-name-3', lastName: 'last-name-3', email: 'abcde@xyz.com' };
|
||||
export const mockIdentityUser4: IdentityUserModel = { id: 'mock-user-id-4', username: 'userName4', firstName: 'first-name-4', lastName: 'last-name-4', email: 'abcde@xyz.com' };
|
||||
export let mockIdentityUser5: IdentityUserModel = { id: 'mock-user-id-5', username: 'userName5', firstName: 'first-name-5', lastName: 'last-name-5', email: 'abcde@xyz.com' };
|
||||
export const mockIdentityUser5: IdentityUserModel = { id: 'mock-user-id-5', username: 'userName5', firstName: 'first-name-5', lastName: 'last-name-5', email: 'abcde@xyz.com' };
|
||||
|
||||
export const mockIdentityUsers: IdentityUserModel[] = [
|
||||
mockIdentityUser1,
|
||||
|
@@ -113,17 +113,13 @@ export class IdentityUserServiceMock implements IdentityUserServiceInterface {
|
||||
|
||||
checkUserHasApplicationAccess(userId: string, applicationName: string): Observable<boolean> {
|
||||
return this.getClientIdByApplicationName(applicationName).pipe(
|
||||
switchMap((clientId: string) => {
|
||||
return this.checkUserHasClientApp(userId, clientId);
|
||||
})
|
||||
switchMap((clientId: string) => this.checkUserHasClientApp(userId, clientId))
|
||||
);
|
||||
}
|
||||
|
||||
checkUserHasAnyApplicationRole(userId: string, applicationName: string, roleNames: string[]): Observable<boolean> {
|
||||
return this.getClientIdByApplicationName(applicationName).pipe(
|
||||
switchMap((clientId: string) => {
|
||||
return this.checkUserHasAnyClientAppRole(userId, clientId, roleNames);
|
||||
})
|
||||
switchMap((clientId: string) => this.checkUserHasAnyClientAppRole(userId, clientId, roleNames))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -173,9 +169,7 @@ export class IdentityUserServiceMock implements IdentityUserServiceInterface {
|
||||
private async userHasAnyRole(userId: string, roleNames: string[]): Promise<boolean> {
|
||||
const userRoles = await this.getUserRoles(userId).toPromise();
|
||||
const hasAnyRole = roleNames.some((roleName) => {
|
||||
const filteredRoles = userRoles.filter((userRole) => {
|
||||
return userRole.name.toLocaleLowerCase() === roleName.toLocaleLowerCase();
|
||||
});
|
||||
const filteredRoles = userRoles.filter((userRole) => userRole.name.toLocaleLowerCase() === roleName.toLocaleLowerCase());
|
||||
|
||||
return filteredRoles.length > 0;
|
||||
});
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export let mockToken = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ' +
|
||||
export const mockToken = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ' +
|
||||
'zdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiZmFtaWx5X25hbWUiOiJEb2UiLCJnaXZ' +
|
||||
'lbl9uYW1lIjoiSm9obiIsImFkbWluIjp0cnVlLCJlbWFpbCI6ImpvaG5Eb2VAZ21haWwuY29tIiwicHJ' +
|
||||
'lZmVycmVkX3VzZXJuYW1lIjoiam9obkRvZTEiLCJqdGkiOiI2MmQ3YjA4NS1hNTJjLTRjZmEtYjA2Zi1' +
|
||||
|
@@ -20,152 +20,114 @@ import { mockAssignedRoles, mockAvailableRoles, mockEffectiveRoles, mockIdentity
|
||||
|
||||
export const queryUsersMockApi: any = {
|
||||
oauth2Auth: {
|
||||
callCustomApi: () => {
|
||||
return Promise.resolve(mockIdentityUsers);
|
||||
}
|
||||
callCustomApi: () => Promise.resolve(mockIdentityUsers)
|
||||
}
|
||||
};
|
||||
|
||||
export const createUserMockApi: any = {
|
||||
oauth2Auth: {
|
||||
callCustomApi: () => {
|
||||
return Promise.resolve();
|
||||
}
|
||||
callCustomApi: () => Promise.resolve()
|
||||
}
|
||||
};
|
||||
|
||||
export const updateUserMockApi: any = {
|
||||
oauth2Auth: {
|
||||
callCustomApi: () => {
|
||||
return Promise.resolve();
|
||||
}
|
||||
callCustomApi: () => Promise.resolve()
|
||||
}
|
||||
};
|
||||
|
||||
export const deleteUserMockApi: any = {
|
||||
oauth2Auth: {
|
||||
callCustomApi: () => {
|
||||
return Promise.resolve();
|
||||
}
|
||||
callCustomApi: () => Promise.resolve()
|
||||
}
|
||||
};
|
||||
|
||||
export const getInvolvedGroupsMockApi: any = {
|
||||
oauth2Auth: {
|
||||
callCustomApi: () => {
|
||||
return Promise.resolve(mockGroups);
|
||||
}
|
||||
callCustomApi: () => Promise.resolve(mockGroups)
|
||||
}
|
||||
};
|
||||
|
||||
export const joinGroupMockApi: any = {
|
||||
oauth2Auth: {
|
||||
callCustomApi: () => {
|
||||
return Promise.resolve();
|
||||
}
|
||||
callCustomApi: () => Promise.resolve()
|
||||
}
|
||||
};
|
||||
|
||||
export const leaveGroupMockApi: any = {
|
||||
oauth2Auth: {
|
||||
callCustomApi: () => {
|
||||
return Promise.resolve();
|
||||
}
|
||||
callCustomApi: () => Promise.resolve()
|
||||
}
|
||||
};
|
||||
|
||||
export const getAvailableRolesMockApi: any = {
|
||||
oauth2Auth: {
|
||||
callCustomApi: () => {
|
||||
return Promise.resolve(mockAvailableRoles);
|
||||
}
|
||||
callCustomApi: () => Promise.resolve(mockAvailableRoles)
|
||||
}
|
||||
};
|
||||
|
||||
export const getAssignedRolesMockApi: any = {
|
||||
oauth2Auth: {
|
||||
callCustomApi: () => {
|
||||
return Promise.resolve(mockAssignedRoles);
|
||||
}
|
||||
callCustomApi: () => Promise.resolve(mockAssignedRoles)
|
||||
}
|
||||
};
|
||||
|
||||
export const getEffectiveRolesMockApi: any = {
|
||||
oauth2Auth: {
|
||||
callCustomApi: () => {
|
||||
return Promise.resolve(mockEffectiveRoles);
|
||||
}
|
||||
callCustomApi: () => Promise.resolve(mockEffectiveRoles)
|
||||
}
|
||||
};
|
||||
|
||||
export const assignRolesMockApi: any = {
|
||||
oauth2Auth: {
|
||||
callCustomApi: () => {
|
||||
return Promise.resolve();
|
||||
}
|
||||
callCustomApi: () => Promise.resolve()
|
||||
}
|
||||
};
|
||||
|
||||
export const removeRolesMockApi: any = {
|
||||
oauth2Auth: {
|
||||
callCustomApi: () => {
|
||||
return Promise.resolve();
|
||||
}
|
||||
callCustomApi: () => Promise.resolve()
|
||||
}
|
||||
};
|
||||
|
||||
export const roleMappingApi: any = {
|
||||
oauth2Auth: {
|
||||
callCustomApi: () => {
|
||||
return Promise.resolve(roleMappingMock);
|
||||
}
|
||||
callCustomApi: () => Promise.resolve(roleMappingMock)
|
||||
}
|
||||
};
|
||||
|
||||
export const noRoleMappingApi: any = {
|
||||
oauth2Auth: {
|
||||
callCustomApi: () => {
|
||||
return Promise.resolve([]);
|
||||
}
|
||||
callCustomApi: () => Promise.resolve([])
|
||||
}
|
||||
};
|
||||
|
||||
export const groupsMockApi: any = {
|
||||
oauth2Auth: {
|
||||
callCustomApi: () => {
|
||||
return Promise.resolve(mockIdentityGroups);
|
||||
}
|
||||
callCustomApi: () => Promise.resolve(mockIdentityGroups)
|
||||
}
|
||||
};
|
||||
|
||||
export const createGroupMappingApi: any = {
|
||||
oauth2Auth: {
|
||||
callCustomApi: () => {
|
||||
return Promise.resolve();
|
||||
}
|
||||
callCustomApi: () => Promise.resolve()
|
||||
}
|
||||
};
|
||||
|
||||
export const updateGroupMappingApi: any = {
|
||||
oauth2Auth: {
|
||||
callCustomApi: () => {
|
||||
return Promise.resolve();
|
||||
}
|
||||
callCustomApi: () => Promise.resolve()
|
||||
}
|
||||
};
|
||||
|
||||
export const deleteGroupMappingApi: any = {
|
||||
oauth2Auth: {
|
||||
callCustomApi: () => {
|
||||
return Promise.resolve();
|
||||
}
|
||||
callCustomApi: () => Promise.resolve()
|
||||
}
|
||||
};
|
||||
|
||||
export const applicationDetailsMockApi: any = {
|
||||
oauth2Auth: {
|
||||
callCustomApi: () => {
|
||||
return Promise.resolve([{id: 'mock-app-id', name: 'mock-app-name'}]);
|
||||
}
|
||||
callCustomApi: () => Promise.resolve([{id: 'mock-app-id', name: 'mock-app-name'}])
|
||||
}
|
||||
};
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export let fakeRendition = {
|
||||
export const fakeRendition = {
|
||||
entry: {
|
||||
id: 'pdf',
|
||||
content: {
|
||||
@@ -26,7 +26,7 @@ export let fakeRendition = {
|
||||
}
|
||||
};
|
||||
|
||||
export let fakeRenditionCreated = {
|
||||
export const fakeRenditionCreated = {
|
||||
entry: {
|
||||
id: 'pdf',
|
||||
content: {
|
||||
@@ -37,7 +37,7 @@ export let fakeRenditionCreated = {
|
||||
}
|
||||
};
|
||||
|
||||
export let fakeRenditionsList = {
|
||||
export const fakeRenditionsList = {
|
||||
list: {
|
||||
pagination: {
|
||||
count: 6,
|
||||
@@ -111,7 +111,7 @@ export let fakeRenditionsList = {
|
||||
}
|
||||
};
|
||||
|
||||
export let fakeRenditionsListWithACreated = {
|
||||
export const fakeRenditionsListWithACreated = {
|
||||
list: {
|
||||
pagination: {
|
||||
count: 6,
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export let fakeSearch = {
|
||||
export const fakeSearch = {
|
||||
list: {
|
||||
pagination: {
|
||||
count: 1,
|
||||
@@ -44,7 +44,7 @@ export let fakeSearch = {
|
||||
}
|
||||
};
|
||||
|
||||
export let mockError = {
|
||||
export const mockError = {
|
||||
error: {
|
||||
errorKey: 'Search failed',
|
||||
statusCode: 400,
|
||||
@@ -54,7 +54,7 @@ export let mockError = {
|
||||
}
|
||||
};
|
||||
|
||||
export let searchMockApi: any = {
|
||||
export const searchMockApi: any = {
|
||||
|
||||
findNodes: () => Promise.resolve(fakeSearch)
|
||||
|
||||
|
Reference in New Issue
Block a user