Praman — Agent-First SAP UI5 Test Automation Plugin - v1.2.0
    Preparing search index...

    Function hasPendingChanges

    • Ai

      Checks whether the UI5 OData model has unsaved (pending) changes.

      Parameters

      • page: ODataPage

        Playwright Page (or compatible subset).

      • Optionaloptions: ODataOptions

        OData options (modelName).

      Returns Promise<boolean>

      true if the model has pending changes, false otherwise.

      ui5.odata.hasPendingChanges

      Check if the OData model has unsaved changes (dirty state).

      Returns true if model.hasPendingChanges() is true, false otherwise (including when model is not found).

      Calls model.hasPendingChanges(). Useful to verify before navigating away or to assert that edits have been properly saved.

      sap.ui.model.odata.v2.ODataModel, sap.ui.model.odata.v4.ODataModel

      Detect unsaved changes before navigation to prevent data loss warnings.

      const dirty = await hasPendingChanges(page);
      if (dirty) {
      logger.warn('Model has unsaved changes');
      }