Skip to content
EDT-Bridge
English
Esc
↑↓navigate↵open⌘Jpreview
On this page

Scenario examples

Two test-form scenarios: an external report, and an installed extension with values checked after reopening.

Check an external report

The following example assumes a prepared report with internal field names StartDate, EndDate, and Result, and the Russian captions shown below. Replace the names, titles, and expected rows with those of your report and fixture. Save this as /srv/scenarios/shipments.json:

{
  "version": 1,
  "steps": [
    {"action": "input", "field": "StartDate", "text": "01.11.2026"},
    {"action": "input", "field": "EndDate", "text": "30.11.2026"},
    {"action": "click", "button": "Сформировать"},
    {"action": "assert_table_size", "field": "Result", "rows": 2, "columns": 7},
    {"action": "assert_cell", "field": "Result", "cell": "R2C6", "equals": "100,00"},
    {
      "action": "assert_table",
      "field": "Result",
      "equals": [
        ["Дата отгрузки", "Номер", "Дата заказа", "Организация", "Контрагент", "Сумма", "Валюта"],
        ["05.11.2026", "000001", "04.11.2026", "Тестовая организация", "Тестовый покупатель", "100,00", "RUB"]
      ]
    }
  ]
}
edt-bridge-mcp test-form \
  --platform-bin /opt/1cv8/x86_64/8.5.1.1529 \
  --test-infobase /srv/test-bases/orders --scope fixture \
  --erf /srv/artifacts/PlannedShipments.erf \
  --form ExternalReport.PlannedShipments.Form.Main \
  --form-title 'Плановые отгрузки' --user Tester \
  --scenario /srv/scenarios/shipments.json \
  --output-dir /srv/results/shipments-01 --timeout 300

assert_table compares actual cell text and row order. Neither clicking “Сформировать” nor observing a completion message substitutes for checking the report contents.

Check an installed extension and saved values

Prepare the document, install the extension, and record the fixture’s original values. The example below expects a warning when the planned shipment precedes the order date, then checks the saved dates in another session. Save it as /srv/scenarios/order.json:

{
  "version": 1,
  "steps": [
    {"action": "assert_field", "field": "OrderDate", "equals": "06.11.2026 12:00:00"},
    {"action": "input", "field": "PlannedShipmentDate", "text": "05.11.2026"},
    {"action": "click", "button": "Записать"},
    {"action": "assert_messages", "text": "Плановая дата отгрузки раньше даты заказа.", "count": 1},
    {"action": "assert_field", "field": "PlannedShipmentDate", "equals": "05.11.2026"}
  ],
  "reopen": [
    {"action": "assert_field", "field": "OrderDate", "equals": "06.11.2026 12:00:00"},
    {"action": "assert_field", "field": "PlannedShipmentDate", "equals": "05.11.2026"}
  ]
}
edt-bridge-mcp test-form \
  --platform-bin /opt/1cv8/x86_64/8.5.1.1529 \
  --test-infobase /srv/test-bases/orders --scope application \
  --navigation-link 'e1cib/data/Document.CustomerOrder?ref=0123456789abcdef0123456789abcdef' \
  --form Document.CustomerOrder.Form.Main \
  --form-title 'Заказ покупателя 000001' --user Tester \
  --scenario /srv/scenarios/order.json \
  --output-dir /srv/results/order-01 --timeout 300

reopen starts a new TestClient and TestManager session for the same infobase, user, and target after the first phase ends. It permits only assert_field, assert_cell, assert_table, and assert_table_size. It does not reuse the edited form or save it on behalf of the scenario. Opening a form still runs its application handlers.

To check a native refusal to save, use a fixture that triggers the configuration’s own validation. Attempt a change, assert the native refusal message, and expect the original persisted values in reopen. Include a value that was actually changed in the first phase so that a missing save cannot look like a successful update. A field assertion in the first phase observes the open form and does not prove persistence. For cases that must not add the extension warning, use a separate run with assert_messages and count: 0.

If refusal opens the platform’s standard error dialog, add expect_error_dialog to the click step. Its value is the exact displayed message, for example:

{"action": "click", "button": "Save", "expect_error_dialog": "Could not save the order."}

The manager checks the ErrorInfo text of ErrorWindow before pressing its OK button. A different message fails the check and leaves the dialog open for the screenshot. The observed text and closing result are recorded. This option does not handle other dialogs or replace assertions on messages and persisted values.

To accept a warning in either the message panel or a warning window (ShowMessageBox), add expect_warning with the exact text:

{"action": "click", "button_name": "FormWrite", "expect_warning": "Check the shipment date."}

The manager checks for a new message with that text. If the click opens a warning window, the manager checks its text and closes it with OK before continuing. The assertion reports source: "message_panel" or source: "dialog". A missing or mismatched warning fails the step with assertion_failed. An unrelated dialog returns unexpected_dialog and stays open. Use either expect_error_dialog or expect_warning on a click.

Last updated on November 15, 2026

Was this page helpful?