Skip to content

Commit f579375

Browse files
author
Nitish [C] Dhok
committed
Implemented test case automation for integrations --help subcommand.
1 parent afd4dfb commit f579375

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

e2etests/tests/kiro_cli_subcommand/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ pub mod test_kiro_cli_user_subcommand;
1111
pub mod test_kiro_cli_settings_format_subcommand;
1212
pub mod test_kiro_cli_settings_delete_subcommand;
1313
pub mod test_kiro_cli_quit_subcommand;
14-
pub mod test_kiro_cli_dashboard_subcommand;
14+
pub mod test_kiro_cli_dashboard_subcommand;
15+
pub mod test_kiro_cli_integrations_subcommand;
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#[allow(unused_imports)]
2+
use q_cli_e2e_tests::q_chat_helper;
3+
4+
#[test]
5+
#[cfg(all(feature = "kiro_cli_subcommand", feature = "sanity"))]
6+
fn test_kiro_cli_integrations_help_subcommand() -> Result<(), Box<dyn std::error::Error>> {
7+
println!("\n🔍 Testing kiro-cli integrations --help subcommand... | Description: Tests the <code> kiro-cli integrations --help </code> subcommand to verify different help commands.");
8+
9+
println!("\n🔍 Executing 'kiro-cli integrations --help' subcommand...");
10+
let response = q_chat_helper::execute_q_subcommand("kiro-cli", &["integrations", "--help"])?;
11+
12+
println!("📝 FULL OUTPUT:");
13+
println!("{}", response);
14+
println!("📝 END OUTPUT");
15+
16+
assert!(response.contains("Manage system integrations"),"Expected 'Manage system integrations' in response.");
17+
assert!(response.contains("Usage"), "Expected 'Usage' in response.");
18+
assert!(response.contains("kiro-cli"), "Expected 'kiro-cli' in response.");
19+
20+
assert!(response.contains("integrations"), "Expected 'integrations' in response.");
21+
assert!(response.contains("OPTIONS"), "Expected 'OPTIONS' in response.");
22+
assert!(response.contains("COMMAND"), "Expected 'COMMAND' in response.");
23+
24+
assert!(response.contains("Commands"), "Expected 'Commands' in response.");
25+
assert!(response.contains("install"), "Expected 'install' in response.");
26+
assert!(response.contains("uninstall"), "Expected 'uninstall' in response.");
27+
28+
assert!(response.contains("reinstall"), "Expected 'reinstall' in response.");
29+
assert!(response.contains("status"), "Expected 'status' in response.");
30+
31+
assert!(response.contains("help"), "Expected 'help' in response.");
32+
assert!(response.contains("verbose"), "Expected 'verbose' in response.");
33+
assert!(response.contains("--help"), "Expected '--help' in response.");
34+
35+
assert!(response.contains("--verbose"), "Expected '--verbose' in response.");
36+
assert!(response.contains("-v"), "Expected '-v' in response.");
37+
assert!(response.contains("-h"), "Expected '-h' in response.");
38+
39+
println!("✅ Kiro Cli integrations --help subcommand executed successfully!");
40+
41+
Ok(())
42+
}

0 commit comments

Comments
 (0)