1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//! Shared WebSocket-test driver.
//!
//! Drives a [`WebSocketScriptRenderer`] through the canonical sequence a scripted
//! WebSocket fixture takes:
//!
//! 1. `render_test_open` — language-native test header.
//! 2. `render_connect` — open WS connection (`let conn = client.connect_websocket(path)`).
//! 3. For each scripted message:
//! - `direction = send` → `render_send_text` / `render_send_json` / `render_send_binary`.
//! - `direction = receive` → `render_expect_text` / `render_expect_json` / `render_expect_binary`.
//! 4. `render_close` — close the connection with the expected close code.
//! 5. `render_test_close` — closing brace / `end`.
//!
//! The fixture schema for WebSocket scripts lives in `fixtures/websocket*.json` —
//! see the SSE/WS subset in `crate::fixture::HttpFixture` (currently the WS
//! schema is loaded as raw JSON; a typed schema will be introduced in a follow-up
//! once the language renderers are in place and we know exactly which fields
//! they consume).
use crateFixture;
/// Per-language WebSocket script renderer.
///
/// Implementations live next to the per-language codegen module
/// (`crates/alef-e2e/src/codegen/<lang>/ws.rs`).
///
/// This is currently a stub: the trait methods will be filled in alongside
/// Phase 2B/2C of the e2e flip, when each language's WebSocket assertions are
/// migrated to drive the binding's `TestClient.connect_websocket()` API.
/// Render a WebSocket script test for `fixture` to `out` using `renderer`.
///
/// Currently returns `false` (no test emitted) because the WS schema and
/// per-language renderers are not yet wired up; per-language codegen still
/// uses its monolithic WebSocket renderer until Phase 2B lands. This function
/// exists as the integration point so the per-language modules can begin
/// migrating one at a time.
Sized>