This commit is contained in:
2026-09-29 17:38:15 +05:30
parent 5ab89ce005
commit f0496b3d67
18 changed files with 49592 additions and 0 deletions
@@ -0,0 +1,430 @@
{
"schema_version": 2,
"diagram_type": "workflow",
"meta": {
"title": "PXIL Session + Trading Token Setup",
"subtitle": "Configuration-driven pytest/Selenium workflow",
"output": ".archify/workflow-pxil-session-token-20260929-160100/pxil-session-token.html",
"quality_profile": "showcase",
"animation": "none",
"repository": {
"url": "https://git.tejasshasane.xyz/tejasshasane/pxil-selenium-automation.git",
"revision": "5ab89ce0059525b31558a1fa82251a2a6f610dd7",
"link_mode": "local-only"
}
},
"lanes": [
{
"id": "config",
"label": "Configuration \u0026 selection"
},
{
"id": "pytest",
"label": "Pytest orchestration"
},
{
"id": "browser",
"label": "Browser automation"
},
{
"id": "portal",
"label": "Pratyay portal"
}
],
"phases": [
{
"id": "resolve",
"label": "Resolve run",
"fromCol": 0,
"toCol": 1
},
{
"id": "login",
"label": "Authenticate",
"fromCol": 2,
"toCol": 2,
"variant": "security"
},
{
"id": "setup",
"label": "Create session + tokens",
"fromCol": 3,
"toCol": 4,
"variant": "emphasis"
},
{
"id": "evidence",
"label": "Capture evidence",
"fromCol": 5,
"toCol": 5,
"variant": "dashed"
}
],
"groups": [
{
"id": "config_group",
"label": "Product and mode resolution",
"lane": "config",
"fromCol": 0,
"toCol": 1,
"variant": "dashed"
},
{
"id": "auth_group",
"label": "One browser login",
"lane": "browser",
"fromCol": 2,
"toCol": 2,
"variant": "security"
},
{
"id": "session_group",
"label": "Session creation gate",
"lane": "portal",
"fromCol": 3,
"toCol": 3,
"variant": "emphasis"
},
{
"id": "token_group",
"label": "Token creation loop",
"lane": "portal",
"fromCol": 4,
"toCol": 5,
"variant": "emphasis"
},
{
"id": "evidence_group",
"label": "Step artifacts",
"lane": "config",
"fromCol": 5,
"toCol": 5,
"variant": "dashed"
}
],
"mainPath": [
"pytest_start",
"load_config",
"parametrize",
"driver_login",
"token_dispatch",
"token_save",
"save_report"
],
"nodes": [
{
"id": "pytest_start",
"lane": "pytest",
"col": 0,
"type": "backend",
"label": "Pytest setup test",
"sublabel": "test_combined_setup.py",
"width": 150,
"sources": [
{
"path": "tests/setup/test_combined_setup.py",
"line": 11,
"end_line": 14
}
]
},
{
"id": "load_config",
"lane": "config",
"col": 1,
"type": "database",
"label": "Load config.json",
"sublabel": "products + setup flags",
"width": 150,
"sources": [
{
"path": "tests/config_reader.py",
"line": 6,
"end_line": 33
}
]
},
{
"id": "parametrize",
"lane": "config",
"col": 2,
"type": "backend",
"label": "get_setup_configs",
"sublabel": "combined / session / token",
"tag": "skip disabled",
"width": 150,
"sources": [
{
"path": "tests/config_reader.py",
"line": 36,
"end_line": 83
}
]
},
{
"id": "driver_login",
"lane": "browser",
"col": 2,
"type": "security",
"label": "Open + login",
"sublabel": "Chrome, credentials, CAPTCHA",
"tag": "manual CAPTCHA",
"width": 150,
"sources": [
{
"path": "tests/setup/test_combined_setup.py",
"line": 21,
"end_line": 29
},
{
"path": "tests/helpers.py",
"line": 60,
"end_line": 91
}
]
},
{
"id": "session_gate",
"lane": "pytest",
"col": 3,
"type": "security",
"label": "run_session?",
"sublabel": "product flag gate",
"width": 150,
"sources": [
{
"path": "tests/setup/test_combined_setup.py",
"line": 31,
"end_line": 32
}
]
},
{
"id": "session_create",
"lane": "portal",
"col": 3,
"type": "backend",
"label": "create_session",
"sublabel": "ME instance + dates -\u003e Save",
"width": 150,
"sources": [
{
"path": "tests/setup/sessions/test_session.py",
"line": 24,
"end_line": 40
}
]
},
{
"id": "token_loop",
"lane": "pytest",
"col": 4,
"type": "backend",
"label": "Product-code loop",
"sublabel": "one token per configured code",
"width": 150,
"sources": [
{
"path": "tests/setup/test_combined_setup.py",
"line": 34,
"end_line": 37
},
{
"path": "tests/setup/tokens/test_trading_token.py",
"line": 74,
"end_line": 83
}
]
},
{
"id": "token_dispatch",
"lane": "portal",
"col": 4,
"type": "backend",
"label": "run_token_setup",
"sublabel": "IDAS / RTM / UPC branch",
"width": 150,
"sources": [
{
"path": "tests/setup/tokens/test_trading_token.py",
"line": 254,
"end_line": 262
}
]
},
{
"id": "token_save",
"lane": "portal",
"col": 5,
"type": "backend",
"label": "Create + save token",
"sublabel": "dates, expiry, time sessions",
"width": 150,
"sources": [
{
"path": "tests/setup/tokens/test_trading_token.py",
"line": 264,
"end_line": 325
}
]
},
{
"id": "save_report",
"lane": "config",
"col": 5,
"type": "database",
"label": "Evidence + teardown",
"sublabel": "screenshots, backup, logout",
"width": 150,
"sources": [
{
"path": "tests/step_actions.py",
"line": 21,
"end_line": 40
},
{
"path": "tests/helpers.py",
"line": 135,
"end_line": 159
},
{
"path": "tests/setup/tokens/test_trading_token.py",
"line": 330,
"end_line": 342
}
]
},
{
"id": "session_skip",
"lane": "config",
"col": 3,
"type": "messagebus",
"label": "Skip session",
"sublabel": "run_session = false",
"width": 150,
"sources": [
{
"path": "tests/setup/test_combined_setup.py",
"line": 31,
"end_line": 32
}
]
},
{
"id": "pratyay_ui",
"lane": "portal",
"col": 2,
"type": "external",
"label": "Pratyay UI",
"sublabel": "Trading maintenance pages",
"width": 150,
"sources": [
{
"path": "tests/setup/sessions/test_session.py",
"line": 28,
"end_line": 40
},
{
"path": "tests/setup/tokens/test_trading_token.py",
"line": 274,
"end_line": 325
}
]
}
],
"edges": [
{
"id": "start-config",
"from": "pytest_start",
"to": "load_config",
"label": "collect + resolve",
"variant": "emphasis"
},
{
"id": "config-param",
"from": "load_config",
"to": "parametrize",
"label": "product settings"
},
{
"id": "param-login",
"from": "parametrize",
"to": "driver_login",
"label": "selected config",
"variant": "emphasis"
},
{
"id": "login-portal",
"from": "driver_login",
"to": "pratyay_ui",
"label": "authenticate",
"variant": "security"
},
{
"id": "skip-token-loop",
"from": "session_skip",
"to": "token_loop",
"label": "token-only / combined decision",
"variant": "dashed"
},
{
"id": "dispatch-save",
"from": "token_dispatch",
"to": "token_save",
"label": "IDAS default",
"variant": "emphasis"
},
{
"id": "save-evidence",
"from": "token_save",
"to": "save_report",
"label": "step captures",
"variant": "dashed"
},
{
"id": "login-dispatch",
"from": "driver_login",
"to": "token_dispatch",
"label": "run token flow",
"variant": "emphasis"
}
],
"cards": [
{
"dot": "cyan",
"title": "How configuration is called",
"items": [
"pytest parametrization calls get_setup_configs(\"combined\") when test_session_and_token_setup is collected.",
"get_product_config merges product overrides into setup.run_session/run_token and resolves token settings; disabled products are filtered out.",
"Each selected config carries url, login, product.me_instance, token settings and product_name into the test."
]
},
{
"dot": "amber",
"title": "Combined run semantics",
"items": [
"The test opens the portal and logs in once per browser fixture. It saves a browser cookie/session backup after login.",
"When run_session is true, create_session selects the configured ME instance and saves the calculated start/end window.",
"The same driver then loops product codes and calls run_token_setup for each one."
]
},
{
"dot": "violet",
"title": "Token branches",
"items": [
"IDAS/default creates the token, fills delivery/expiry values, then edits ORDER_NOR, ORDER_EXCH and TRADE time sessions before Save and Activate.",
"RTM selects market/product/generation mode, fills delivery and session times, then saves; activation is not part of this branch.",
"UPC fills configured order/trade times, saves, then resets the generator."
]
},
{
"dot": "rose",
"title": "Authentication and evidence",
"items": [
"login() sends credentials, waits for manual CAPTCHA completion, submits, waits for the dashboard marker and closes transient notices.",
"StepActions captures screenshots after interactions. conftest.py attaches them to pytest-html and creates report folders.",
"The diagram shows trading sessions/tokens; login session backups are browser cookies, not the trading-session records created in the portal."
]
}
]
}