e2e/item-configs/types.ts

Index

Properties

Properties

createFields
createFields: function
Type : function

Required fields for the create dialog, keyed by formControlName. name is injected by the test.

editableField
editableField: { label: string; value: string }
Type : { label: string; value: string }
Properties :

One field exercised in the edit-form persistence check, targeted by its text. Edit-page fields are rendered from a @for loop using interpolated formControlName="{{ ... }}" — Angular does NOT reflect interpolated attributes back into the DOM (only static, literal formControlName="x" attributes survive, as used in create dialogs), so getByLabel is the only selector that reliably works here — confirmed empirically against the live app.

label
label: string
Type : string

Human-readable label used in test titles.

overviewRoute
overviewRoute: string
Type : string
requiresParent
requiresParent: { type: string; formControlName: string }
Type : { type: string; formControlName: string }
Properties :
  • type: string
  • formControlName: string

    formControlName on this type's create dialog that references the parent by name.

Optional

If set, a prerequisite object of this type must exist first (created via XML-RPC, not the UI).

type
type: string
Type : string

Route segment under /items/.

xmlrpcType
xmlrpcType: string
Type : string

XML-RPC object type used in new_/modify_/save_/remove_/get__handle calls — NOT always the same as the route segment (e.g. route "repository" is XML-RPC "repo", route "management-class" is XML-RPC "mgmtclass").

export interface CreateFieldsContext {
  name: string;
  /** Name of the prerequisite parent object, if `requiresParent` is set. */
  parentName?: string;
}

export interface ItemConfig {
  /** Route segment under /items/<type>. */
  type: string;
  /** XML-RPC object type used in new_<x>/modify_<x>/save_<x>/remove_<x>/get_<x>_handle calls
   *  — NOT always the same as the route segment (e.g. route "repository" is XML-RPC "repo",
   *  route "management-class" is XML-RPC "mgmtclass"). */
  xmlrpcType: string;
  /** Human-readable label used in test titles. */
  label: string;
  overviewRoute: string;
  /** Required fields for the create dialog, keyed by formControlName. `name` is injected by the test. */
  createFields: (ctx: CreateFieldsContext) => Record<string, string>;
  /**
   * One field exercised in the edit-form persistence check, targeted by its <mat-label> text.
   * Edit-page fields are rendered from a `@for` loop using interpolated `formControlName="{{ ... }}"`
   * — Angular does NOT reflect interpolated attributes back into the DOM (only static, literal
   * `formControlName="x"` attributes survive, as used in create dialogs), so `getByLabel` is the
   * only selector that reliably works here — confirmed empirically against the live app.
   */
  editableField: { label: string; value: string };
  /** If set, a prerequisite object of this type must exist first (created via XML-RPC, not the UI). */
  requiresParent?: {
    type: string;
    /** formControlName on this type's create dialog that references the parent by name. */
    formControlName: string;
  };
}

results matching ""

    No results matching ""