@servicenow/sdk - v4.4.1
    Preparing search index...

    Central interface for defining atf tests. The name of the test must uniquely identify the ATF test w/in the application

    Each step is defined by calling its corresponding function:

    Test({
    id: 'A unique id'
    name: 'Example test'
    description: 'This test is an example'
    active: true
    failOnServerError: true
    }, (atf) => {
    atf.form.openNewForm({
    table: incident,
    formUI: 'Standard UI',
    view: 'default',
    })

    Values of steps with output variables can be saved and used for inputs in fields which support gem-mapping

    const submittedRecord = atf.form.submitForm({
    assert: 'Form submitted to server',
    formUI: 'Standard UI',
    })

    atf.form.openExistingRecord({
    table: incident,
    recordId: submittedRecord.record_id,
    formUI: 'Standard UI',
    view: 'default',
    selectedTabIndex: 1,
    })
    *
    

    Default value: 'at_least_modules_not_visible' *

    Default value: [ ] *

    Default value: 'at_least_modules_visible' *

    Default value: [ ]

    interface ATFType {
        applicationNavigator: {
            applicationMenuVisibility(
                inputs: {
                    assertNotVisible?: AssertApplicationNotVisibleType;
                    assertVisible?: AssertApplicationVisibleType;
                    navigator?: NavigatorType;
                    notVisible?: (string | Record<"sys_app_application">)[];
                    visible?: (string | Record<"sys_app_application">)[];
                },
            ): void;
            moduleVisibility(
                inputs: {
                    assertNotVisible?: AssertModuleNotVisibleType;
                    assertVisible?: AssertModuleVisibleType;
                    navigator?: NavigatorType;
                    notVisibleModules?: (string | Record<"sys_app_module">)[];
                    visibleModules?: (string | Record<"sys_app_module">)[];
                },
            ): void;
            navigateToModule(
                inputs: { module: string | Record<"sys_app_module"> },
            ): void;
        };
        catalog: {
            addItemToShoppingCart(
                inputs: { assert?: AssertShoppingType },
            ): { cart_item_id: string };
            openCatalogItem(
                inputs: { catalogItem: string | Record<"sc_cat_item"> },
            ): void;
            openRecordProducer(
                inputs: { catalogItem: string | Record<"sc_cat_item_producer"> },
            ): void;
            orderCatalogItem(
                inputs: { assert?: AssertOrderCatalogItemType },
            ): { cart: string; request_id: string };
            setCatalogItemQuantity(inputs: { quantity?: string | number }): void;
            setVariableValue(
                inputs: {
                    catalogItem:
                        | string
                        | Record<"sc_cat_item_producer">
                        | Record<"sc_cat_item">;
                    variableValues: string;
                },
            ): void;
            submitRecordProducer(
                inputs: { assert?: AssertProducerType },
            ): { record_id: string };
            validatePriceAndRecurringPrice(
                inputs: {
                    frequency: FrequencyType;
                    price: string | number;
                    recurringPrice: string | number;
                },
            ): void;
            validateVariableValue(
                inputs: {
                    catalogConditions?: string;
                    catalogItem: string | Record<"sc_cat_item">;
                },
            ): void;
            variableStateValidation(
                inputs: {
                    catalogItem: string | Record<"sc_cat_item">;
                    mandatory?: string[];
                    notMandatory?: string[];
                    notReadOnly?: string[];
                    notVisible?: string[];
                    readOnly?: string[];
                    visible?: string[];
                },
            ): void;
        };
        catalog_SP: {
            addItemtoShoppingCart(
                inputs: { assert?: AssertAddItemToCartSP },
            ): { cart_item_id: string };
            addOrderGuidetoShoppingCart(
                inputs: { assert?: AssertAddOrderGuidetoShoppingCart_SP },
            ): void;
            addRowToMultiRowVariableSet(
                inputs: {
                    catalogItem: string | Record<"sc_cat_item">;
                    variableSet: string | Record<"item_option_new_set">;
                },
            ): void;
            navigatewithinOrderGuide(
                inputs: { assert?: AssertNavigate; guideStep?: GuideStepType },
            ): void;
            openCatalogItem(
                inputs: {
                    catalogItem: string | Record<"sc_cat_item">;
                    page?: string | Record<"sp_page">;
                    portal?: string | Record<"sp_portal">;
                    queryParameters?: QueryParam;
                },
            ): void;
            openOrderGuide(
                inputs: {
                    orderGuide: string | Record<"sc_cat_item_guide">;
                    page?: string | Record<"sp_page">;
                    portal?: string | Record<"sp_portal">;
                    queryParameters?: QueryParam;
                },
            ): { record_id: string; table: keyof Tables };
            openRecordProducer(
                inputs: {
                    page?: string | Record<"sp_page">;
                    portal?: string | Record<"sp_portal">;
                    queryParameters?: QueryParam;
                    recordProducer: string | Record<"sc_cat_item_producer">;
                },
            ): void;
            orderCatalogItem(
                inputs: { assert?: AssertOrderCatalogItemSP },
            ): { record_id: string; table: keyof Tables };
            reviewIteminOrderGuide(
                inputs: { included?: boolean; item: string | Record<"sc_cat_item"> },
            ): void;
            reviewOrderGuideSummary(
                inputs: {
                    items: (string | Record<"sc_cat_item">)[];
                    price: string | number;
                },
            ): void;
            saveCurrentRowOfMultiRowVariableSet(
                inputs: { assert?: AssertMultiRowType },
            ): void;
            setCatalogItemQuantity(inputs: { quantity: string | number }): void;
            setVariableValue(
                inputs: {
                    catalogItem:
                        | string
                        | Record<"sc_cat_item_producer">
                        | Record<"sc_cat_item">;
                    variableSet?: string | Record<"item_option_new_set">;
                    variableValues?: string;
                },
            ): void;
            submitOrderGuide(
                inputs: { assert?: AssertSubmitOrderGuideSP },
            ): { record_id: string; table: keyof Tables };
            submitRecordProducer(
                inputs: { assert?: AssertRecordProducerSubmitSP },
            ): { record_id: string; table: keyof Tables };
            validateOrderGuideItem(
                inputs: { items: (string | Record<"sc_cat_item">)[] },
            ): void;
            validatePriceAndRecurringPrice(
                inputs: {
                    frequency: FrequencyType;
                    price: string | number;
                    recurringPrice: string | number;
                },
            ): void;
            validateVariableValue(
                inputs: {
                    catalogItem: string | Record<"sc_cat_item">;
                    variableSet?: string | Record<"item_option_new_set">;
                    variableValues?: string;
                },
            ): void;
            variableStateValidation(
                inputs: {
                    catalogItem: string | Record<"sc_cat_item">;
                    mandatory?: string[];
                    notMandatory?: string[];
                    notReadOnly?: string[];
                    notVisible?: string[];
                    readOnly?: string[];
                    variableSet?: string | Record<"item_option_new_set">;
                    visible?: string[];
                },
            ): void;
        };
        email: {
            generateInboundEmail(
                inputs: { body?: string; from?: string; subject?: string; to: string },
            ): { output_email_record: any };
            generateInboundReplyEmail<T extends keyof Tables>(
                inputs: {
                    body?: string;
                    from?: string;
                    subject?: string;
                    targetRecord: string | Record<T>;
                    targetTable: T;
                    to: string;
                },
            ): { output_reply_email_record: any };
            generateRandomString(
                inputs: { length?: number },
            ): { random_string: string };
            validateOutboundEmail<T extends keyof Tables>(
                inputs: { conditions?: string; table?: T },
            ): void;
            validateOutboundEmailGeneratedByFlow<T extends keyof Tables>(
                inputs: {
                    conditions?: string;
                    sourceFlow: string | Record<"sys_hub_flow">;
                    table?: T;
                },
            ): void;
            validateOutboundEmailGeneratedByNotification<T extends keyof Tables>(
                inputs: {
                    conditions?: string;
                    sourceNotification: string | Record<"sysevent_email_action">;
                    table?: T;
                },
            ): void;
        };
        form: {
            addAttachmentsToForm(): void;
            clickDeclarativeAction<T extends keyof Tables>(
                inputs: {
                    assert: AssertDeclarativeActionType;
                    declarativeAction: string | Record<"sys_declarative_action_assignment">;
                    formUI?: FormUIType;
                    table: T;
                },
            ): { record_id: string; table: T };
            clickModalButton(
                inputs: {
                    action?: ActionType;
                    assert?: AssertModalType;
                    assertTimeout?: number;
                    button: string;
                    formUI?: FormUIType;
                    uiPage: string | Record<"sys_ui_page">;
                    values?: string;
                },
            ): void;
            clickUIAction<T extends keyof Tables>(
                inputs: {
                    actionType?: UIActionType;
                    assert: UIActionAssertType;
                    declarativeAction?: string | Record<"sys_declarative_action_assignment">;
                    formUI?: FormUIType;
                    table: T;
                    uiAction: string | Record<"sys_ui_action">;
                },
            ): { record_id: string; table: T };
            declarativeActionVisibility(
                inputs: {
                    formUI?: FormUIType;
                    notVisible?: (string | Record<"sys_declarative_action_assignment">)[];
                    table: keyof Tables;
                    visible?: (string | Record<"sys_declarative_action_assignment">)[];
                },
            ): void;
            fieldStateValidation<T extends keyof Tables>(
                inputs: {
                    formUI?: FormUIType;
                    mandatory?: (
                        | SomeOtherString
                        | keyof FullSchema<T>
                        | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                    )[];
                    notMandatory?: (
                        | SomeOtherString
                        | keyof FullSchema<T>
                        | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                    )[];
                    notReadOnly?: (
                        | SomeOtherString
                        | keyof FullSchema<T>
                        | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                    )[];
                    notVisible?: (
                        | SomeOtherString
                        | keyof FullSchema<T>
                        | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                    )[];
                    readOnly?: (
                        | SomeOtherString
                        | keyof FullSchema<T>
                        | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                    )[];
                    table: T;
                    visible?: (
                        | SomeOtherString
                        | keyof FullSchema<T>
                        | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                    )[];
                },
            ): void;
            fieldValueValidation<T extends keyof Tables>(
                inputs: { conditions: string; formUI?: FormUIType; table: T },
            ): void;
            openExistingRecord<T extends keyof Tables>(
                inputs: {
                    formUI?: FormUIType;
                    recordId: string | Record;
                    recordPath?: string;
                    selectedTabIndex?: number;
                    table: T;
                    view?: string;
                },
            ): void;
            openNewForm<T extends keyof Tables>(
                inputs: {
                    formUI?: FormUIType;
                    recordPath?: string;
                    table: T;
                    view?: string;
                },
            ): void;
            setFieldValue<T extends keyof Tables>(
                inputs: {
                    fieldValues: Partial<Data<T>>;
                    formUI?: FormUIType;
                    table: T;
                },
            ): void;
            submitForm(
                inputs: { assert?: AssertType; formUI?: FormUIType },
            ): { record_id: string; table: keyof Tables };
            uiActionVisibility<T extends keyof Tables>(
                inputs: {
                    formUI?: FormUIType;
                    notVisible?: (string | Record<"sys_ui_action">)[];
                    table: T;
                    visible?: (string | Record<"sys_ui_action">)[];
                },
            ): void;
        };
        form_SP: {
            addAttachmentsToForm(): void;
            clickUIAction<T extends keyof Tables>(
                inputs: {
                    assert: AssertClickUIActionSP;
                    table: T;
                    uiAction: string | Record<"sys_ui_action">;
                },
            ): { record_id: string; table: T };
            fieldStateValidation<T extends keyof Tables>(
                inputs: {
                    mandatory?: (
                        | keyof FullSchema<T>
                        | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                        | SomeOtherString
                    )[];
                    notMandatory?: (
                        | keyof FullSchema<T>
                        | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                        | SomeOtherString
                    )[];
                    notReadOnly?: (
                        | keyof FullSchema<T>
                        | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                        | SomeOtherString
                    )[];
                    notVisible?: (
                        | keyof FullSchema<T>
                        | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                        | SomeOtherString
                    )[];
                    readOnly?: (
                        | keyof FullSchema<T>
                        | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                        | SomeOtherString
                    )[];
                    table: T;
                    visible?: (
                        | keyof FullSchema<T>
                        | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                        | SomeOtherString
                    )[];
                },
            ): void;
            fieldValueValidation<T extends keyof Tables>(
                inputs: { conditions: string; table: T },
            ): void;
            openNewForm<T extends keyof Tables>(
                inputs: {
                    page?: string | Record<"sp_page">;
                    paramID?: string | Record<T>;
                    portal?: string | Record<"sp_portal">;
                    queryParameters?: QueryParam;
                    table: T;
                    view?: string;
                },
            ): void;
            openServicePortalPage(
                inputs: {
                    page: string | Record<"sp_page">;
                    portal: string | Record<"sp_portal">;
                    queryParameters?: QueryParam;
                },
            ): void;
            setFieldValue<T extends keyof Tables>(
                inputs: { fieldValues: Partial<Data<T>>; table: T },
            ): void;
            submitForm(
                inputs: { assert: AssertSubmitFormSP },
            ): { record_id: string; table: keyof Tables };
            uiActionVisibilityValidation<T extends keyof Tables>(
                inputs: {
                    notVisible?: (string | Record<"sys_ui_action">)[];
                    table: T;
                    visible?: (string | Record<"sys_ui_action">)[];
                },
            ): void;
        };
        reporting: {
            reportVisibility(
                inputs: {
                    assert?: AssertReportVisibilityType;
                    report: string | Record<"sys_report">;
                },
            ): void;
        };
        responsiveDashboard: {
            responsiveDashboardSharing(
                inputs: {
                    assert?: DashboardSharingAssertType;
                    dashboard: string | Record<"pa_dashboards">;
                },
            ): void;
            responsiveDashboardVisibility(
                inputs: {
                    assert?: AssertResponsiveDashboardType;
                    dashboard: string | Record<"pa_dashboards">;
                },
            ): void;
        };
        rest: {
            assertJsonResponsePayloadElement(
                inputs: {
                    elementName: string;
                    elementValue: string;
                    operation?: AssertResponseOperationType;
                },
            ): void;
            assertResponseHeader(
                inputs: {
                    headerName: string;
                    headerValue: string;
                    operation?: AssertResponseHeader;
                },
            ): void;
            assertResponseJSONPayloadIsValid(inputs: object): void;
            assertResponsePayload(
                inputs: { operation?: AssertResponsePayload; responseBody: string },
            ): void;
            assertResponseTime(
                inputs: {
                    operation?: ResponseConditionOperationType;
                    responseTime: number;
                },
            ): void;
            assertResponseXMLPayloadIsWellFormed(inputs: object): void;
            assertStatusCode(
                inputs: { operation?: RestStatusOperationType; statusCode: number },
            ): void;
            assertStatusCodeName(
                inputs: { codeName: string; operation?: ResponseOperationValueType },
            ): void;
            assertXMLResponsePayloadElement(
                inputs: {
                    elementPath: string;
                    elementValue: string;
                    operation?: ResponseValueOperationType;
                },
            ): void;
            sendRestRequest(
                inputs: {
                    auth?: AuthType;
                    basicAuthentication?: string | Record<"sys_auth_profile_basic">;
                    body?: string;
                    headers?: QueryParam;
                    method?: HTTPMethodType;
                    mutualAuth?: string | Record<"sys_certificate">;
                    path: string;
                    queryParameters?: QueryParam;
                },
            ): void;
        };
        server: {
            addAttachmentsToExistingRecord(
                inputs: { recordId: string; table: string },
            ): void;
            checkoutShoppingCart(
                inputs: {
                    assert?: AssertCartType;
                    deliveryAddress: string;
                    requestedFor: string | Record<"sys_user">;
                    specialInstructions: string;
                },
            ): { request_id: string };
            createUser(
                inputs: {
                    fieldValues?: Partial<Data<"sys_user">>;
                    firstName?: string;
                    groups?: (string | Record<"sys_user_group">)[];
                    impersonate?: boolean;
                    lastName?: string;
                    roles?: (string | Role)[];
                    table?: string;
                },
            ): { user: any };
            impersonate(inputs: { user: string | Record<"sys_user"> }): { user: any };
            log(inputs: { log: string }): void;
            recordDelete<T extends keyof Tables>(
                inputs: {
                    assert?: RecordDeleteAssertType;
                    enforceSecurity?: boolean;
                    recordId: string | Record<T>;
                    table: T;
                },
            ): void;
            recordInsert<T extends keyof Tables>(
                inputs: {
                    assert?: AssertInsert;
                    enforceSecurity?: boolean;
                    fieldValues: Partial<Data<T>>;
                    table: T;
                },
            ): { record_id: string; table: keyof Tables };
            recordQuery<T extends keyof Tables>(
                inputs: {
                    assert?: AssertQueryType;
                    enforceSecurity?: boolean;
                    fieldValues: string;
                    table: T;
                },
            ): { first_record: string; table: T };
            recordUpdate<T extends keyof Tables>(
                inputs: {
                    assert?: AssertUpdateType;
                    enforceSecurity?: boolean;
                    fieldValues: Partial<Data<T>>;
                    recordId: string | Record<T>;
                    table: T;
                },
            ): void;
            recordValidation<T extends keyof Tables>(
                inputs: {
                    assert?: AssertRecordValidationType;
                    enforceSecurity?: boolean;
                    fieldValues: string;
                    recordId: string | Record;
                    table: T;
                },
            ): void;
            replayRequestItem(
                inputs: { request_item: string | Record<"sc_req_item"> },
            ): { reqItem: any; table: keyof Tables };
            runServerSideScript(
                inputs: { jasmineVersion?: string; script?: string },
            ): { record_id: string; table: keyof Tables };
            searchForCatalogItem(
                inputs: {
                    assert?: AssertCatalogItem;
                    assertItem: string | Record<"sc_cat_item">;
                    catalog: string | Record<"sc_catalog">;
                    category: string | Record<"sc_category">;
                    searchInPortal?: boolean;
                    searchTerm: string;
                },
            ): { catalog_item_id: string };
            setOutputVariables(): void;
        };
    }
    Index

    Properties

    applicationNavigator: {
        applicationMenuVisibility(
            inputs: {
                assertNotVisible?: AssertApplicationNotVisibleType;
                assertVisible?: AssertApplicationVisibleType;
                navigator?: NavigatorType;
                notVisible?: (string | Record<"sys_app_application">)[];
                visible?: (string | Record<"sys_app_application">)[];
            },
        ): void;
        moduleVisibility(
            inputs: {
                assertNotVisible?: AssertModuleNotVisibleType;
                assertVisible?: AssertModuleVisibleType;
                navigator?: NavigatorType;
                notVisibleModules?: (string | Record<"sys_app_module">)[];
                visibleModules?: (string | Record<"sys_app_module">)[];
            },
        ): void;
        navigateToModule(
            inputs: { module: string | Record<"sys_app_module"> },
        ): void;
    }

    Application Navigator

    Type Declaration

    • applicationMenuVisibility: function
      • Verifies visibility of application menus in the left navigation bar

        Default values:

        navigator = "ui15"
        visible = []
        assertVisible = "at_least_applications_visible"
        notVisible = []
        assertNotVisible = "at_least_applications_not_visible"

        Parameters

        • inputs: {
              assertNotVisible?: AssertApplicationNotVisibleType;
              assertVisible?: AssertApplicationVisibleType;
              navigator?: NavigatorType;
              notVisible?: (string | Record<"sys_app_application">)[];
              visible?: (string | Record<"sys_app_application">)[];
          }
          • OptionalassertNotVisible?: AssertApplicationNotVisibleType

            Default value:

            assertNotVisible = "at_least_applications_not_visible"
            
          • OptionalassertVisible?: AssertApplicationVisibleType

            Default value:

            assertVisible = "at_least_applications_visible
            
          • Optionalnavigator?: NavigatorType

            Default value:

            navigator = "ui15"
            
          • OptionalnotVisible?: (string | Record<"sys_app_application">)[]

            Default value:

            notVisible = []
            
          • Optionalvisible?: (string | Record<"sys_app_application">)[]

            Default value:

            visible = []
            

        Returns void

    • moduleVisibility: function
      • Verifies visibility of modules in the left navigation bar.

        Default values:

        navigator = "ui15",
        assertNotVisible = "at_least_modules_not_visible",
        notVisibleModules = [],
        assertVisible = "at_least_modules_visible",
        visibleModules = []

        Parameters

        • inputs: {
              assertNotVisible?: AssertModuleNotVisibleType;
              assertVisible?: AssertModuleVisibleType;
              navigator?: NavigatorType;
              notVisibleModules?: (string | Record<"sys_app_module">)[];
              visibleModules?: (string | Record<"sys_app_module">)[];
          }
          • OptionalassertNotVisible?: AssertModuleNotVisibleType

            Default value:

            assertNotVisible = "at_least_modules_not_visible"
            
          • OptionalassertVisible?: AssertModuleVisibleType

            Default value:

            assertVisible = "at_least_modules_visible"
            
          • Optionalnavigator?: NavigatorType

            Default value:

            navigator = "ui15"
            
          • OptionalnotVisibleModules?: (string | Record<"sys_app_module">)[]

            Default value:

            notVisibleModules = []
            
          • OptionalvisibleModules?: (string | Record<"sys_app_module">)[]

            Default value:

            visibleModules = []
            

        Returns void

    • navigateToModule: function
      • Navigates to a module, as if a user had clicked on it. In order to navigate to a module, it must be visible in the application navigator to the currently executing user.

        Wherever the module takes you is your responsibility. The following are not supported:

        • Modules that are separators
        • Modules that link to external websites, such as the ServiceNow documentation site
        • Modules that reload or redirect the entire page
        • Module URL that executes client-side JavaScript

        The 'Timeout' field can be used to add a delay after the module has been opened. This can be useful if you have navigated to a page with asynchronous activities that need additional time to complete.

        Parameters

        • inputs: { module: string | Record<"sys_app_module"> }

        Returns void

    catalog: {
        addItemToShoppingCart(
            inputs: { assert?: AssertShoppingType },
        ): { cart_item_id: string };
        openCatalogItem(
            inputs: { catalogItem: string | Record<"sc_cat_item"> },
        ): void;
        openRecordProducer(
            inputs: { catalogItem: string | Record<"sc_cat_item_producer"> },
        ): void;
        orderCatalogItem(
            inputs: { assert?: AssertOrderCatalogItemType },
        ): { cart: string; request_id: string };
        setCatalogItemQuantity(inputs: { quantity?: string | number }): void;
        setVariableValue(
            inputs: {
                catalogItem:
                    | string
                    | Record<"sc_cat_item_producer">
                    | Record<"sc_cat_item">;
                variableValues: string;
            },
        ): void;
        submitRecordProducer(
            inputs: { assert?: AssertProducerType },
        ): { record_id: string };
        validatePriceAndRecurringPrice(
            inputs: {
                frequency: FrequencyType;
                price: string | number;
                recurringPrice: string | number;
            },
        ): void;
        validateVariableValue(
            inputs: {
                catalogConditions?: string;
                catalogItem: string | Record<"sc_cat_item">;
            },
        ): void;
        variableStateValidation(
            inputs: {
                catalogItem: string | Record<"sc_cat_item">;
                mandatory?: string[];
                notMandatory?: string[];
                notReadOnly?: string[];
                notVisible?: string[];
                readOnly?: string[];
                visible?: string[];
            },
        ): void;
    }

    Type Declaration

    • addItemToShoppingCart: function
      • Add item to Shopping Cart

        In order to use this step you must have already opened a Catalog Item page using the “Open a Catalog Item” step. After this step, you may no longer use any form steps on the currently opened catalog item as this step will close it

        Default values:

        assert = "form_submitted_to_server"
        

        Parameters

        • inputs: { assert?: AssertShoppingType }
          • Optionalassert?: AssertShoppingType

            Default value:

            assert = "form_submitted_to_server"
            

        Returns { cart_item_id: string }

    • openCatalogItem: function
      • Opens a catalog item.

        Parameters

        • inputs: { catalogItem: string | Record<"sc_cat_item"> }

        Returns void

    • openRecordProducer: function
      • Opens a Record Producer.

        This step can only be done for users that have access to the record producer.

        Parameters

        • inputs: { catalogItem: string | Record<"sc_cat_item_producer"> }

        Returns void

    • orderCatalogItem: function
      • Click Order Now to order a catalog item

        In order to use this step you must have already opened a Catalog Item page using the "Open a Catalog Item" step. After this step, you may no longer use any steps on the currently opened catalog item as this step will close it.

        Default values:

        assert = "form_submitted_to_server"
        

        Parameters

        • inputs: { assert?: AssertOrderCatalogItemType }
          • Optionalassert?: AssertOrderCatalogItemType

            Default value:

            assert = "form_submitted_to_server"
            

        Returns { cart: string; request_id: string }

    • setCatalogItemQuantity: function
      • Sets quantity value on the current catalog item.

        In order to use this step you must have already opened a catalog item page using the “Open a Catalog Item” step. This step cannot be used after “Order Catalog Item” step. This step can not be used with Record Producers.

        Default values:

        quantity = 1
        

        Parameters

        • inputs: { quantity?: string | number }
          • Optionalquantity?: string | number

            Default value:

            quantity = 1
            

        Returns void

    • setVariableValue: function
      • Sets variable values on the current Catalog Item or Record Producer page or a form containing variable editor

        Parameters

        • inputs: {
              catalogItem:
                  | string
                  | Record<"sc_cat_item_producer">
                  | Record<"sc_cat_item">;
              variableValues: string;
          }

        Returns void

    • submitRecordProducer: function
      • Submit currently opened Record Producer

        In order to use this step you must have already opened a Record Producer page using the “Open a Record Producer” step. After this step, you may no longer use any form steps on the currently opened record producer as this step will close it.

        Default values:

        assert = "form_submitted_to_server"
        

        Parameters

        • inputs: { assert?: AssertProducerType }
          • Optionalassert?: AssertProducerType

            Default value:

            assert = "form_submitted_to_server"
            

        Returns { record_id: string }

    • validatePriceAndRecurringPrice: function
      • Step to validate price and recurring price of a Catalog Item

        In order to use this step you must have already opened a catalog item page using the “Open a Catalog Item” step. This step cannot be used after “Order Catalog Item” step.

        This step can not be used with Record Producers

        Parameters

        • inputs: {
              frequency: FrequencyType;
              price: string | number;
              recurringPrice: string | number;
          }

        Returns void

    • validateVariableValue: function
      • Validates variable values on the Catalog Item, Record Producer pages or a page containing a variable editor.

        Additional Considerations

        Catalog Item - This step can be used only in-between “Open a Catalog Item” step and “Order Catalog Item” step or after opening a page containing the variable editor using the "Open Existing Record" step. .

        Record Producer - This step can be used only in-between “Open a Record Producer” and “Submit Record Producer” step or after opening the target record page containing the variable editor using the "Open Existing Record" step.

        Several conditions can be applied to the same variable, if desired

        Parameters

        • inputs: { catalogConditions?: string; catalogItem: string | Record<"sc_cat_item"> }

        Returns void

    • variableStateValidation: function
      • Validates states of the desired variables.

        The variable states can be one (or more) of mandatory, not mandatory, read only, not read only, visible and not visible.

        Default values:

        visible = []
        notVisible = []
        readOnly = []
        notReadOnly = []
        mandatory = []
        notMandatory = []

        Parameters

        • inputs: {
              catalogItem: string | Record<"sc_cat_item">;
              mandatory?: string[];
              notMandatory?: string[];
              notReadOnly?: string[];
              notVisible?: string[];
              readOnly?: string[];
              visible?: string[];
          }
          • catalogItem: string | Record<"sc_cat_item">
          • Optionalmandatory?: string[]

            Default value:

            mandatory = []
            
          • OptionalnotMandatory?: string[]

            Default value:

            notMandatory = []
            
          • OptionalnotReadOnly?: string[]

            Default value:

            notReadOnly = []
            
          • OptionalnotVisible?: string[]

            Default value:

            notVisible = []
            
          • OptionalreadOnly?: string[]

            Default value:

            readOnly = []
            
          • Optionalvisible?: string[]

            Default value:

            visible = []
            

        Returns void

    catalog_SP: {
        addItemtoShoppingCart(
            inputs: { assert?: AssertAddItemToCartSP },
        ): { cart_item_id: string };
        addOrderGuidetoShoppingCart(
            inputs: { assert?: AssertAddOrderGuidetoShoppingCart_SP },
        ): void;
        addRowToMultiRowVariableSet(
            inputs: {
                catalogItem: string | Record<"sc_cat_item">;
                variableSet: string | Record<"item_option_new_set">;
            },
        ): void;
        navigatewithinOrderGuide(
            inputs: { assert?: AssertNavigate; guideStep?: GuideStepType },
        ): void;
        openCatalogItem(
            inputs: {
                catalogItem: string | Record<"sc_cat_item">;
                page?: string | Record<"sp_page">;
                portal?: string | Record<"sp_portal">;
                queryParameters?: QueryParam;
            },
        ): void;
        openOrderGuide(
            inputs: {
                orderGuide: string | Record<"sc_cat_item_guide">;
                page?: string | Record<"sp_page">;
                portal?: string | Record<"sp_portal">;
                queryParameters?: QueryParam;
            },
        ): { record_id: string; table: keyof Tables };
        openRecordProducer(
            inputs: {
                page?: string | Record<"sp_page">;
                portal?: string | Record<"sp_portal">;
                queryParameters?: QueryParam;
                recordProducer: string | Record<"sc_cat_item_producer">;
            },
        ): void;
        orderCatalogItem(
            inputs: { assert?: AssertOrderCatalogItemSP },
        ): { record_id: string; table: keyof Tables };
        reviewIteminOrderGuide(
            inputs: { included?: boolean; item: string | Record<"sc_cat_item"> },
        ): void;
        reviewOrderGuideSummary(
            inputs: {
                items: (string | Record<"sc_cat_item">)[];
                price: string | number;
            },
        ): void;
        saveCurrentRowOfMultiRowVariableSet(
            inputs: { assert?: AssertMultiRowType },
        ): void;
        setCatalogItemQuantity(inputs: { quantity: string | number }): void;
        setVariableValue(
            inputs: {
                catalogItem:
                    | string
                    | Record<"sc_cat_item_producer">
                    | Record<"sc_cat_item">;
                variableSet?: string | Record<"item_option_new_set">;
                variableValues?: string;
            },
        ): void;
        submitOrderGuide(
            inputs: { assert?: AssertSubmitOrderGuideSP },
        ): { record_id: string; table: keyof Tables };
        submitRecordProducer(
            inputs: { assert?: AssertRecordProducerSubmitSP },
        ): { record_id: string; table: keyof Tables };
        validateOrderGuideItem(
            inputs: { items: (string | Record<"sc_cat_item">)[] },
        ): void;
        validatePriceAndRecurringPrice(
            inputs: {
                frequency: FrequencyType;
                price: string | number;
                recurringPrice: string | number;
            },
        ): void;
        validateVariableValue(
            inputs: {
                catalogItem: string | Record<"sc_cat_item">;
                variableSet?: string | Record<"item_option_new_set">;
                variableValues?: string;
            },
        ): void;
        variableStateValidation(
            inputs: {
                catalogItem: string | Record<"sc_cat_item">;
                mandatory?: string[];
                notMandatory?: string[];
                notReadOnly?: string[];
                notVisible?: string[];
                readOnly?: string[];
                variableSet?: string | Record<"item_option_new_set">;
                visible?: string[];
            },
        ): void;
    }

    Service Catalog in Service Portal

    Type Declaration

    • addItemtoShoppingCart: function
      • Add item to Shopping Cart

        In order to use this step you must have already opened a Catalog Item page using the “Open a Catalog Item (SP)” step.

        Default values:

        assert = "form_submitted_to_server"
        

        Parameters

        • inputs: { assert?: AssertAddItemToCartSP }
          • Optionalassert?: AssertAddItemToCartSP

            Default value:

            assert = "form_submitted_to_server"
            

        Returns { cart_item_id: string }

    • addOrderGuidetoShoppingCart: function
      • Add order Guide to Shopping Cart

        In order to use this step you must have already opened an Order Guide and should have navigated to the Summary section using the other ATF steps available.

        Default values:

        assert = "form_submitted_to_server"
        

        Parameters

        • inputs: { assert?: AssertAddOrderGuidetoShoppingCart_SP }
          • Optionalassert?: AssertAddOrderGuidetoShoppingCart_SP

            Default value:

            assert = "form_submitted_to_server"
            

        Returns void

    • addRowToMultiRowVariableSet: function
      • This is step is used to add a row to multi-row variable set on current catalog item in Service Portal.

        This step can only be used when the current catalog item contains a multi-row variable set.

        Parameters

        • inputs: {
              catalogItem: string | Record<"sc_cat_item">;
              variableSet: string | Record<"item_option_new_set">;
          }

        Returns void

    • navigatewithinOrderGuide: function
      • Use this step to navigate within an Order Guide

        In order to use this step you must have already opened an Order Guide using the "Open an Order Guide (SP)" step to navigate to any of the Order Guide step.

        Default values:

        guideStep = 1
        assert = "navigate_success"

        Parameters

        • inputs: { assert?: AssertNavigate; guideStep?: GuideStepType }
          • Optionalassert?: AssertNavigate

            Default value:

            assert = "navigate_success"
            
          • OptionalguideStep?: GuideStepType

            Default value:

            guideStep = 1
            

        Returns void

    • openCatalogItem: function
      • Opens a catalog item in portal

        This step can only be done for users that have access to the item.

        URL parameters can be added to the request when needed.

        Default values:

        portal = "81b75d3147032100ba13a5554ee4902b"
        page = "sc_cat_item"
        queryParameters = {}

        Parameters

        • inputs: {
              catalogItem: string | Record<"sc_cat_item">;
              page?: string | Record<"sp_page">;
              portal?: string | Record<"sp_portal">;
              queryParameters?: QueryParam;
          }
          • catalogItem: string | Record<"sc_cat_item">
          • Optionalpage?: string | Record<"sp_page">

            Default value:

            page = "sc_cat_item"
            
          • Optionalportal?: string | Record<"sp_portal">

            Default value:

            portal = "81b75d3147032100ba13a5554ee4902b"
            
          • OptionalqueryParameters?: QueryParam

            Default value:

            queryParameters = {}
            

        Returns void

    • openOrderGuide: function
      • Opens an order guide in portal

        This step can only be done for users that have access to the order guide.

        URL parameters can be added to the request when needed.

        Default values:

        queryParameters = {}
        portal = "81b75d3147032100ba13a5554ee4902b"
        page = "sc_cat_item_guide"

        Parameters

        • inputs: {
              orderGuide: string | Record<"sc_cat_item_guide">;
              page?: string | Record<"sp_page">;
              portal?: string | Record<"sp_portal">;
              queryParameters?: QueryParam;
          }
          • orderGuide: string | Record<"sc_cat_item_guide">
          • Optionalpage?: string | Record<"sp_page">

            Default value:

            page = "sc_cat_item_guide"
            
          • Optionalportal?: string | Record<"sp_portal">

            Default value:

            portal = "81b75d3147032100ba13a5554ee4902b"
            
          • OptionalqueryParameters?: QueryParam

            Default value:

            queryParameters = {}
            

        Returns { record_id: string; table: keyof Tables }

    • openRecordProducer: function
      • Opens a Record Producer in portal.

        This step can only be done for users that have access to the record producer.

        URL parameters can be added to the request when needed.

        Default values:

        portal = "81b75d3147032100ba13a5554ee4902b"
        page = "9f12251147132100ba13a5554ee490f4"
        queryParameters = {}

        Parameters

        • inputs: {
              page?: string | Record<"sp_page">;
              portal?: string | Record<"sp_portal">;
              queryParameters?: QueryParam;
              recordProducer: string | Record<"sc_cat_item_producer">;
          }
          • Optionalpage?: string | Record<"sp_page">

            Default value:

            page = "9f12251147132100ba13a5554ee490f4"
            
          • Optionalportal?: string | Record<"sp_portal">

            Default value:

            portal = "81b75d3147032100ba13a5554ee4902b"
            
          • OptionalqueryParameters?: QueryParam

            Default value:

            queryParameters = {}
            
          • recordProducer: string | Record<"sc_cat_item_producer">

        Returns void

    • orderCatalogItem: function
      • Click Order Now to order a catalog item

        In order to use this step you must have already opened a Catalog Item page using the "Open a Catalog Item" step. After this step, you may no longer use any steps on the currently opened catalog item as this step will close it.

        Default values:

        assert = "form_submitted_to_server"
        

        Parameters

        • inputs: { assert?: AssertOrderCatalogItemSP }
          • Optionalassert?: AssertOrderCatalogItemSP

            Default value:

            assert = "form_submitted_to_server"
            

        Returns { record_id: string; table: keyof Tables }

    • reviewIteminOrderGuide: function
      • Review individual items in the Order Guide and choose to include the item or not

        This step can only be done for users that have access to the order guide and are on the 'Choose Options' stage.

        Default values:

        included = true
        

        Parameters

        • inputs: { included?: boolean; item: string | Record<"sc_cat_item"> }
          • Optionalincluded?: boolean

            Default value:

            included = true
            
          • item: string | Record<"sc_cat_item">

        Returns void

    • reviewOrderGuideSummary: function
      • Review Order Guide Summary in Service Portal

        This step can only be done for users that have access to the order guide and are on the 'Summary' stage.

        Parameters

        • inputs: { items: (string | Record<"sc_cat_item">)[]; price: string | number }

        Returns void

    • saveCurrentRowOfMultiRowVariableSet: function
      • This is step is used to save current row of a multi-row variable set on current catalog item in Service Portal.

        This step can only be used when the current catalog item contains a Multi-row Variable Set & after 'Add row to multi-row variable set (SP)' step.

        Default values:

        assert = "form_submitted_to_server"
        

        Parameters

        • inputs: { assert?: AssertMultiRowType }
          • Optionalassert?: AssertMultiRowType

            Default value:

            assert = "form_submitted_to_server"
            

        Returns void

    • setCatalogItemQuantity: function
      • Sets quantity value on the currently open catalog item.

        In order to use this step you must have already opened a catalog item page using the “Open a Catalog Item (SP)” step. This step cannot be used after “Order Catalog Item (SP)” step.

        This step can not be used with Record Producers or items within an Order Guide.

        Parameters

        • inputs: { quantity: string | number }

        Returns void

    • setVariableValue: function
      • Sets variable values on the current Catalog Item or Record Producer page

        Catalog Item - In order to use this step you must have already opened a catalog item page using the “Open a Catalog Item (SP)” step. This step cannot be used after “Order Catalog Item” step.

        Record Producer - In order to use this step you must have already opened a Record Producer page using the “Open a Record Producer (SP)” step. This step cannot be used after “Submit Record Producer” step.

        Parameters

        • inputs: {
              catalogItem:
                  | string
                  | Record<"sc_cat_item_producer">
                  | Record<"sc_cat_item">;
              variableSet?: string | Record<"item_option_new_set">;
              variableValues?: string;
          }

        Returns void

    • submitOrderGuide: function
      • Click Order Now to order an Order Guide

        In order to use this step you must have already opened an Order Guide and should have navigated to the Summary section using the other ATF steps available.

        Default values:

        assert = "form_submitted_to_server"
        

        Parameters

        • inputs: { assert?: AssertSubmitOrderGuideSP }
          • Optionalassert?: AssertSubmitOrderGuideSP

            Default value:

            assert = "form_submitted_to_server"
            

        Returns { record_id: string; table: keyof Tables }

    • submitRecordProducer: function
      • Submit currently opened Record Producer

        In order to use this step you must have already opened a Record Producer page using the "Open Record Producer Page (SP)" step. After this step, you may no longer use any form steps on the currently opened record producer as this step will close it.

        Default values:

        assert = "form_submitted_to_server"
        

        Parameters

        • inputs: { assert?: AssertRecordProducerSubmitSP }
          • Optionalassert?: AssertRecordProducerSubmitSP

            Default value:

            assert = "form_submitted_to_server"
            

        Returns { record_id: string; table: keyof Tables }

    • validateOrderGuideItem: function
      • Validate items included in the Order Guide

        This step can only be done for users that have access to the order guide and are on the 'Choose Options' stage.

        Parameters

        • inputs: { items: (string | Record<"sc_cat_item">)[] }

        Returns void

    • validatePriceAndRecurringPrice: function
      • Step to validate price and recurring price of a Catalog Item in Service Portal.

        In order to use this step you must have already opened a catalog item page using the “Open a Catalog Item (SP)” step. This step cannot be used after “Order Catalog Item (SP)” step.

        This step can not be used with Record Producers.

        Parameters

        • inputs: {
              frequency: FrequencyType;
              price: string | number;
              recurringPrice: string | number;
          }

        Returns void

    • validateVariableValue: function
      • Validates variable values on the current Catalog Item or Record Producer

        Additional Considerations

        Catalog Item - In order to use this step you must have already opened a catalog item page using the “Open a Catalog Item” step. This step cannot be used after “Order Catalog Item” step.

        Record Producer - In order to use this step you must have already opened a Record Producer page using the “Open a Record Producer” step. This step cannot be used after “Submit Record Producer” step.

        Several conditions can be applied to the same variable, if desired

        Parameters

        • inputs: {
              catalogItem: string | Record<"sc_cat_item">;
              variableSet?: string | Record<"item_option_new_set">;
              variableValues?: string;
          }

        Returns void

    • variableStateValidation: function
      • Validates states of the desired variables.

        The variable states can be one (or more) of mandatory, not mandatory, read only, not read only, visible and not visible.

        If a timeout is specified, the Client Test Runner will check the validation conditions every second until the timeout has been reached or the conditions are met.

        If a timeout is exceeded or one of the validations is not correct the step will fail.

        Default values:

        visible = []
        notVisible = []
        readOnly = []
        notReadOnly = []
        mandatory = []
        notMandatory = []

        Parameters

        • inputs: {
              catalogItem: string | Record<"sc_cat_item">;
              mandatory?: string[];
              notMandatory?: string[];
              notReadOnly?: string[];
              notVisible?: string[];
              readOnly?: string[];
              variableSet?: string | Record<"item_option_new_set">;
              visible?: string[];
          }
          • catalogItem: string | Record<"sc_cat_item">
          • Optionalmandatory?: string[]

            Default value:

            mandatory = []
            
          • OptionalnotMandatory?: string[]

            Default value:

            notMandatory = []
            
          • OptionalnotReadOnly?: string[]

            Default value:

            notReadOnly = []
            
          • OptionalnotVisible?: string[]

            Default value:

            notVisible = []
            
          • OptionalreadOnly?: string[]

            Default value:

            readOnly = []
            
          • OptionalvariableSet?: string | Record<"item_option_new_set">
          • Optionalvisible?: string[]

            Default value:

            visible = []
            

        Returns void

    email: {
        generateInboundEmail(
            inputs: { body?: string; from?: string; subject?: string; to: string },
        ): { output_email_record: any };
        generateInboundReplyEmail<T extends keyof Tables>(
            inputs: {
                body?: string;
                from?: string;
                subject?: string;
                targetRecord: string | Record<T>;
                targetTable: T;
                to: string;
            },
        ): { output_reply_email_record: any };
        generateRandomString(
            inputs: { length?: number },
        ): { random_string: string };
        validateOutboundEmail<T extends keyof Tables>(
            inputs: { conditions?: string; table?: T },
        ): void;
        validateOutboundEmailGeneratedByFlow<T extends keyof Tables>(
            inputs: {
                conditions?: string;
                sourceFlow: string | Record<"sys_hub_flow">;
                table?: T;
            },
        ): void;
        validateOutboundEmailGeneratedByNotification<T extends keyof Tables>(
            inputs: {
                conditions?: string;
                sourceNotification: string | Record<"sysevent_email_action">;
                table?: T;
            },
        ): void;
    }

    Email

    Type Declaration

    • generateInboundEmail: function
      • Generates an Email [sys_email] record that looks like a new inbound email. This step also creates an email.read event upon step completion.

        Parameters

        • inputs: { body?: string; from?: string; subject?: string; to: string }

        Returns { output_email_record: any }

    • generateInboundReplyEmail: function
      • Generates an Email [sys_email] record that looks like an email sent in reply to a system notification. This step also creates an email.read event upon step completion.

        Type Parameters

        • T extends keyof Tables

        Parameters

        • inputs: {
              body?: string;
              from?: string;
              subject?: string;
              targetRecord: string | Record<T>;
              targetTable: T;
              to: string;
          }

        Returns { output_reply_email_record: any }

    • generateRandomString: function
      • Generates a string that can be used as test data for another test step. By default, the string is 10 characters long. The maximum length of the string is 10,000 characters.

        Default values:

        length = 10
        

        Parameters

        • inputs: { length?: number }
          • Optionallength?: number

            Default value:

            length = 10
            

        Returns { random_string: string }

    • validateOutboundEmail: function
      • Filters the Email [sys_email] table to find an email that was sent during testing.

        Default values:

        conditions = "stateANYTHING^recipientsANYTHING^user_idANYTHING^subjectANYTHING^bodyANYTHING^headersANYTHING^EQ"
        

        Type Parameters

        • T extends keyof Tables

        Parameters

        • inputs: { conditions?: string; table?: T }
          • Optionalconditions?: string

            Default value:

            conditions = "stateANYTHING^recipientsANYTHING^user_idANYTHING^subjectANYTHING^bodyANYTHING^headersANYTHING^EQ"
            
          • Optionaltable?: T

        Returns void

    • validateOutboundEmailGeneratedByFlow: function
      • Filters the Email [sys_email] table to find an email that was sent from a flow during testing.

        Default values:

        conditions = "stateANYTHING^recipientsANYTHING^user_idANYTHING^subjectANYTHING^bodyANYTHING^EQ"
        

        Type Parameters

        • T extends keyof Tables

        Parameters

        • inputs: { conditions?: string; sourceFlow: string | Record<"sys_hub_flow">; table?: T }
          • Optionalconditions?: string

            Default value:

            conditions = "stateANYTHING^recipientsANYTHING^user_idANYTHING^subjectANYTHING^bodyANYTHING^EQ"
            
          • sourceFlow: string | Record<"sys_hub_flow">
          • Optionaltable?: T

        Returns void

    • validateOutboundEmailGeneratedByNotification: function
      • Filters the Email [sys_email] table to find an email that was sent from a notification during testing.

        • Default values:
        conditions = "stateANYTHING^recipientsANYTHING^user_idANYTHING^subjectANYTHING^bodyANYTHING^EQ"
        

        Type Parameters

        • T extends keyof Tables

        Parameters

        • inputs: {
              conditions?: string;
              sourceNotification: string | Record<"sysevent_email_action">;
              table?: T;
          }
          • Optionalconditions?: string

            Default value:

            conditions = "stateANYTHING^recipientsANYTHING^user_idANYTHING^subjectANYTHING^bodyANYTHING^EQ"
            
          • sourceNotification: string | Record<"sysevent_email_action">
          • Optionaltable?: T

        Returns void

    form: {
        addAttachmentsToForm(): void;
        clickDeclarativeAction<T extends keyof Tables>(
            inputs: {
                assert: AssertDeclarativeActionType;
                declarativeAction: string | Record<"sys_declarative_action_assignment">;
                formUI?: FormUIType;
                table: T;
            },
        ): { record_id: string; table: T };
        clickModalButton(
            inputs: {
                action?: ActionType;
                assert?: AssertModalType;
                assertTimeout?: number;
                button: string;
                formUI?: FormUIType;
                uiPage: string | Record<"sys_ui_page">;
                values?: string;
            },
        ): void;
        clickUIAction<T extends keyof Tables>(
            inputs: {
                actionType?: UIActionType;
                assert: UIActionAssertType;
                declarativeAction?: string | Record<"sys_declarative_action_assignment">;
                formUI?: FormUIType;
                table: T;
                uiAction: string | Record<"sys_ui_action">;
            },
        ): { record_id: string; table: T };
        declarativeActionVisibility(
            inputs: {
                formUI?: FormUIType;
                notVisible?: (string | Record<"sys_declarative_action_assignment">)[];
                table: keyof Tables;
                visible?: (string | Record<"sys_declarative_action_assignment">)[];
            },
        ): void;
        fieldStateValidation<T extends keyof Tables>(
            inputs: {
                formUI?: FormUIType;
                mandatory?: (
                    | SomeOtherString
                    | keyof FullSchema<T>
                    | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                )[];
                notMandatory?: (
                    | SomeOtherString
                    | keyof FullSchema<T>
                    | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                )[];
                notReadOnly?: (
                    | SomeOtherString
                    | keyof FullSchema<T>
                    | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                )[];
                notVisible?: (
                    | SomeOtherString
                    | keyof FullSchema<T>
                    | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                )[];
                readOnly?: (
                    | SomeOtherString
                    | keyof FullSchema<T>
                    | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                )[];
                table: T;
                visible?: (
                    | SomeOtherString
                    | keyof FullSchema<T>
                    | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                )[];
            },
        ): void;
        fieldValueValidation<T extends keyof Tables>(
            inputs: { conditions: string; formUI?: FormUIType; table: T },
        ): void;
        openExistingRecord<T extends keyof Tables>(
            inputs: {
                formUI?: FormUIType;
                recordId: string | Record;
                recordPath?: string;
                selectedTabIndex?: number;
                table: T;
                view?: string;
            },
        ): void;
        openNewForm<T extends keyof Tables>(
            inputs: {
                formUI?: FormUIType;
                recordPath?: string;
                table: T;
                view?: string;
            },
        ): void;
        setFieldValue<T extends keyof Tables>(
            inputs: {
                fieldValues: Partial<Data<T>>;
                formUI?: FormUIType;
                table: T;
            },
        ): void;
        submitForm(
            inputs: { assert?: AssertType; formUI?: FormUIType },
        ): { record_id: string; table: keyof Tables };
        uiActionVisibility<T extends keyof Tables>(
            inputs: {
                formUI?: FormUIType;
                notVisible?: (string | Record<"sys_ui_action">)[];
                table: T;
                visible?: (string | Record<"sys_ui_action">)[];
            },
        ): void;
    }

    Form

    Type Declaration

    • addAttachmentsToForm: function
      • Adds attachments to the current form. At least one attachment is required. In order to use this step you must have already opened a form using either the "Open a New Form" or "Open an Existing Record" steps. This step also cannot be used after a "Submit Form" step or "Click a UI Action" step has been used.

        Returns void

    • clickDeclarativeAction: function
      • Clicks a declarative action on the current form.

        Use the Form UI field to specify testing in the standard platform UI or workspace UI.

        In order to use this step you must have already opened a form using either the "Open a New Form" or "Open an Existing Record" steps. After this step, you may no longer use any form steps on the currently opened form as it is expected that this step will close it or move to a different page.

        Default values:

        formUI = "standard_ui"
        

        Type Parameters

        • T extends keyof Tables

        Parameters

        • inputs: {
              assert: AssertDeclarativeActionType;
              declarativeAction: string | Record<"sys_declarative_action_assignment">;
              formUI?: FormUIType;
              table: T;
          }
          • assert: AssertDeclarativeActionType
          • declarativeAction: string | Record<"sys_declarative_action_assignment">
          • OptionalformUI?: FormUIType

            Default value:

            formUI = "standard_ui"
            
          • table: T

        Returns { record_id: string; table: T }

    • clickModalButton: function
      • Clicks a button within a modal in the specified Form UI. Optionally sets field values for modals in a workspace UI.

        Use the Form UI field to specify testing in the standard platform UI or workspace UI.

        In the standard platform UI, this step clicks the button by id on the specified modal UI page and validates the following:

        • UI page was opened in a modal
        • Button is visible and enabled

        In a workspace UI, this step clicks the Confirm or Cancel action within the modal, and optionally sets field values.

        • Only modals opened with the following g_modal functions are supported: alert, confirm, confirmDestroy, showFields

        Use the Timeout field to specify the time to wait for the modal and button to appear.

        Use the Assertion timeout field to specify the time to wait for the assertion to pass or fail after clicking the button.

        Default values:

        formUI = "standard_ui"
        assert = ""
        assertTimeout = 5
        action = "confirm"

        Parameters

        • inputs: {
              action?: ActionType;
              assert?: AssertModalType;
              assertTimeout?: number;
              button: string;
              formUI?: FormUIType;
              uiPage: string | Record<"sys_ui_page">;
              values?: string;
          }
          • Optionalaction?: ActionType

            Default value:

            action = "confirm"
            
          • Optionalassert?: AssertModalType

            Default value:

            assert = ""
            
          • OptionalassertTimeout?: number

            Default value:

            assertTimeout = 5
            
          • button: string
          • OptionalformUI?: FormUIType

            Default value:

            formUI = "standard_ui"
            
          • uiPage: string | Record<"sys_ui_page">
          • Optionalvalues?: string

        Returns void

    • clickUIAction: function
      • Clicks a UI action on the current form.

        Default values:

        actionType = "ui_action"
        formUI = "standard_ui"
        declarativeAction = ""

        Type Parameters

        • T extends keyof Tables

        Parameters

        • inputs: {
              actionType?: UIActionType;
              assert: UIActionAssertType;
              declarativeAction?: string | Record<"sys_declarative_action_assignment">;
              formUI?: FormUIType;
              table: T;
              uiAction: string | Record<"sys_ui_action">;
          }
          • OptionalactionType?: UIActionType

            actionType = "ui_action"

          • assert: UIActionAssertType
          • OptionaldeclarativeAction?: string | Record<"sys_declarative_action_assignment">

            Default value:

            declarativeAction = ""
            
          • OptionalformUI?: FormUIType

            Default value:

            formUI = "standard_ui"
            
          • table: T
          • uiAction: string | Record<"sys_ui_action">

        Returns { record_id: string; table: T }

    • declarativeActionVisibility: function
      • Validates whether a declarative action is visible on the current form. You can assert that any number of declarative actions are either visible or not visible.

        Default values:

        formUI = "standard_ui"
        visible = []
        notVisible = []

        Parameters

        • inputs: {
              formUI?: FormUIType;
              notVisible?: (string | Record<"sys_declarative_action_assignment">)[];
              table: keyof Tables;
              visible?: (string | Record<"sys_declarative_action_assignment">)[];
          }
          • OptionalformUI?: FormUIType

            Default value:

            formUI = "standard_ui"
            
          • OptionalnotVisible?: (string | Record<"sys_declarative_action_assignment">)[]

            Default value:

            notVisible = []
            
          • table: keyof Tables
          • Optionalvisible?: (string | Record<"sys_declarative_action_assignment">)[]

            Default value:

            visible = []
            

        Returns void

    • fieldStateValidation: function
      • Validates states of the desired fields.

        The field states can be one (or more) of mandatory, not mandatory, read only, not read only, visible and not visible.

        If a timeout is specified, the Client Test Runner will check the validation conditions every second until the timeout has been reached or the conditions are met.

        If a timeout is exceeded or one of the validations is not correct the step will fail.

        Default values:

        formUI = "standard_ui"
        visible = []
        notVisible = []
        readOnly = []
        notReadOnly = []
        mandatory = []
        notMandatory = []

        Type Parameters

        • T extends keyof Tables

        Parameters

        • inputs: {
              formUI?: FormUIType;
              mandatory?: (
                  | SomeOtherString
                  | keyof FullSchema<T>
                  | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
              )[];
              notMandatory?: (
                  | SomeOtherString
                  | keyof FullSchema<T>
                  | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
              )[];
              notReadOnly?: (
                  | SomeOtherString
                  | keyof FullSchema<T>
                  | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
              )[];
              notVisible?: (
                  | SomeOtherString
                  | keyof FullSchema<T>
                  | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
              )[];
              readOnly?: (
                  | SomeOtherString
                  | keyof FullSchema<T>
                  | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
              )[];
              table: T;
              visible?: (
                  | SomeOtherString
                  | keyof FullSchema<T>
                  | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
              )[];
          }
          • OptionalformUI?: FormUIType

            Default value:

            formUI = "standard_ui"
            
          • Optionalmandatory?: (
                | SomeOtherString
                | keyof FullSchema<T>
                | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
            )[]

            Default value:

            mandatory = []
            
          • OptionalnotMandatory?: (
                | SomeOtherString
                | keyof FullSchema<T>
                | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
            )[]

            Default value:

            notMandatory = []
            
          • OptionalnotReadOnly?: (
                | SomeOtherString
                | keyof FullSchema<T>
                | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
            )[]

            Default value:

            notReadOnly = []
            
          • OptionalnotVisible?: (
                | SomeOtherString
                | keyof FullSchema<T>
                | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
            )[]

            Default value:

            notVisible = []
            
          • OptionalreadOnly?: (
                | SomeOtherString
                | keyof FullSchema<T>
                | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
            )[]

            Default value:

            readOnly = []
            
          • table: T
          • Optionalvisible?: (
                | SomeOtherString
                | keyof FullSchema<T>
                | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
            )[]

            Default value:

            visible = []
            

        Returns void

    • fieldValueValidation: function
      • Validates field values on the current form. Use the Form UI field to specify testing in the standard platform UI or workspace UI.

        In order to use this step you must have already opened a form using either the "Open a New Form" or "Open an Existing Record" steps. It is recommended to not run this step directly after a "Submit a Form" or "Click a UI Action" step.

        Several conditions can be applied to the same field, if desired.

        This step can be used in any order with the "Set Field Values", "Field State Validation", and "UI Action Visibility" steps.

        Default values:

        formUI = "standard_ui"
        

        Type Parameters

        • T extends keyof Tables

        Parameters

        • inputs: { conditions: string; formUI?: FormUIType; table: T }
          • conditions: string
          • OptionalformUI?: FormUIType

            Default value:

            formUI = "standard_ui"
            
          • table: T

        Returns void

    • openExistingRecord: function
      • Opens an existing record it the selected table and Form UI.

        Use the Form UI field to specify testing in the standard platform UI or workspace UI.

        Optionally, you can specify the form’s view name. Keep in mind that this can only be done for users that have access to that view.

        Default values:

        formUI = "standard_ui"
        view = ""
        selectedTabIndex = 1

        Type Parameters

        • T extends keyof Tables

        Parameters

        • inputs: {
              formUI?: FormUIType;
              recordId: string | Record;
              recordPath?: string;
              selectedTabIndex?: number;
              table: T;
              view?: string;
          }
          • OptionalformUI?: FormUIType

            Default value:

            formUI = "standard_ui"
            
          • recordId: string | Record
          • OptionalrecordPath?: string
          • OptionalselectedTabIndex?: number

            Default value:

            selectedTabIndex = 1
            
          • table: T
          • Optionalview?: string

            Default value:

            view = ""
            

        Returns void

    • openNewForm: function
      • Opens a new form for the selected table and Form UI.

        Use the Form UI field to specify testing in the standard platform UI or workspace UI.

        Optionally, you can specify the form’s view name. Keep in mind that this can only be done for users that have access to that view.

        Default values:

        formUI = "standard_ui"
        view = ""

        Type Parameters

        • T extends keyof Tables

        Parameters

        • inputs: { formUI?: FormUIType; recordPath?: string; table: T; view?: string }
          • OptionalformUI?: FormUIType

            Default value:

            formUI = "standard_ui"
            
          • OptionalrecordPath?: string
          • table: T
          • Optionalview?: string

            Default value:

            view = ""
            

        Returns void

    • setFieldValue: function
      • Sets field values on the current form.

        Use the Form UI field to specify testing in the standard platform UI or workspace UI.

        In order to use this step you must have already opened a form using either the "Open a New Form" or "Open an Existing Record" steps. It is recommended to not run this step directly after a "Submit a Form" or "Click a UI Action" step.

        This step can be used in any order with the "Field Value Validation", "Field State Validation" and "UI Action Visibility" steps.

        Default values:

        formUI = "standard_ui"
        

        Type Parameters

        • T extends keyof Tables

        Parameters

        • inputs: { fieldValues: Partial<Data<T>>; formUI?: FormUIType; table: T }
          • fieldValues: Partial<Data<T>>
          • OptionalformUI?: FormUIType

            Default value:

            formUI = "standard_ui"
            
          • table: T

        Returns void

    • submitForm: function
      • Submits the current form.

        Use the Form UI field to specify testing in the standard platform UI or workspace UI.

        In order to use this step you must have already opened a form using either the "Open a New Form" or "Open an Existing Record" steps. After this step, you may no longer use any form steps on the currently opened form as this step will close it.

        Outputs the table and sys_id of the submitted record.

        Default values:

        formUI = "standard_ui"
        assert = ""

        Parameters

        • inputs: { assert?: AssertType; formUI?: FormUIType }
          • Optionalassert?: AssertType

            Default value:

            assert = ""
            
          • OptionalformUI?: FormUIType

            Default value:

            formUI = "standard_ui"
            

        Returns { record_id: string; table: keyof Tables }

    • uiActionVisibility: function
      • Validates whether a UI Action is visible on the current form.

        You can assert that any number of UI Actions are either visible or not visible.

        The default visible UI Actions can vary depending on the currently impersonated user.

        Default values:

        formUI = "standard_ui"
        

        Type Parameters

        • T extends keyof Tables

        Parameters

        • inputs: {
              formUI?: FormUIType;
              notVisible?: (string | Record<"sys_ui_action">)[];
              table: T;
              visible?: (string | Record<"sys_ui_action">)[];
          }
          • OptionalformUI?: FormUIType

            Default value:

            formUI = "standard_ui"
            
          • OptionalnotVisible?: (string | Record<"sys_ui_action">)[]

            Default value:

            notVisible = []
            
          • table: T
          • Optionalvisible?: (string | Record<"sys_ui_action">)[]

            Default value:

            visible = []
            

        Returns void

    form_SP: {
        addAttachmentsToForm(): void;
        clickUIAction<T extends keyof Tables>(
            inputs: {
                assert: AssertClickUIActionSP;
                table: T;
                uiAction: string | Record<"sys_ui_action">;
            },
        ): { record_id: string; table: T };
        fieldStateValidation<T extends keyof Tables>(
            inputs: {
                mandatory?: (
                    | keyof FullSchema<T>
                    | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                    | SomeOtherString
                )[];
                notMandatory?: (
                    | keyof FullSchema<T>
                    | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                    | SomeOtherString
                )[];
                notReadOnly?: (
                    | keyof FullSchema<T>
                    | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                    | SomeOtherString
                )[];
                notVisible?: (
                    | keyof FullSchema<T>
                    | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                    | SomeOtherString
                )[];
                readOnly?: (
                    | keyof FullSchema<T>
                    | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                    | SomeOtherString
                )[];
                table: T;
                visible?: (
                    | keyof FullSchema<T>
                    | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                    | SomeOtherString
                )[];
            },
        ): void;
        fieldValueValidation<T extends keyof Tables>(
            inputs: { conditions: string; table: T },
        ): void;
        openNewForm<T extends keyof Tables>(
            inputs: {
                page?: string | Record<"sp_page">;
                paramID?: string | Record<T>;
                portal?: string | Record<"sp_portal">;
                queryParameters?: QueryParam;
                table: T;
                view?: string;
            },
        ): void;
        openServicePortalPage(
            inputs: {
                page: string | Record<"sp_page">;
                portal: string | Record<"sp_portal">;
                queryParameters?: QueryParam;
            },
        ): void;
        setFieldValue<T extends keyof Tables>(
            inputs: { fieldValues: Partial<Data<T>>; table: T },
        ): void;
        submitForm(
            inputs: { assert: AssertSubmitFormSP },
        ): { record_id: string; table: keyof Tables };
        uiActionVisibilityValidation<T extends keyof Tables>(
            inputs: {
                notVisible?: (string | Record<"sys_ui_action">)[];
                table: T;
                visible?: (string | Record<"sys_ui_action">)[];
            },
        ): void;
    }

    Forms in Service Portal

    Type Declaration

    • addAttachmentsToForm: function
      • Adds attachments to the current form in portal. At least one attachment is required. In order to use this step you must have already opened a form using the "Open a Form(SP)" or "Open Service Portal Page" steps. This step also cannot be used after a "Submit Form" step or "Click a UI Action" step has been used.

        Returns void

    • clickUIAction: function
      • Clicks a UI Action on the current form.

        In order to use this step you must have already opened a form using either the "Open a Page (SP)" step. After this step, you may no longer use any form steps on the currently opened form as it is expected that this step will close it or move to a different page.

        Outputs the table and sys_id of the record on which the action was clicked.

        Type Parameters

        • T extends keyof Tables

        Parameters

        • inputs: {
              assert: AssertClickUIActionSP;
              table: T;
              uiAction: string | Record<"sys_ui_action">;
          }

        Returns { record_id: string; table: T }

    • fieldStateValidation: function
      • Validates states of fields on a form within a Service Portal page.

        The field states can be one (or more) of mandatory, not mandatory, read only, not read only, visible and not visible.

        When a timeout is specified, the Client Test Runner will check the validation conditions every second until the timeout has been reached or the conditions are met.

        When a timeout is exceeded or one of the validations is not correct the step will fail.

        Default values:

        visible = []
        notVisible = []
        mandatory = []
        notMandatory = []
        readOnly = []
        notReadOnly = []

        Type Parameters

        • T extends keyof Tables

        Parameters

        • inputs: {
              mandatory?: (
                  | keyof FullSchema<T>
                  | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                  | SomeOtherString
              )[];
              notMandatory?: (
                  | keyof FullSchema<T>
                  | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                  | SomeOtherString
              )[];
              notReadOnly?: (
                  | keyof FullSchema<T>
                  | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                  | SomeOtherString
              )[];
              notVisible?: (
                  | keyof FullSchema<T>
                  | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                  | SomeOtherString
              )[];
              readOnly?: (
                  | keyof FullSchema<T>
                  | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                  | SomeOtherString
              )[];
              table: T;
              visible?: (
                  | keyof FullSchema<T>
                  | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                  | SomeOtherString
              )[];
          }
          • Optionalmandatory?: (
                | keyof FullSchema<T>
                | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                | SomeOtherString
            )[]

            Default value:

            mandatory = []
            
          • OptionalnotMandatory?: (
                | keyof FullSchema<T>
                | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                | SomeOtherString
            )[]

            Default value:

            notMandatory = []
            
          • OptionalnotReadOnly?: (
                | keyof FullSchema<T>
                | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                | SomeOtherString
            )[]

            Default value:

            notReadOnly = []
            
          • OptionalnotVisible?: (
                | keyof FullSchema<T>
                | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                | SomeOtherString
            )[]

            Default value:

            notVisible = []
            
          • OptionalreadOnly?: (
                | keyof FullSchema<T>
                | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                | SomeOtherString
            )[]

            Default value:

            readOnly = []
            
          • table: T
          • Optionalvisible?: (
                | keyof FullSchema<T>
                | keyof FilterIn<FullSchema<T>, { mandatory: true }, "normal">
                | SomeOtherString
            )[]

            Default value:

            visible = []
            

        Returns void

    • fieldValueValidation: function
      • Validates field values on the current form.

        In order to use this step you must have already opened a page using "Open a Page (SP)". This step also cannot be used after a "Submit Form (SP)" step or "Click a UI Action (SP)" step has been used.

        Several conditions can be applied to the same field, if desired.

        This step can be used in any order with the "Set Field Values (SP)", "Field State Validation (SP)", and "UI Action Visibility (SP)" steps.

        Type Parameters

        • T extends keyof Tables

        Parameters

        • inputs: { conditions: string; table: T }

        Returns void

    • openNewForm: function
      • Define a Service Portal form and portal to open it in.

        URL parameters to use are table, sys_id and view. The table parameter will open the form view of the specified table. The sys_id parameter will open a new record when no sys_id value is entered and open an existing record when a value is provided. "Default" view is used when no view parameter is specified.

        Default values:

        portal = "81b75d3147032100ba13a5554ee4902b"
        page = "form"
        view = ""
        queryParameters = {}

        Type Parameters

        • T extends keyof Tables

        Parameters

        • inputs: {
              page?: string | Record<"sp_page">;
              paramID?: string | Record<T>;
              portal?: string | Record<"sp_portal">;
              queryParameters?: QueryParam;
              table: T;
              view?: string;
          }
          • Optionalpage?: string | Record<"sp_page">

            Default value:

            page = "form"
            
          • OptionalparamID?: string | Record<T>
          • Optionalportal?: string | Record<"sp_portal">

            Default value:

            portal = "81b75d3147032100ba13a5554ee4902b"
            
          • OptionalqueryParameters?: QueryParam

            Default value:

            queryParameters = {}
            
          • table: T
          • Optionalview?: string

            Default value:

            view = ""
            

        Returns void

    • openServicePortalPage: function
      • Opens a Service Portal page

        Additional Considerations

        Provide any URL parameters required for the page.

        After this step, you will be able to interact with the widgets available on the page.

        Default values:

        queryParameters = {}
        

        Parameters

        • inputs: {
              page: string | Record<"sp_page">;
              portal: string | Record<"sp_portal">;
              queryParameters?: QueryParam;
          }
          • page: string | Record<"sp_page">
          • portal: string | Record<"sp_portal">
          • OptionalqueryParameters?: QueryParam

            Default value:

            queryParameters = {}
            

        Returns void

    • setFieldValue: function
      • In order to use this step you must have already opened a page using the "Open a Page (SP)" steps.

        This step can be used in any order with the "Field Value Validation (SP)", "Field State Validation (SP)" and "UI Action Visibility (SP)" steps.

        This step cannot be used after a "Submit Form (SP)" step or "Click a UI Action (SP)".

        Type Parameters

        • T extends keyof Tables

        Parameters

        • inputs: { fieldValues: Partial<Data<T>>; table: T }

        Returns void

    • submitForm: function
      • Submits the current form on a Service Portal page.

        In order to use this step you must have already opened a page using "Open a Page (SP)" step. After this step, you may no longer use any test steps on the currently opened form as this step will close it.

        Outputs the table and sys_id of the submitted record.

        Parameters

        • inputs: { assert: AssertSubmitFormSP }

        Returns { record_id: string; table: keyof Tables }

    • uiActionVisibilityValidation: function
      • Validates whether a UI Action is visible or not on the current form.

        You can assert that any number of UI Actions are either visible or invisible.

        Service Portal only supports Server UI Actions. The setRedirectURL() method and 'Client' UI Actions are not supported. The default visible UI Actions can vary depending on the currently impersonated user.

        Default values:

        visible = []
        notVisible = []

        Type Parameters

        • T extends keyof Tables

        Parameters

        • inputs: {
              notVisible?: (string | Record<"sys_ui_action">)[];
              table: T;
              visible?: (string | Record<"sys_ui_action">)[];
          }
          • OptionalnotVisible?: (string | Record<"sys_ui_action">)[]

            Default value:

            notVisible = []
            
          • table: T
          • Optionalvisible?: (string | Record<"sys_ui_action">)[]

            Default value:

            visible = []
            

        Returns void

    reporting: {
        reportVisibility(
            inputs: {
                assert?: AssertReportVisibilityType;
                report: string | Record<"sys_report">;
            },
        ): void;
    }

    Reporting

    Type Declaration

    • reportVisibility: function
      • Confirm a report can or cannot be viewed by the test user

        Default values:

        assert = "can_view_report"
        

        Parameters

        • inputs: { assert?: AssertReportVisibilityType; report: string | Record<"sys_report"> }
          • Optionalassert?: AssertReportVisibilityType

            Default value:

            assert = "can_view_report"
            
          • report: string | Record<"sys_report">

        Returns void

    responsiveDashboard: {
        responsiveDashboardSharing(
            inputs: {
                assert?: DashboardSharingAssertType;
                dashboard: string | Record<"pa_dashboards">;
            },
        ): void;
        responsiveDashboardVisibility(
            inputs: {
                assert?: AssertResponsiveDashboardType;
                dashboard: string | Record<"pa_dashboards">;
            },
        ): void;
    }

    Responsive Dashboards

    Type Declaration

    • responsiveDashboardSharing: function
      • Confirm a dashboard can or cannot be shared by the test user

        Default values:

        assert = "can_share_dashboard"
        

        Parameters

        • inputs: {
              assert?: DashboardSharingAssertType;
              dashboard: string | Record<"pa_dashboards">;
          }
          • Optionalassert?: DashboardSharingAssertType

            Default value:

            assert = "can_share_dashboard"
            
          • dashboard: string | Record<"pa_dashboards">

        Returns void

    • responsiveDashboardVisibility: function
      • Confirm a dashboard is or is not visible to the test user

        Default values:

        assert = "dashboard_is_visible"
        

        Parameters

        • inputs: {
              assert?: AssertResponsiveDashboardType;
              dashboard: string | Record<"pa_dashboards">;
          }
          • Optionalassert?: AssertResponsiveDashboardType

            Default value:

            assert = "dashboard_is_visible"
            
          • dashboard: string | Record<"pa_dashboards">

        Returns void

    rest: {
        assertJsonResponsePayloadElement(
            inputs: {
                elementName: string;
                elementValue: string;
                operation?: AssertResponseOperationType;
            },
        ): void;
        assertResponseHeader(
            inputs: {
                headerName: string;
                headerValue: string;
                operation?: AssertResponseHeader;
            },
        ): void;
        assertResponseJSONPayloadIsValid(inputs: object): void;
        assertResponsePayload(
            inputs: { operation?: AssertResponsePayload; responseBody: string },
        ): void;
        assertResponseTime(
            inputs: {
                operation?: ResponseConditionOperationType;
                responseTime: number;
            },
        ): void;
        assertResponseXMLPayloadIsWellFormed(inputs: object): void;
        assertStatusCode(
            inputs: { operation?: RestStatusOperationType; statusCode: number },
        ): void;
        assertStatusCodeName(
            inputs: { codeName: string; operation?: ResponseOperationValueType },
        ): void;
        assertXMLResponsePayloadElement(
            inputs: {
                elementPath: string;
                elementValue: string;
                operation?: ResponseValueOperationType;
            },
        ): void;
        sendRestRequest(
            inputs: {
                auth?: AuthType;
                basicAuthentication?: string | Record<"sys_auth_profile_basic">;
                body?: string;
                headers?: QueryParam;
                method?: HTTPMethodType;
                mutualAuth?: string | Record<"sys_certificate">;
                path: string;
                queryParameters?: QueryParam;
            },
        ): void;
    }

    REST

    Type Declaration

    • assertJsonResponsePayloadElement: function
      • Assert the JSON response payload element. Specify the JSON SNC path and select the comparison operation to use against the supplied expected element value.

        Default values:

        operation = "exists"
        

        Parameters

        • inputs: {
              elementName: string;
              elementValue: string;
              operation?: AssertResponseOperationType;
          }
          • elementName: string
          • elementValue: string
          • Optionaloperation?: AssertResponseOperationType

            Default value:

            operation = "exists"
            

        Returns void

    • assertResponseHeader: function
      • Assert an HTTP response header. Select the comparison operation and specify the expected value of the header.

        Default values:

        operation = "exists"
        

        Parameters

        • inputs: { headerName: string; headerValue: string; operation?: AssertResponseHeader }
          • headerName: string
          • headerValue: string
          • Optionaloperation?: AssertResponseHeader

            Default value:

            operation = "exists"
            

        Returns void

    • assertResponseJSONPayloadIsValid: function
      • Assert the JSON response payload is valid.

        Parameters

        • inputs: object

        Returns void

    • assertResponsePayload: function
      • Assert the HTTP response payload is equals to or contains a specified value. Select the comparison operation and specify the expected value of the response payload.

        Default values:

        operation = "contains"
        

        Parameters

        • inputs: { operation?: AssertResponsePayload; responseBody: string }
          • Optionaloperation?: AssertResponsePayload

            Default value:

            operation = "contains"
            
          • responseBody: string

        Returns void

    • assertResponseTime: function
      • Assert the HTTP response time is less than or greater than a specified value. Select the comparison operation and specify the expected value of the response time.

        The response time is specified in milliseconds

        Default values:

        operation = "less_than"
        

        Parameters

        • inputs: { operation?: ResponseConditionOperationType; responseTime: number }
          • Optionaloperation?: ResponseConditionOperationType

            Default value:

            operation = "less_than"
            
          • responseTime: number

        Returns void

    • assertResponseXMLPayloadIsWellFormed: function
      • Assert the XML response payload is a well-formed.

        Parameters

        • inputs: object

        Returns void

    • assertStatusCode: function
      • Assert the HTTP response status code. Select the comparison operation and specify the numeric value of the expected status code.

        Default values:

        operation = "equals"
        

        Parameters

        • inputs: { operation?: RestStatusOperationType; statusCode: number }
          • Optionaloperation?: RestStatusOperationType

            Default value:

            operation = "equals"
            
          • statusCode: number

        Returns void

    • assertStatusCodeName: function
      • Assert the HTTP response status code name is equals to or contains a specified value. Select the comparison operation and specify the expected value of the status code name.

        Default values:

        operation = "contains"
        

        Parameters

        • inputs: { codeName: string; operation?: ResponseOperationValueType }
          • codeName: string
          • Optionaloperation?: ResponseOperationValueType

            Default value:

            operation = "contains"
            

        Returns void

    • assertXMLResponsePayloadElement: function
      • Assert the XML response payload element. Specify the XML XPath and select the comparison operation to use against the supplied expected element value.

        Default values:

        operation = "exists"
        

        Parameters

        • inputs: {
              elementPath: string;
              elementValue: string;
              operation?: ResponseValueOperationType;
          }
          • elementPath: string
          • elementValue: string
          • Optionaloperation?: ResponseValueOperationType

            Default value:

            operation = "exists"
            

        Returns void

    • sendRestRequest: function
      • Send a REST request to the current instance. Specify an HTTP method, path, query parameters, request headers and body if needed.

        Default values:

        auth = "basic"
        mutualAuth = ""
        basicAuthentication = ""
        method = "get"
        queryParameters = {}
        headers = {}

        Parameters

        • inputs: {
              auth?: AuthType;
              basicAuthentication?: string | Record<"sys_auth_profile_basic">;
              body?: string;
              headers?: QueryParam;
              method?: HTTPMethodType;
              mutualAuth?: string | Record<"sys_certificate">;
              path: string;
              queryParameters?: QueryParam;
          }
          • Optionalauth?: AuthType

            Default value:

            auth = "basic"
            
          • OptionalbasicAuthentication?: string | Record<"sys_auth_profile_basic">

            Default value:

            basicAuthentication = ""
            
          • Optionalbody?: string
          • Optionalheaders?: QueryParam

            Default value:

            headers = {}
            
          • Optionalmethod?: HTTPMethodType

            Default value:

            method = "get"
            
          • OptionalmutualAuth?: string | Record<"sys_certificate">

            Default value:

            mutualAuth = ""
            
          • path: string
          • OptionalqueryParameters?: QueryParam

            Default value:

            queryParameters = {}
            

        Returns void

    server: {
        addAttachmentsToExistingRecord(
            inputs: { recordId: string; table: string },
        ): void;
        checkoutShoppingCart(
            inputs: {
                assert?: AssertCartType;
                deliveryAddress: string;
                requestedFor: string | Record<"sys_user">;
                specialInstructions: string;
            },
        ): { request_id: string };
        createUser(
            inputs: {
                fieldValues?: Partial<Data<"sys_user">>;
                firstName?: string;
                groups?: (string | Record<"sys_user_group">)[];
                impersonate?: boolean;
                lastName?: string;
                roles?: (string | Role)[];
                table?: string;
            },
        ): { user: any };
        impersonate(inputs: { user: string | Record<"sys_user"> }): { user: any };
        log(inputs: { log: string }): void;
        recordDelete<T extends keyof Tables>(
            inputs: {
                assert?: RecordDeleteAssertType;
                enforceSecurity?: boolean;
                recordId: string | Record<T>;
                table: T;
            },
        ): void;
        recordInsert<T extends keyof Tables>(
            inputs: {
                assert?: AssertInsert;
                enforceSecurity?: boolean;
                fieldValues: Partial<Data<T>>;
                table: T;
            },
        ): { record_id: string; table: keyof Tables };
        recordQuery<T extends keyof Tables>(
            inputs: {
                assert?: AssertQueryType;
                enforceSecurity?: boolean;
                fieldValues: string;
                table: T;
            },
        ): { first_record: string; table: T };
        recordUpdate<T extends keyof Tables>(
            inputs: {
                assert?: AssertUpdateType;
                enforceSecurity?: boolean;
                fieldValues: Partial<Data<T>>;
                recordId: string | Record<T>;
                table: T;
            },
        ): void;
        recordValidation<T extends keyof Tables>(
            inputs: {
                assert?: AssertRecordValidationType;
                enforceSecurity?: boolean;
                fieldValues: string;
                recordId: string | Record;
                table: T;
            },
        ): void;
        replayRequestItem(
            inputs: { request_item: string | Record<"sc_req_item"> },
        ): { reqItem: any; table: keyof Tables };
        runServerSideScript(
            inputs: { jasmineVersion?: string; script?: string },
        ): { record_id: string; table: keyof Tables };
        searchForCatalogItem(
            inputs: {
                assert?: AssertCatalogItem;
                assertItem: string | Record<"sc_cat_item">;
                catalog: string | Record<"sc_catalog">;
                category: string | Record<"sc_category">;
                searchInPortal?: boolean;
                searchTerm: string;
            },
        ): { catalog_item_id: string };
        setOutputVariables(): void;
    }

    Server

    Type Declaration

    • addAttachmentsToExistingRecord: function
      • Adds attachments to the specified record. At least one attachment is required. This step is only executed on the server and has no UI associated with it. If it is intended to be used with "Open a New Form" or "Open an Existing Record" steps, then "Add Attachments to Form" should be used instead. The specified record must exist prior to this step running. If adding attachments to a form that has not been submitted yet, use "Add Attachments to Form" instead.

        Parameters

        • inputs: { recordId: string; table: string }

        Returns void

    • checkoutShoppingCart: function
      • Checkout the Shopping Cart and generates a new request.

        Default values:

        assert = "checkout_successfull"
        

        Parameters

        • inputs: {
              assert?: AssertCartType;
              deliveryAddress: string;
              requestedFor: string | Record<"sys_user">;
              specialInstructions: string;
          }
          • Optionalassert?: AssertCartType

            Default value:

            assert = "checkout_successfull"
            
          • deliveryAddress: string
          • requestedFor: string | Record<"sys_user">
          • specialInstructions: string

        Returns { request_id: string }

    • createUser: function
      • Create a user with specified roles and groups. Optionally impersonate the user in the current session for the duration of the test or until another user is impersonated.

        Default values:

        fieldValues = {}
        firstName = ""
        lastName = ""
        groups = []
        roles = []
        impersonate = true

        Parameters

        • inputs: {
              fieldValues?: Partial<Data<"sys_user">>;
              firstName?: string;
              groups?: (string | Record<"sys_user_group">)[];
              impersonate?: boolean;
              lastName?: string;
              roles?: (string | Role)[];
              table?: string;
          }
          • OptionalfieldValues?: Partial<Data<"sys_user">>

            Default value:

            fieldValues = {}
            
          • OptionalfirstName?: string

            Default value:

            firstName = ""
            
          • Optionalgroups?: (string | Record<"sys_user_group">)[]

            Default value:

            groups = []
            
          • Optionalimpersonate?: boolean

            Default value:

            impersonate = true
            
          • OptionallastName?: string

            Default value:

            lastName = ""
            
          • Optionalroles?: (string | Role)[]

            Default value:

            roles = []
            
          • Optionaltable?: string

        Returns { user: any }

    • impersonate: function
      • Impersonates the specified user in the current session for the duration of the test or until another user is impersonated.

        The user specified in the "User" field will be outputted for use later in the test.

        Parameters

        • inputs: { user: string | Record<"sys_user"> }

        Returns { user: any }

    • log: function
      • Logs a message that can contain a variable or other information pertaining to the test. This message will be stored as a step result upon test completion.

        Parameters

        • inputs: { log: string }

        Returns void

    • recordDelete: function
      • Deletes a record in a table.

        Default values:

        assert = "record_successfully_deleted"
        enforceSecurity = true

        Type Parameters

        • T extends keyof Tables

        Parameters

        • inputs: {
              assert?: RecordDeleteAssertType;
              enforceSecurity?: boolean;
              recordId: string | Record<T>;
              table: T;
          }
          • Optionalassert?: RecordDeleteAssertType

            Default value:

            assert = "record_successfully_deleted"
            
          • OptionalenforceSecurity?: boolean

            Default value:

            enforceSecurity = true
            
          • recordId: string | Record<T>
          • table: T

        Returns void

    • recordInsert: function
      • Inserts a record into a table. Specify the field values to set on the new record.

        Default values:

        assert = "record_successfully_inserted"
        enforceSecurity = true

        Type Parameters

        • T extends keyof Tables

        Parameters

        • inputs: {
              assert?: AssertInsert;
              enforceSecurity?: boolean;
              fieldValues: Partial<Data<T>>;
              table: T;
          }
          • Optionalassert?: AssertInsert

            Default value:

            assert = "record_successfully_inserted"
            
          • OptionalenforceSecurity?: boolean

            Default value:

            enforceSecurity = true
            
          • fieldValues: Partial<Data<T>>
          • table: T

        Returns { record_id: string; table: keyof Tables }

    • recordQuery: function
      • Perform a database query to verify if a record matching the conditions set in this step are met.

        Default values:

        assert = "records_match_query"
        enforceSecurity = false

        Type Parameters

        • T extends keyof Tables

        Parameters

        • inputs: {
              assert?: AssertQueryType;
              enforceSecurity?: boolean;
              fieldValues: string;
              table: T;
          }
          • Optionalassert?: AssertQueryType

            Default value:

            assert = "records_match_query"
            
          • OptionalenforceSecurity?: boolean

            Default value:

            enforceSecurity = false
            
          • fieldValues: string
          • table: T

        Returns { first_record: string; table: T }

    • recordUpdate: function
      • Changes field values on a record on the server.

        It is strongly advised to follow this step with a "Record Validation" step to ensure that the changes were applied.

        Default values:

        assert = "record_successfully_updated"
        enforceSecurity = true

        Type Parameters

        • T extends keyof Tables

        Parameters

        • inputs: {
              assert?: AssertUpdateType;
              enforceSecurity?: boolean;
              fieldValues: Partial<Data<T>>;
              recordId: string | Record<T>;
              table: T;
          }
          • Optionalassert?: AssertUpdateType

            Default value:

            assert = "record_successfully_updated"
            
          • OptionalenforceSecurity?: boolean

            Default value:

            enforceSecurity = true
            
          • fieldValues: Partial<Data<T>>
          • recordId: string | Record<T>
          • table: T

        Returns void

    • recordValidation: function
      • Validates that a record meets the specified conditions on the server-side.

        Several conditions can be applied to the same field, if desired.

        Default values:

        assert = "record_validated"
        enforceSecurity = true

        Type Parameters

        • T extends keyof Tables

        Parameters

        • inputs: {
              assert?: AssertRecordValidationType;
              enforceSecurity?: boolean;
              fieldValues: string;
              recordId: string | Record;
              table: T;
          }
          • Optionalassert?: AssertRecordValidationType

            Default value:

            assert = "record_validated"
            
          • OptionalenforceSecurity?: boolean

            Default value:

            enforceSecurity = true
            
          • fieldValues: string
          • recordId: string | Record
          • table: T

        Returns void

    • replayRequestItem: function
      • Replays a previously created request item with the same values and options.

        Parameters

        • inputs: { request_item: string | Record<"sc_req_item"> }

        Returns { reqItem: any; table: keyof Tables }

    • runServerSideScript: function
      • Runs a script on the server. Typically used to run Jasmine tests.

        Parameters

        • inputs: { jasmineVersion?: string; script?: string }
          • OptionaljasmineVersion?: string

            Version of Jasmine to use. Currently, only 3.1 is supported

          • Optionalscript?: string

            Script to run server-side

        Returns { record_id: string; table: keyof Tables }

    • searchForCatalogItem: function
      • Perform search for a Catalog Item or Record Producer in the specified Catalog and Category

        Default values:

        assert = "assert_item_present"
        searchInPortal = false

        Parameters

        • inputs: {
              assert?: AssertCatalogItem;
              assertItem: string | Record<"sc_cat_item">;
              catalog: string | Record<"sc_catalog">;
              category: string | Record<"sc_category">;
              searchInPortal?: boolean;
              searchTerm: string;
          }
          • Optionalassert?: AssertCatalogItem

            Default value:

            assert = "assert_item_present"
            
          • assertItem: string | Record<"sc_cat_item">
          • catalog: string | Record<"sc_catalog">
          • category: string | Record<"sc_category">
          • OptionalsearchInPortal?: boolean

            Default value:

            searchInPortal = false
            
          • searchTerm: string

        Returns { catalog_item_id: string }

    • setOutputVariables: function
      • Sets the output variables for the current reusable test. Reusable output variables can be created in the reusable test form and populated with values in this step

        Returns void