Skip to content

Commit 05da0fc

Browse files
committed
Added descriptions to tests
1 parent 50e36d6 commit 05da0fc

15 files changed

+69
-69
lines changed

e2etests/tests/ai_prompts/test_ai_prompt.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use q_cli_e2e_tests::q_chat_helper::QChatSession;
44
#[test]
55
#[cfg(all(feature = "ai_prompts", feature = "sanity"))]
66
fn test_what_is_aws_prompt() -> Result<(), Box<dyn std::error::Error>> {
7-
println!("🔍 [AI PROMPTS] Testing 'What is AWS?' AI prompt...");
7+
println!("🔍 [AI PROMPTS] Testing 'What is AWS?' AI prompt... | Description: Tests AI prompt functionality by sending 'What is AWS?' and verifying the response contains relevant AWS information and technical terms");
88

99
let mut chat = QChatSession::new()?;
1010
println!("✅ Q Chat session started");
@@ -57,7 +57,7 @@ fn test_what_is_aws_prompt() -> Result<(), Box<dyn std::error::Error>> {
5757
#[test]
5858
#[cfg(all(feature = "ai_prompts", feature = "sanity"))]
5959
fn test_simple_greeting() -> Result<(), Box<dyn std::error::Error>> {
60-
println!("🔍 Testing simple 'Hello' prompt...");
60+
println!("🔍 Testing simple 'Hello' prompt... | Description: Tests basic AI interaction by sending a simple greeting and verifying the AI responds appropriately with greeting-related content");
6161

6262
let mut chat = QChatSession::new()?;
6363
println!("✅ Q Chat session started");

e2etests/tests/ai_prompts/test_prompts_commands.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const TOTAL_TESTS: usize = TEST_NAMES.len();
1919
#[test]
2020
#[cfg(all(feature = "ai_prompts", feature = "sanity"))]
2121
fn test_prompts_command() -> Result<(), Box<dyn std::error::Error>> {
22-
println!("🔍 Testing /prompts command...");
22+
println!("🔍 Testing /prompts command... | Description: Tests the /prompts command to display available prompts with usage instructions and argument requirements");
2323

2424
let session = get_chat_session();
2525
let mut chat = session.lock().unwrap();
@@ -58,7 +58,7 @@ fn test_prompts_command() -> Result<(), Box<dyn std::error::Error>> {
5858
#[test]
5959
#[cfg(all(feature = "ai_prompts", feature = "sanity"))]
6060
fn test_prompts_help_command() -> Result<(), Box<dyn std::error::Error>> {
61-
println!("🔍 Testing /prompts --help command...");
61+
println!("🔍 Testing /prompts --help command... | Description: Tests the /prompts --help command to display comprehensive help information about prompts functionality and MCP server integration");
6262

6363
let session = get_chat_session();
6464
let mut chat = session.lock().unwrap();
@@ -119,7 +119,7 @@ fn test_prompts_help_command() -> Result<(), Box<dyn std::error::Error>> {
119119
#[test]
120120
#[cfg(all(feature = "ai_prompts", feature = "sanity"))]
121121
fn test_prompts_list_command() -> Result<(), Box<dyn std::error::Error>> {
122-
println!("🔍 Testing /prompts list command...");
122+
println!("🔍 Testing /prompts list command... | Description: Tests the /prompts list command to display all available prompts with their arguments and usage information");
123123

124124
let session = get_chat_session();
125125
let mut chat = session.lock().unwrap();

e2etests/tests/context/test_context_command.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const TOTAL_TESTS: usize = TEST_NAMES.len();
2525
#[test]
2626
#[cfg(all(feature = "context", feature = "sanity"))]
2727
fn test_context_show_command() -> Result<(), Box<dyn std::error::Error>> {
28-
println!("🔍 Testing /context show command...");
28+
println!("🔍 Testing /context show command... | Description: Tests the /context show command to display current context information including agent configuration and context files");
2929

3030
let session = get_chat_session();
3131
let mut chat = session.lock().unwrap_or_else(|poisoned| poisoned.into_inner());
@@ -59,7 +59,7 @@ fn test_context_show_command() -> Result<(), Box<dyn std::error::Error>> {
5959
#[test]
6060
#[cfg(all(feature = "context", feature = "sanity"))]
6161
fn test_context_help_command() -> Result<(), Box<dyn std::error::Error>> {
62-
println!("🔍 Testing /context help command...");
62+
println!("🔍 Testing /context help command... | Description: Tests the /context help command to display comprehensive help information for context management including usage, commands, and options");
6363

6464
let session = get_chat_session();
6565
let mut chat = session.lock().unwrap_or_else(|poisoned| poisoned.into_inner());
@@ -101,7 +101,7 @@ fn test_context_help_command() -> Result<(), Box<dyn std::error::Error>> {
101101
#[test]
102102
#[cfg(all(feature = "context", feature = "sanity"))]
103103
fn test_context_without_subcommand() -> Result<(), Box<dyn std::error::Error>> {
104-
println!("🔍 Testing /context without sub command...");
104+
println!("🔍 Testing /context without sub command... | Description: Tests the /context command without subcommands to verify it displays help information with usage and available commands");
105105

106106
let session = get_chat_session();
107107
let mut chat = session.lock().unwrap_or_else(|poisoned| poisoned.into_inner());
@@ -139,7 +139,7 @@ fn test_context_without_subcommand() -> Result<(), Box<dyn std::error::Error>> {
139139
#[test]
140140
#[cfg(all(feature = "context", feature = "sanity"))]
141141
fn test_context_invalid_command() -> Result<(), Box<dyn std::error::Error>> {
142-
println!("🔍 Testing /context invalid command...");
142+
println!("🔍 Testing /context invalid command... | Description: Tests the /context command with invalid subcommand to verify proper error handling and help display");
143143

144144
let session = get_chat_session();
145145
let mut chat = session.lock().unwrap_or_else(|poisoned| poisoned.into_inner());
@@ -169,7 +169,7 @@ fn test_context_invalid_command() -> Result<(), Box<dyn std::error::Error>> {
169169
#[test]
170170
#[cfg(all(feature = "context", feature = "sanity"))]
171171
fn test_add_non_existing_file_context() -> Result<(), Box<dyn std::error::Error>> {
172-
println!("🔍 Testing /context add non-existing file command...");
172+
println!("🔍 Testing /context add non-existing file command... | Description: Tests the /context add command with non-existing file to verify proper error handling and force option suggestion");
173173

174174
let non_existing_file_path = "/tmp/non_existing_file.py";
175175

@@ -200,7 +200,7 @@ fn test_add_non_existing_file_context() -> Result<(), Box<dyn std::error::Error>
200200
#[test]
201201
#[cfg(all(feature = "context", feature = "sanity"))]
202202
fn test_context_remove_command_of_non_existent_file() -> Result<(), Box<dyn std::error::Error>> {
203-
println!("🔍 Testing /context remove non existing file command...");
203+
println!("🔍 Testing /context remove non existing file command... | Description: Tests the /context remove command with non-existing file to verify proper error handling");
204204

205205
let session = get_chat_session();
206206
let mut chat = session.lock().unwrap_or_else(|poisoned| poisoned.into_inner());
@@ -228,7 +228,7 @@ fn test_context_remove_command_of_non_existent_file() -> Result<(), Box<dyn std:
228228
#[test]
229229
#[cfg(all(feature = "context", feature = "sanity"))]
230230
fn test_add_remove_file_context() -> Result<(), Box<dyn std::error::Error>> {
231-
println!("🔍 Testing /context add <filename> command and /context remove <filename> command...");
231+
println!("🔍 Testing /context add <filename> command and /context remove <filename> command... | Description: Tests the complete workflow of adding a file to context, verifying it appears in context show, then removing it and verifying removal");
232232

233233
let test_file_path = "/tmp/test_context_file_.py";
234234
// Create a test file
@@ -302,7 +302,7 @@ fn test_add_remove_file_context() -> Result<(), Box<dyn std::error::Error>> {
302302
#[test]
303303
#[cfg(all(feature = "context", feature = "sanity"))]
304304
fn test_add_glob_pattern_file_context()-> Result<(), Box<dyn std::error::Error>> {
305-
println!("🔍 Testing /context add *.py glob pattern command...");
305+
println!("🔍 Testing /context add *.py glob pattern command... | Description: Tests the /context add command with glob patterns to add multiple files matching a pattern and verify pattern-based context management");
306306

307307
let test_file1_path = "/tmp/test_context_file1.py";
308308
let test_file2_path = "/tmp/test_context_file2.py";
@@ -384,7 +384,7 @@ fn test_add_glob_pattern_file_context()-> Result<(), Box<dyn std::error::Error>>
384384
#[test]
385385
#[cfg(all(feature = "context", feature = "sanity"))]
386386
fn test_add_remove_multiple_file_context()-> Result<(), Box<dyn std::error::Error>> {
387-
println!("🔍 Testing /context add <filename1> <filename2> <filename3> command and /context remove <filename1> <filename2> <filename3>...");
387+
println!("🔍 Testing /context add <filename1> <filename2> <filename3> command and /context remove <filename1> <filename2> <filename3>... | Description: Tests adding and removing multiple files in a single command to verify batch context operations");
388388

389389
let test_file1_path = "/tmp/test_context_file1.py";
390390
let test_file2_path = "/tmp/test_context_file2.py";
@@ -469,7 +469,7 @@ fn test_add_remove_multiple_file_context()-> Result<(), Box<dyn std::error::Erro
469469
#[test]
470470
#[cfg(all(feature = "context", feature = "sanity"))]
471471
fn test_clear_context_command()-> Result<(), Box<dyn std::error::Error>> {
472-
println!("🔍 Testing /context clear command...");
472+
println!("🔍 Testing /context clear command... | Description: Tests the /context clear command to remove all files from context and verify the context is completely cleared");
473473

474474
let test_file_path = "/tmp/test_context_file.py";
475475

e2etests/tests/core_session/test_clear_command.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use q_cli_e2e_tests::q_chat_helper::QChatSession;
44
#[test]
55
#[cfg(all(feature = "clear", feature = "sanity"))]
66
fn test_clear_command() -> Result<(), Box<dyn std::error::Error>> {
7-
println!("🔍 Testing /clear command...");
7+
println!("🔍 Testing /clear command... | Description: Tests the /clear command to clear conversation history and verify that previous context is no longer remembered by the AI");
88

99
let mut chat = QChatSession::new()?;
1010
println!("✅ Q Chat session started");

e2etests/tests/core_session/test_help_command.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use q_cli_e2e_tests::q_chat_helper::QChatSession;
44
#[test]
55
#[cfg(all(feature = "help", feature = "sanity"))]
66
fn test_help_command() -> Result<(), Box<dyn std::error::Error>> {
7-
println!("🔍 Testing /help command...");
7+
println!("🔍 Testing /help command... | Description: Tests the /help command to display all available commands and verify core functionality like quit, clear, tools, and help commands are present");
88

99
let mut chat = QChatSession::new()?;
1010
println!("✅ Q Chat session started");

e2etests/tests/core_session/test_quit_command.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use q_cli_e2e_tests::q_chat_helper::QChatSession;
44
#[test]
55
#[cfg(all(feature = "quit", feature = "sanity"))]
66
fn test_quit_command() -> Result<(), Box<dyn std::error::Error>> {
7-
println!("🔍 Testing /quit command...");
7+
println!("🔍 Testing /quit command... | Description: Tests the /quit command to properly terminate the Q Chat session and exit cleanly");
88

99
let mut chat = QChatSession::new()?;
1010
println!("✅ Q Chat session started");

e2etests/tests/core_session/test_tools_command.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const TOTAL_TESTS: usize = TEST_NAMES.len();
2424
#[test]
2525
#[cfg(all(feature = "tools", feature = "sanity"))]
2626
fn test_tools_command() -> Result<(), Box<dyn std::error::Error>> {
27-
println!("🔍 Testing /tools command...");
27+
println!("🔍 Testing /tools command... | Description: Tests the /tools command to display all available tools with their permission status including built-in and MCP tools");
2828

2929
let session = get_chat_session();
3030
let mut chat = session.lock().unwrap();
@@ -79,7 +79,7 @@ fn test_tools_command() -> Result<(), Box<dyn std::error::Error>> {
7979
#[test]
8080
#[cfg(all(feature = "tools", feature = "sanity"))]
8181
fn test_tools_help_command() -> Result<(), Box<dyn std::error::Error>> {
82-
println!("🔍 Testing /tools --help command...");
82+
println!("🔍 Testing /tools --help command... | Description: Tests the /tools --help command to display comprehensive help information about tools management including available subcommands and options");
8383

8484
let session = get_chat_session();
8585
let mut chat = session.lock().unwrap();
@@ -125,7 +125,7 @@ fn test_tools_help_command() -> Result<(), Box<dyn std::error::Error>> {
125125
#[test]
126126
#[cfg(all(feature = "tools", feature = "sanity"))]
127127
fn test_tools_trust_all_command() -> Result<(), Box<dyn std::error::Error>> {
128-
println!("🔍 Testing /tools trust-all command...");
128+
println!("🔍 Testing /tools trust-all command... | Description: Tests the /tools trust-all command to trust all available tools and verify all tools show trusted status, then tests reset functionality");
129129

130130
let session = get_chat_session();
131131
let mut chat = session.lock().unwrap();
@@ -205,7 +205,7 @@ fn test_tools_trust_all_command() -> Result<(), Box<dyn std::error::Error>> {
205205
#[test]
206206
#[cfg(all(feature = "tools", feature = "sanity"))]
207207
fn test_tools_trust_all_help_command() -> Result<(), Box<dyn std::error::Error>> {
208-
println!("🔍 Testing /tools trust-all --help command...");
208+
println!("🔍 Testing /tools trust-all --help command... | Description: Tests the /tools trust-all --help command to display help information for the trust-all subcommand");
209209

210210
let session = get_chat_session();
211211
let mut chat = session.lock().unwrap();
@@ -241,7 +241,7 @@ fn test_tools_trust_all_help_command() -> Result<(), Box<dyn std::error::Error>>
241241
#[test]
242242
#[cfg(all(feature = "tools", feature = "sanity"))]
243243
fn test_tools_reset_help_command() -> Result<(), Box<dyn std::error::Error>> {
244-
println!("🔍 Testing /tools reset --help command...");
244+
println!("🔍 Testing /tools reset --help command... | Description: Tests the /tools reset --help command to display help information for the reset subcommand");
245245

246246
let session = get_chat_session();
247247
let mut chat = session.lock().unwrap();
@@ -276,7 +276,7 @@ fn test_tools_reset_help_command() -> Result<(), Box<dyn std::error::Error>> {
276276
#[test]
277277
#[cfg(all(feature = "tools", feature = "sanity"))]
278278
fn test_tools_trust_command() -> Result<(), Box<dyn std::error::Error>> {
279-
println!("🔍 Testing /tools trust command...");
279+
println!("🔍 Testing /tools trust command... | Description: Tests the /tools trust and untrust commands to manage individual tool permissions and verify trust status changes");
280280

281281
let session = get_chat_session();
282282
let mut chat = session.lock().unwrap();
@@ -354,7 +354,7 @@ fn test_tools_trust_command() -> Result<(), Box<dyn std::error::Error>> {
354354
#[test]
355355
#[cfg(all(feature = "tools", feature = "sanity"))]
356356
fn test_tools_trust_help_command() -> Result<(), Box<dyn std::error::Error>> {
357-
println!("🔍 Testing /tools trust --help command...");
357+
println!("🔍 Testing /tools trust --help command... | Description: Tests the /tools trust --help command to display help information for trusting specific tools");
358358

359359
let session = get_chat_session();
360360
let mut chat = session.lock().unwrap();
@@ -393,7 +393,7 @@ fn test_tools_trust_help_command() -> Result<(), Box<dyn std::error::Error>> {
393393
#[test]
394394
#[cfg(all(feature = "tools", feature = "sanity"))]
395395
fn test_tools_untrust_help_command() -> Result<(), Box<dyn std::error::Error>> {
396-
println!("🔍 Testing /tools untrust --help command...");
396+
println!("🔍 Testing /tools untrust --help command... | Description: Tests the /tools untrust --help command to display help information for untrusting specific tools");
397397

398398
let session = get_chat_session();
399399
let mut chat = session.lock().unwrap();
@@ -432,7 +432,7 @@ fn test_tools_untrust_help_command() -> Result<(), Box<dyn std::error::Error>> {
432432
#[test]
433433
#[cfg(all(feature = "tools", feature = "sanity"))]
434434
fn test_tools_schema_help_command() -> Result<(), Box<dyn std::error::Error>> {
435-
println!("🔍 Testing /tools schema --help command...");
435+
println!("🔍 Testing /tools schema --help command... | Description: Tests the /tools schema --help command to display help information for viewing tool schemas");
436436

437437
let session = get_chat_session();
438438
let mut chat = session.lock().unwrap();

e2etests/tests/integration/test_editor_help_command.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const TOTAL_TESTS: usize = TEST_NAMES.len();
1818
#[test]
1919
#[cfg(all(feature = "editor", feature = "sanity"))]
2020
fn test_editor_help_command() -> Result<(), Box<dyn std::error::Error>> {
21-
println!("🔍 Testing /editor --help command...");
21+
println!("🔍 Testing /editor --help command... | Description: Tests the /editor --help command to display help information for the editor functionality including usage and options");
2222

2323
let session = get_chat_session();
2424
let mut chat = session.lock().unwrap_or_else(|poisoned| poisoned.into_inner());
@@ -61,7 +61,7 @@ fn test_editor_help_command() -> Result<(), Box<dyn std::error::Error>> {
6161
#[test]
6262
#[cfg(all(feature = "editor", feature = "sanity"))]
6363
fn test_help_editor_command() -> Result<(), Box<dyn std::error::Error>> {
64-
println!("🔍 Testing /help editor command...");
64+
println!("🔍 Testing /help editor command... | Description: Tests the /help editor command to display editor-specific help information and usage instructions");
6565

6666
let session = get_chat_session();
6767
let mut chat = session.lock().unwrap_or_else(|poisoned| poisoned.into_inner());
@@ -104,7 +104,7 @@ fn test_help_editor_command() -> Result<(), Box<dyn std::error::Error>> {
104104
#[test]
105105
#[cfg(all(feature = "editor", feature = "sanity"))]
106106
fn test_editor_h_command() -> Result<(), Box<dyn std::error::Error>> {
107-
println!("🔍 Testing /editor -h command...");
107+
println!("🔍 Testing /editor -h command... | Description: Tests the /editor -h command (short form) to display editor help information and verify proper flag handling");
108108

109109
let session = get_chat_session();
110110
let mut chat = session.lock().unwrap_or_else(|poisoned| poisoned.into_inner());

e2etests/tests/integration/test_hooks_command.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const TOTAL_TESTS: usize = TEST_NAMES.len();
1818
#[test]
1919
#[cfg(all(feature = "hooks", feature = "sanity"))]
2020
fn test_hooks_command() -> Result<(), Box<dyn std::error::Error>> {
21-
println!("🔍 Testing /hooks command...");
21+
println!("🔍 Testing /hooks command... | Description: Tests the /hooks command to display configured hooks or show no hooks message when none are configured");
2222

2323
let session = get_chat_session();
2424
let mut chat = session.lock().unwrap_or_else(|poisoned| poisoned.into_inner());
@@ -48,7 +48,7 @@ fn test_hooks_command() -> Result<(), Box<dyn std::error::Error>> {
4848
#[test]
4949
#[cfg(all(feature = "hooks", feature = "sanity"))]
5050
fn test_hooks_help_command() -> Result<(), Box<dyn std::error::Error>> {
51-
println!("🔍 Testing /hooks --help command...");
51+
println!("🔍 Testing /hooks --help command... | Description: Tests the /hooks --help command to display comprehensive help information for hooks functionality and configuration");
5252

5353
let session = get_chat_session();
5454
let mut chat = session.lock().unwrap_or_else(|poisoned| poisoned.into_inner());
@@ -87,7 +87,7 @@ fn test_hooks_help_command() -> Result<(), Box<dyn std::error::Error>> {
8787
#[test]
8888
#[cfg(all(feature = "hooks", feature = "sanity"))]
8989
fn test_hooks_h_command() -> Result<(), Box<dyn std::error::Error>> {
90-
println!("🔍 Testing /hooks -h command...");
90+
println!("🔍 Testing /hooks -h command... | Description: Tests the /hooks -h command (short form) to display hooks help information and verify flag handling");
9191

9292
let session = get_chat_session();
9393
let mut chat = session.lock().unwrap_or_else(|poisoned| poisoned.into_inner());

0 commit comments

Comments
 (0)