Files
liqa/scenario-25-export.json
T
ars9 71bcc8faec feat(scenario): step output, getStepOutput helper, export/import MCP tools, doc restructure
- add output column to ScenarioRunStepEntity; exec step return value is JSON-serialised and stored
- expose helpers.getStepOutput(order) in exec code; negative order is relative to current step
- add get_scenario_run, wait_for_scenario_run, export_scenario, import_scenario MCP tools
- move Architecture, Key descriptors, MCP tools, Scenario, Development docs to docs/
- delete CONTRIBUTING.md (replaced by docs/development.md)
2026-04-08 19:02:36 +03:00

41 lines
2.4 KiB
JSON

{
"name": "Diia STG — Create certificate application (987825)",
"steps": [
{
"order": 0,
"type": "login",
"sessionName": "diia-stg-session",
"execCode": "{\"keyId\": \"3273334361\", \"environmentName\": \"liquio-diia-stg\"}",
"validateCode": null
},
{
"order": 1,
"type": "exec",
"sessionName": "diia-stg-session",
"execCode": "// Navigate to the tasks/services list for this user\nawait page.goto(\"https://cabinet-liquio-diia-stg.kitsoft.ua/tasks\", { waitUntil: \"networkidle\" });\nhelpers.log(\"URL: \" + page.url());\nhelpers.log(\"title: \" + await page.title());\n\nconst headings = await page.locator(\"h1, h2, h3\").allTextContents();\nhelpers.log(\"headings: \" + JSON.stringify(headings));\n\n// Find any links that look like task/service links\nconst links = await page.locator(\"a[href*=task], a[href*=service], a[href*=create]\").all();\nconst linkData = [];\nfor (const a of links.slice(0, 20)) {\n linkData.push({ href: await a.getAttribute(\"href\"), text: (await a.textContent()).trim().slice(0, 80) });\n}\nhelpers.log(\"task links: \" + JSON.stringify(linkData));\n\nconst bodyText = await page.locator(\"body\").innerText();\nhelpers.log(\"body (first 800): \" + bodyText.slice(0, 800));\n\nreturn page.url();\n",
"validateCode": null
},
{
"order": 2,
"type": "exec",
"sessionName": "diia-stg-session",
"execCode": "helpers.log(\"url=\" + page.url());\nconst btns = await page.locator(\"button\").all();\nconst labels = [];\nfor (const b of btns) { const t = (await b.textContent()) || \"\"; const vis = await b.isVisible(); if (vis) labels.push(t.trim()); }\nhelpers.log(\"visible buttons: \" + JSON.stringify(labels));\nreturn labels;",
"validateCode": null
},
{
"order": 3,
"type": "sign",
"sessionName": "diia-stg-session",
"execCode": "{\"keyId\": \"3273334361\"}",
"validateCode": null
},
{
"order": 4,
"type": "exec",
"sessionName": "diia-stg-session",
"execCode": "return page.url();",
"validateCode": "\nconst url = page.url();\nconst successEl = await page.locator('.success, [data-test=\"success\"], .task-success, .done-message').count();\nconst successText = /успішно|success|заяву подано|виконано/i.test(await page.locator('body').innerText());\nreturn {\n success: successEl > 0 || successText,\n description: `Final URL: ${url}`,\n};\n"
}
]
}