mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-5318] E2E Content Change type (#6799)
* [ADF-5318] E2E Content Change type * Update metadata-content-type.e2e.ts
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-button mat-dialog-close
|
||||
id="conten-type-dialog-actions-cancel">{{'CORE.METADATA.CONTENT_TYPE.DIALOG.CANCEL' | translate }}</button>
|
||||
id="content-type-dialog-actions-cancel">{{'CORE.METADATA.CONTENT_TYPE.DIALOG.CANCEL' | translate }}</button>
|
||||
<button mat-button class="adf-content-type-dialog-apply-button" id="content-type-dialog-apply-button"
|
||||
[mat-dialog-close]="true" cdkFocusInitial (click)="onApply()">{{'CORE.METADATA.CONTENT_TYPE.DIALOG.APPLY' |
|
||||
translate}}</button>
|
||||
|
@@ -129,7 +129,7 @@ describe('Content Type Dialog Component', () => {
|
||||
|
||||
it('should complete the select stream Cancel button is clicked', (done) => {
|
||||
data.select.subscribe(() => { }, () => { }, () => done());
|
||||
const cancelButton: HTMLButtonElement = fixture.nativeElement.querySelector('#conten-type-dialog-actions-cancel');
|
||||
const cancelButton: HTMLButtonElement = fixture.nativeElement.querySelector('#content-type-dialog-actions-cancel');
|
||||
expect(cancelButton).toBeDefined();
|
||||
cancelButton.click();
|
||||
fixture.detectChanges();
|
||||
|
@@ -0,0 +1,50 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ApiService } from '../../core/actions/api.service';
|
||||
import { CustomModel, CustomModelApi, CustomType, TypePaging, TypesApi } from '@alfresco/js-api';
|
||||
|
||||
export class ModelActions {
|
||||
|
||||
customModelApi: CustomModelApi;
|
||||
typesApi: TypesApi;
|
||||
|
||||
constructor(api: ApiService) {
|
||||
this.customModelApi = new CustomModelApi(api.getInstance());
|
||||
this.typesApi = new TypesApi(api.getInstance());
|
||||
}
|
||||
|
||||
async createModel({status, description, name, namespaceUri, namespacePrefix, author}: CustomModel): Promise<{ entry: CustomModel }> {
|
||||
return this.customModelApi.createCustomModel(status, description, name, namespaceUri, namespacePrefix, author);
|
||||
}
|
||||
|
||||
async createType(modelName, { name, parentName, title, description}: CustomType ): Promise<{ entry: CustomType }> {
|
||||
return this.customModelApi.createCustomType(modelName, name, parentName, title, description);
|
||||
}
|
||||
|
||||
async activateCustomModel(modelName: string): Promise<{ entry: CustomModel }> {
|
||||
return this.customModelApi.activateCustomModel(modelName);
|
||||
}
|
||||
|
||||
async deactivateCustomModel(modelName: string): Promise<{ entry: CustomModel }> {
|
||||
return this.customModelApi.deactivateCustomModel(modelName);
|
||||
}
|
||||
|
||||
async listTypes(opts?: any): Promise<TypePaging> {
|
||||
return this.typesApi.listTypes(opts);
|
||||
}
|
||||
}
|
@@ -17,3 +17,4 @@
|
||||
|
||||
export * from './upload.actions';
|
||||
export * from './permission.actions';
|
||||
export * from './model.actions';
|
||||
|
Reference in New Issue
Block a user