mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-06-30 18:15:11 +00:00
[AAE-5343] add update person api (#7426)
* add update person api * fix e2e tests
This commit is contained in:
parent
75adf217d1
commit
65a9d2bbfa
@ -132,7 +132,9 @@ describe('Modify applications', () => {
|
|||||||
'models': [firstApp.definition.models[0]], 'theme': 'theme-4',
|
'models': [firstApp.definition.models[0]], 'theme': 'theme-4',
|
||||||
'icon': 'glyphicon-user'
|
'icon': 'glyphicon-user'
|
||||||
}
|
}
|
||||||
}, 'publish': true
|
},
|
||||||
|
'publish': true,
|
||||||
|
'force': true
|
||||||
};
|
};
|
||||||
|
|
||||||
await appsApi.updateAppDefinition(appVersionToBeDeleted.id, appDefinition);
|
await appsApi.updateAppDefinition(appVersionToBeDeleted.id, appDefinition);
|
||||||
|
@ -19,7 +19,7 @@ import { Injectable } from '@angular/core';
|
|||||||
import { Observable, from, throwError } from 'rxjs';
|
import { Observable, from, throwError } from 'rxjs';
|
||||||
import { AlfrescoApiService } from './alfresco-api.service';
|
import { AlfrescoApiService } from './alfresco-api.service';
|
||||||
import { catchError, map } from 'rxjs/operators';
|
import { catchError, map } from 'rxjs/operators';
|
||||||
import { PersonEntry, PeopleApi, PersonBodyCreate, Pagination } from '@alfresco/js-api';
|
import { PersonEntry, PeopleApi, PersonBodyCreate, Pagination, PersonBodyUpdate } from '@alfresco/js-api';
|
||||||
import { EcmUserModel } from '../models/ecm-user.model';
|
import { EcmUserModel } from '../models/ecm-user.model';
|
||||||
import { LogService } from './log.service';
|
import { LogService } from './log.service';
|
||||||
|
|
||||||
@ -117,6 +117,20 @@ export class PeopleContentService {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the person details
|
||||||
|
* @param personId The identifier of a person
|
||||||
|
* @param details The person details
|
||||||
|
* @param opts Optional parameters
|
||||||
|
* @returns Updated person model
|
||||||
|
*/
|
||||||
|
updatePerson(personId: string, details: PersonBodyUpdate, opts?: any): Observable<EcmUserModel> {
|
||||||
|
return from(this.peopleApi.updatePerson(personId, details, opts)).pipe(
|
||||||
|
map((res: PersonEntry) => <EcmUserModel> res?.entry),
|
||||||
|
catchError((error) => this.handleError(error))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
async isContentAdmin(): Promise<boolean> {
|
async isContentAdmin(): Promise<boolean> {
|
||||||
if (!this.hasCheckedIsContentAdmin) {
|
if (!this.hasCheckedIsContentAdmin) {
|
||||||
const user: PersonEntry = await this.getCurrentPerson().toPromise();
|
const user: PersonEntry = await this.getCurrentPerson().toPromise();
|
||||||
|
@ -113,6 +113,7 @@ export class EditProcessFilterCloudComponentPage {
|
|||||||
|
|
||||||
async setSortFilterDropDown(option) {
|
async setSortFilterDropDown(option) {
|
||||||
await this.sortDropdown.selectDropdownOption(option);
|
await this.sortDropdown.selectDropdownOption(option);
|
||||||
|
await browser.sleep(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getSortFilterDropDownValue(): Promise<string> {
|
async getSortFilterDropDownValue(): Promise<string> {
|
||||||
@ -120,7 +121,7 @@ export class EditProcessFilterCloudComponentPage {
|
|||||||
return BrowserActions.getText(sortLocator);
|
return BrowserActions.getText(sortLocator);
|
||||||
}
|
}
|
||||||
|
|
||||||
async setOrderFilterDropDown(option) {
|
async setOrderFilterDropDown(option: string) {
|
||||||
await this.orderDropdown.selectDropdownOption(option);
|
await this.orderDropdown.selectDropdownOption(option);
|
||||||
await browser.sleep(1500);
|
await browser.sleep(1500);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user