@nanobpm/nano-workforce 0.148.1 → 0.149.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -110,10 +110,15 @@ test("#511: DI preview — the staged view wires the proposal-bpmn door and brid
110
110
  assert(/params:\s*\{\s*xml:/.test(MOUNT_JS), "staged.mount.js must carry the compiled BPMN xml in the bridge message");
111
111
  });
112
112
 
113
- test("#460/#511: Dispatch is the operator's launch — posts the digest to the dispatch door, and never compiles/stages", () => {
113
+ test("#460/#511/#569: Dispatch is the operator's launch — posts the digest to the dispatch door, and never compiles/stages", () => {
114
114
  assertModuleAnchored("dispatchUrl", "app/api/actions/delivery-graph/dispatch");
115
115
  assert(/data-dispatch=/.test(MOUNT_JS), "staged.mount.js must render a per-row Dispatch affordance carrying the digest");
116
- assert(/window\.confirm\(/.test(MOUNT_JS), "Dispatch must confirm before launching (dispatch authorises side effects)");
116
+ // #569: the confirmation must be IN-DOM (a two-step "Confirm dispatch" affordance), NOT a native
117
+ // window.confirm — the sandboxed console App-View iframe (no allow-modals) suppresses window.confirm
118
+ // (returns false), so a native-modal gate reads as "operator declined" and the button silently no-ops.
119
+ assert(/data-dispatch-confirm=/.test(MOUNT_JS), "Dispatch must confirm via an in-DOM two-step control (data-dispatch-confirm), not window.confirm (#569)");
120
+ assert(!/window\.confirm\(/.test(MOUNT_JS), "Dispatch must NOT gate on native window.confirm — it is suppressed in the sandboxed App-View iframe (#569)");
121
+ assert(!/window\.prompt\(/.test(MOUNT_JS), "the staged view must NOT gate on native window.prompt — it is suppressed in the sandboxed App-View iframe (#569)");
117
122
  // Operator-only: this surface dispatches a digest that is ALREADY staged — it must not compile or
118
123
  // stage (that is the compose view), so the #460 boundary holds and the self-approval hole stays shut.
119
124
  assert(!/delivery-graph\/preview\b/.test(MOUNT_JS), "staged.mount.js must NOT wire the compile/stage door");
@@ -121,9 +126,19 @@ test("#460/#511: Dispatch is the operator's launch — posts the digest to the d
121
126
  assert(!/approvalToken/.test(MOUNT_JS), "staged.mount.js must NOT carry the removed replayable approvalToken");
122
127
  });
123
128
 
124
- test("#520: Dismiss is the operator's discard — posts the digest to the dismiss door, behind a confirm, and launches nothing", () => {
129
+ test("#520/#569: Dismiss is the operator's discard — posts the digest to the dismiss door, behind an in-DOM confirm, and launches nothing", () => {
125
130
  assertModuleAnchored("dismissUrl", "app/api/actions/delivery-graph/dismiss");
126
131
  assert(/data-dismiss=/.test(MOUNT_JS), "staged.mount.js must render a per-row Dismiss affordance carrying the digest");
127
- // Dismiss is a one-way discard off the staged list — confirm before it drops the proposal.
128
- assert(/window\.confirm\(DISMISS_CONFIRM\)/.test(MOUNT_JS), "staged.mount.js must confirm before dismissing (a one-way discard off the staged list)");
132
+ // Dismiss is a one-way discard off the staged list — confirm before it drops the proposal, via the
133
+ // same in-DOM two-step control as Dispatch (#569), not a native window.confirm.
134
+ assert(/data-dismiss-confirm=/.test(MOUNT_JS), "staged.mount.js must confirm before dismissing via an in-DOM control (data-dismiss-confirm), not window.confirm (#569)");
135
+ });
136
+
137
+ test("#523/#569: Save-to-library names the entry via an in-DOM input, not a native window.prompt", () => {
138
+ assertModuleAnchored("saveLibraryUrl", "app/api/actions/delivery-graph/library/save");
139
+ assert(/data-save-library=/.test(MOUNT_JS), "staged.mount.js must render a per-row Save-to-library affordance carrying the digest");
140
+ // #569: the library name must come from an in-DOM text input; window.prompt returns null under the
141
+ // App-View sandbox, which the old code read as "operator cancelled" → silent no-op.
142
+ assert(/data-library-name=/.test(MOUNT_JS), "staged.mount.js must collect the library name via an in-DOM input (data-library-name), not window.prompt (#569)");
143
+ assert(/data-save-library-confirm=/.test(MOUNT_JS), "staged.mount.js must confirm the save via an in-DOM Save affordance (data-save-library-confirm)");
129
144
  });