From 28065fd4d7730a163a1925ae2c6e0e18635a66fb Mon Sep 17 00:00:00 2001 From: openhands Date: Wed, 18 Feb 2026 13:40:21 +0000 Subject: [PATCH] test: add test cases for plugins with parameters Add new test scenarios (Test 10-13) to launch-test.html that include plugins with parameters to test the expansion twisty and form fields: - Test 10: Single plugin with string, number, and boolean parameters - Test 11: Multiple plugins each with their own parameters - Test 12: Mixed scenario with plugins with and without parameters - Test 13: Plugin with empty string parameter (user must fill in) These tests exercise the parameter form UI that was not covered by the existing test cases which only used plugins without parameters. Co-authored-by: openhands --- .pr/launch-test.html | 136 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) diff --git a/.pr/launch-test.html b/.pr/launch-test.html index a5c7cbbe70..580ca87a50 100644 --- a/.pr/launch-test.html +++ b/.pr/launch-test.html @@ -289,6 +289,65 @@ +

⚙️ Plugin Parameters (Form Fields)

+ +
+

Test 10: Single Plugin with Parameters

+

Plugin: aws-deploy (simulated)

+

Parameters:

+
    +
  • region (string): "us-west-2"
  • +
  • timeout (number): 30
  • +
  • debug (boolean): false
  • +
+
+ Expected: Modal shows plugin with expandable section (expanded by default). Form fields appear for each parameter: text input for region, number input for timeout, checkbox for debug. Values are pre-filled with defaults. +
+ +
+ +
+

Test 11: Multiple Plugins with Parameters

+

Plugins:

+
    +
  • data-pipeline with params: source_bucket (string), batch_size (number)
  • +
  • transformer with params: format (string), compress (boolean)
  • +
+
+ Expected: Modal shows two expandable sections (both expanded by default), each with their own form fields. User can collapse/expand each section independently. +
+ +
+ +
+

Test 12: Mixed - Plugins With and Without Parameters

+

Plugins:

+
    +
  • aws-deploy WITH params: region, timeout, debug
  • +
  • logging-plugin WITHOUT params
  • +
  • metrics-plugin WITHOUT params
  • +
+
+ Expected: Modal shows aws-deploy as expandable section with form fields. Below it, "Additional Plugins" collapsible section lists logging-plugin and metrics-plugin without form fields. +
+ +
+ +
+

Test 13: Plugin with Empty String Parameters

+

Plugin: api-connector

+

Parameters:

+
    +
  • api_key (string): "" (empty - user must fill in)
  • +
  • endpoint (string): "https://api.example.com"
  • +
  • rate_limit (number): 100
  • +
+
+ Expected: Modal shows form fields with api_key empty, endpoint pre-filled, rate_limit set to 100. User can edit all fields before starting. +
+ +
+

❌ Error Scenarios

@@ -418,6 +477,83 @@ const maliciousMessage = 'alert("xss")<\/scr' + 'ipt>This text should appear safely'; openLaunchUrl(`?plugins=${encodePlugins(plugins)}&message=${encodeURIComponent(maliciousMessage)}`); } + + // Test 10: Single plugin with parameters (shows form fields) + function runTest10() { + const plugins = [{ + source: "github:example/aws-deploy", + repo_path: "plugins/aws-deploy", + parameters: { + region: "us-west-2", + timeout: 30, + debug: false + } + }]; + openLaunchUrl(`?plugins=${encodePlugins(plugins)}`); + } + + // Test 11: Multiple plugins with parameters + function runTest11() { + const plugins = [ + { + source: "github:example/data-pipeline", + repo_path: "plugins/data-pipeline", + parameters: { + source_bucket: "my-data-bucket", + batch_size: 100 + } + }, + { + source: "github:example/transformer", + repo_path: "plugins/transformer", + parameters: { + format: "json", + compress: true + } + } + ]; + openLaunchUrl(`?plugins=${encodePlugins(plugins)}`); + } + + // Test 12: Mixed - plugins with and without parameters + function runTest12() { + const plugins = [ + { + source: "github:example/aws-deploy", + repo_path: "plugins/aws-deploy", + parameters: { + region: "us-east-1", + timeout: 60, + debug: true + } + }, + { + source: "github:example/logging-plugin", + repo_path: "plugins/logging" + // No parameters + }, + { + source: "github:example/metrics-plugin", + repo_path: "plugins/metrics" + // No parameters + } + ]; + openLaunchUrl(`?plugins=${encodePlugins(plugins)}`); + } + + // Test 13: Plugin with empty string parameters (user must fill in) + function runTest13() { + const plugins = [{ + source: "github:example/api-connector", + repo_path: "plugins/api-connector", + parameters: { + api_key: "", + endpoint: "https://api.example.com", + rate_limit: 100 + } + }]; + openLaunchUrl(`?plugins=${encodePlugins(plugins)}`); + }