* Wait for the operator to send a prompt (manual-trigger mode). * Prints the prompt text and waits `promptWaitMs` for the user to act.
( prompt: string, promptWaitMs: number, )
| 123 | * Prints the prompt text and waits `promptWaitMs` for the user to act. |
| 124 | */ |
| 125 | async function waitForOperator( |
| 126 | prompt: string, |
| 127 | promptWaitMs: number, |
| 128 | ): Promise<void> { |
| 129 | console.log( |
| 130 | `\n [MANUAL] Please send the following message in the test chat:\n` + |
| 131 | ` ┌──────────────────────────────────────────────────────────┐\n` + |
| 132 | ` │ ${prompt.slice(0, 56).padEnd(56)} │\n` + |
| 133 | ` └──────────────────────────────────────────────────────────┘\n` + |
| 134 | ` Waiting up to ${Math.round(promptWaitMs / 1000)}s for your send…`, |
| 135 | ); |
| 136 | await new Promise((r) => setTimeout(r, promptWaitMs)); |
| 137 | } |
| 138 | |
| 139 | async function runCase(spec: E2ECase): Promise<CaseResult> { |
| 140 | const errors: string[] = []; |