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
//! Testing utilities for acton-htmx applications
//!
//! This module provides comprehensive test helpers for testing HTMX applications:
//!
//! ## General Testing Utilities
//!
//! - [`TestServer`] - Wrapper around `axum-test` for server testing
//! - [`TestDatabase`] - Helper for SQLx test databases
//! - HTMX assertion helpers for common response patterns
//!
//! ## Agent Testing Utilities
//!
//! - [`agents::AgentTestRuntime`] - Test runtime with automatic cleanup for agent tests
//! - [`agents::await_response`] - Helper to await oneshot responses with timeout
//!
//! ## Domain-Specific Test Utilities
//!
//! - [`MockEmailSender`] - Mock email sender for testing email functionality
//! - [`TestJobQueue`] - In-memory job queue for testing background jobs
//! - [`TestJob`] - Simple test job implementation for testing job execution
//!
//! # Example
//!
//! ```rust,no_run
//! use acton_htmx::testing::{TestServer, TestDatabase, MockEmailSender};
//! use acton_htmx::prelude::*;
//!
//! #[tokio::test]
//! async fn test_login_flow() {
//! let app = build_test_app().await;
//! let server = TestServer::new(app).unwrap();
//!
//! let response = server
//! .post("/login")
//! .form(&LoginForm {
//! email: "test@example.com",
//! password: "password123",
//! })
//! .await;
//!
//! server.assert_hx_redirect(&response, "/dashboard");
//! }
//! ```
// Re-export for convenience
pub use ;
pub use *;
pub use TestDatabase;
pub use MockEmailSender;
pub use ;
pub use TestServer;
// Re-export mockall for test usage
pub use mockall;