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:
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Locator, by, element, Key, protractor } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { BrowserVisibility, BrowserActions, DropdownPage, TestElement } from '@alfresco/adf-testing';
|
||||
|
||||
export class MetadataViewPage {
|
||||
|
||||
@@ -216,6 +216,35 @@ export class MetadataViewPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(property);
|
||||
}
|
||||
|
||||
async hasContentType(contentType: string): Promise<string> {
|
||||
const nodeType = TestElement.byText('div[data-automation-id="header-nodeType"] .adf-property-value', contentType);
|
||||
return nodeType.waitVisible();
|
||||
}
|
||||
|
||||
async changeContentType(option: string): Promise<void> {
|
||||
const nodeType = TestElement.byCss('div[data-automation-id="header-nodeType"] mat-form-field');
|
||||
await nodeType.waitPresent();
|
||||
await nodeType.click();
|
||||
const typesDropDownPage = new DropdownPage(nodeType.elementFinder);
|
||||
await typesDropDownPage.checkOptionIsDisplayed(option);
|
||||
await typesDropDownPage.selectOption(option);
|
||||
}
|
||||
|
||||
async checkConfirmDialogDisplayed(): Promise<void> {
|
||||
const confirmButton = TestElement.byCss('adf-content-type-dialog');
|
||||
await confirmButton.waitPresent();
|
||||
}
|
||||
|
||||
async applyNodeProperties(): Promise<void> {
|
||||
const confirmButton = TestElement.byId('content-type-dialog-apply-button');
|
||||
await confirmButton.click();
|
||||
}
|
||||
|
||||
async cancelNodeProperties(): Promise<void> {
|
||||
const cancelButton = TestElement.byId('content-type-dialog-actions-cancel');
|
||||
await cancelButton.click();
|
||||
}
|
||||
|
||||
async checkPropertyIsNotVisible(propertyName: string, type: string): Promise<void> {
|
||||
const property = element(by.css('div[data-automation-id="card-' + type + '-label-' + propertyName + '"]'));
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(property);
|
||||
|
Reference in New Issue
Block a user