Treasury & Bank Transfer Management System — سامانه مدیریت خزانهداری و حوالههای بانکی
ci/windows-dual-app-lab-20261016
ci/public-windows-bridge-probe-20261017
ci/windows-dispatch-bootstrap-20261016
ci/windows-dual-app-lab-20261016
dev/v7-production-failclosed-20261021
feature/reconciliation-guard-20261013
main
phase-1-foundation
phase-1-implementation
phase-2-treasury-core
phase-3-banking-reconciliation
phase-4-operations-enterprise-ux
phase-5-hardening-release
phase-6-production-platform
phase-7-production-infrastructure-bank-golive
phase-7-sql-readonly-ux-20261015
transfer-exe-to-drive-20261006
| 1 | import test from 'node:test'; |
| 2 | import assert from 'node:assert/strict'; |
| 3 | import { isIntegrationsEditorReady } from './gui-readiness.mjs'; |
| 4 | |
| 5 | const ready = { href:'http://127.0.0.1:3210/integrations', editor:true, copy:true }; |
| 6 | |
| 7 | test('accepts a hydrated integrations editor with copy control', () => { |
| 8 | assert.equal(isIntegrationsEditorReady(ready), true); |
| 9 | }); |
| 10 | test('does not race ahead when navigation finished but editor is not hydrated', () => { |
| 11 | assert.equal(isIntegrationsEditorReady({...ready, editor:false}), false); |
| 12 | assert.equal(isIntegrationsEditorReady({...ready, copy:false}), false); |
| 13 | }); |
| 14 | test('rejects a login redirect or another page', () => { |
| 15 | assert.equal(isIntegrationsEditorReady({...ready, href:'http://127.0.0.1:3210/login'}), false); |
| 16 | }); |
| 17 | test('rejects an unrelated origin or malformed data', () => { |
| 18 | assert.equal(isIntegrationsEditorReady({...ready, href:'https://example.com/integrations'}), false); |
| 19 | assert.equal(isIntegrationsEditorReady(null), false); |
| 20 | assert.equal(isIntegrationsEditorReady({...ready, href:'not a URL'}), false); |
| 21 | }); |