@umbraco/playwright-testhelpers
Version:
Test helpers for making playwright tests for Umbraco solutions
51 lines (50 loc) • 6.05 kB
TypeScript
import { ApiHelpers } from "./ApiHelpers";
export declare class DocumentTypeApiHelper {
api: ApiHelpers;
constructor(api: ApiHelpers);
ensureNameNotExists(name: string): Promise<number | import("playwright-core").APIResponse | null | undefined>;
getAllAtRoot(): Promise<import("playwright-core").APIResponse>;
private recurseChildren;
private recurseDeleteChildren;
getChildren(id: string): Promise<any>;
create(documentType: any): Promise<string | undefined>;
get(id: string): Promise<any>;
getByName(name: string): Promise<any>;
doesNameExist(name: string): Promise<any>;
delete(id: string): Promise<number | undefined>;
getFolder(id: string): Promise<any>;
deleteFolder(id: string): Promise<import("playwright-core").APIResponse>;
createFolder(name: string, parentId?: string): Promise<string | undefined>;
renameFolder(folderId: string, folderName: string): Promise<import("playwright-core").APIResponse>;
createDefaultDocumentType(documentTypeName: string): Promise<string | undefined>;
createDocumentTypeWithPropertyEditor(documentTypeName: string, dataTypeName: string, dataTypeId: string, groupName?: string, documentTypeVaryByCulture?: boolean, propertyVaryByCulture?: boolean, isMandatory?: boolean): Promise<string | undefined>;
createDocumentTypeWithPropertyEditorAndTwoGroups(documentTypeName: string, firstPropertyName: string, firstDataTypeId: string, firstGroupName: string | undefined, secondPropertyName: string, secondDataTypeId: string, secondGroupName?: string): Promise<string | undefined>;
createDocumentTypeWithPropertyEditorInTab(documentTypeName: string, dataTypeName: string, dataTypeId: string, tabName: string, groupName?: string, varyByCulture?: boolean): Promise<string | undefined>;
createDocumentTypeWithTwoPropertyEditors(documentTypeName: string, dataTypeNameOne: string, dataTypeIdOne: string, dataTypeNameTwo: string, dataTypeIdTwo: string, groupName?: string): Promise<string | undefined>;
createDefaultDocumentTypeWithAllowAsRoot(documentTypeName: string): Promise<string | undefined>;
createDocumentTypeWithAllowedChildNode(documentTypeName: string, allowedChildNodeId: string): Promise<string | undefined>;
createDocumentTypeWithAPropertyEditorAndAnAllowedChildNode(documentTypeName: string, dataTypeName: string, dataTypeId: string, allowedChildNodeId: string, groupName?: string): Promise<string | undefined>;
createDocumentTypeWithAllowedTemplate(documentTypeName: string, allowedTemplateId: string, isAllowedAsRoot?: boolean): Promise<string | undefined>;
createDocumentTypeWithTwoAllowedTemplates(documentTypeName: string, allowedTemplateOneId: string, allowedTemplateTwoId: string, isAllowedAsRoot?: boolean, defaultTemplateId?: string): Promise<string | undefined>;
createDocumentTypeWithTwoGroups(documentTypeName: string, dataType: string, dataTypeId: string, groupNameOne: string, groupNameTwo: string): Promise<string | undefined>;
createDocumentTypeWithAComposition(documentTypeName: string, compositionId: string): Promise<string | undefined>;
createEmptyElementType(elementTypeName: string): Promise<string | undefined>;
createDocumentTypeWithTwoTabs(documentTypeName: string, dataType: string, dataTypeId: string, tabNameOne: string, tabNameTwo: string): Promise<string | undefined>;
createDefaultElementType(elementName: string, groupName: string | undefined, dataTypeName: string | undefined, dataTypeId: string, isMandatory?: boolean): Promise<string | undefined>;
createDefaultElementTypeWithVaryByCulture(elementName: string, groupName: string | undefined, dataTypeName: string | undefined, dataTypeId: string, elementTypeVaryByCulture: boolean, dataTypeVaryByCulture: boolean): Promise<string | undefined>;
createElementTypeWithRegexValidation(elementName: string, groupName: string | undefined, dataTypeName: string | undefined, dataTypeId: string, regex: string): Promise<string | undefined>;
doesGroupContainCorrectPropertyEditor(documentTypeName: string, dataTypeName: string, dataTypeId: string, groupName: string): Promise<any>;
doesTabContainCorrectPropertyEditorInGroup(documentTypeName: string, dataTypeName: string, dataTypeId: string, tabName: string, groupName: string): Promise<any>;
doesDocumentTypeGroupNameContainCorrectSortOrder(documentTypeName: string, groupName: string, sortOrder: number): Promise<boolean>;
doesDocumentTypeTabNameContainCorrectSortOrder(documentTypeName: string, tabName: string, sortOrder: number): Promise<boolean>;
getContainerIdWithName(documentTypeName: string, containerName: string): Promise<any>;
createDocumentTypeWithAllowedTwoChildNodes(documentTypeName: string, allowedChildNodeOneId: string, allowedChildNodeTwoId: string): Promise<string | undefined>;
createDocumentTypeWithAllowedChildNodeAndDataType(documentTypeName: string, allowedChildNodeId: string, dataTypeName: string, dataTypeId: string, groupName?: string): Promise<string | undefined>;
createDocumentTypeWithAllowedChildNodeAndCollectionId(documentTypeName: string, allowedChildNodeId: string, collectionId: string): Promise<string | undefined>;
createDocumentTypeWithCollectionId(documentTypeName: string, collectionId: string): Promise<string | undefined>;
createDocumentTypeWithAllowVaryByCulture(documentTypeName: string): Promise<string | undefined>;
createDocumentTypeWithPropertyEditorAndAllowedTemplate(documentTypeName: string, dataTypeId: string, propertyName: string, templateId: string): Promise<string | undefined>;
createVariantDocumentTypeWithInvariantPropertyEditor(documentTypeName: string, dataTypeName: string, dataTypeId: string): Promise<string | undefined>;
createVariantDocumentTypeWithAllowedChildNodeAndInvariantPropertyEditor(documentTypeName: string, allowedChildNodeId: string, dataTypeName: string, dataTypeId: string, groupName?: string): Promise<string | undefined>;
getPropertyIdWithName(documentTypeId: string, propertyName: string): Promise<any>;
}