| 1 | @long-running |
| 2 | # [LONG RUNNING] Plugin discovery and listing acceptance tests. Run with: |
| 3 | # cargo test -p codewhale-tui --test plugin_e2e_acceptance --features long-running-tests -- --test-threads=1 |
| 4 | # The same integration target also drives the real distributed binary through a |
| 5 | # sealed PTY for plugin.toml show/trust/enable/revoke, reviewed Skill dispatch, |
| 6 | # and reviewed stdio MCP startup/call/cancellation. |
| 7 | Feature: Plugin discovery and listing |
| 8 | |
| 9 | Scenario: Plugin scripts are discovered from the configured plugin directory |
| 10 | Given an offline CodeWhale workspace with a configured plugin directory |
| 11 | And the plugin directory contains: |
| 12 | | name | description | approval | |
| 13 | | greet | Say hello to the user | auto | |
| 14 | | audit | Run a security audit | required | |
| 15 | | summarizer | Summarize the given input | suggest | |
| 16 | When the plugin scanner discovers plugins |
| 17 | Then the scanner should report 3 plugins |
| 18 | And the scanned plugin "greet" should have "Say hello to the user" as description |
| 19 | And the scanned plugin "greet" should have "auto" as approval |
| 20 | And the scanned plugin "audit" should have "required" as approval |
| 21 | And the scanned plugin "summarizer" should have "suggest" as approval |
| 22 | And the scanned plugin "missing-plugin" should not be found |
| 23 | |
| 24 | Scenario: Empty plugin directory reports no plugins |
| 25 | Given an offline CodeWhale workspace with a configured plugin directory |
| 26 | And the plugin directory is empty |
| 27 | When the plugin scanner discovers plugins |
| 28 | Then the scanner should report 0 plugins |
| 29 | |
| 30 | Scenario: Missing plugin directory reports the path |
| 31 | Given an offline CodeWhale workspace with a configured plugin directory |
| 32 | And the plugin directory does not exist |
| 33 | When the plugin scanner runs |
| 34 | Then the scanner should report the missing directory path |
| 35 |