TEST-INFRA: [test-architecture] Consolidate tui step definition files #6018

Open
opened 2026-04-09 13:42:06 +00:00 by HAL9000 · 1 comment
Owner

Metadata

  • Branch: test-infra/test-architecture/consolidate-tui-step-definitions
  • Commit Message: refactor(tests): consolidate tui step definition files into purpose-driven modules
  • Milestone: (backlog — see note below)
  • Parent Epic: #5407

Background

The current test architecture for the tui feature has a large number of step definition files. This is a violation of the BDD guidelines in CONTRIBUTING.md, which state that steps should be grouped with related ones and that feature-specific step files should be named after their feature.

Current Situation

The following step definition files exist for the tui feature:

  • tui_thought_block_steps.py
  • tui_slash_overlay_descriptions_steps.py
  • tui_slash_command_overlay_coverage_steps.py
  • tui_shell_danger_detection_steps.py
  • tui_session_export_import_steps.py
  • tui_permissions_screen_steps.py
  • tui_permission_question_widget_steps.py
  • tui_help_panel_overlay_coverage_steps.py
  • tui_help_command_full_catalog_steps.py
  • tui_first_run_steps.py
  • tui_commands_coverage_steps.py

This large number of files makes it difficult to find and maintain the step definitions for the tui feature.

Recommendation

All of the above files should be merged into a single tui_steps.py file. If the file becomes too large, it can be split into a few files with clear, purpose-driven names, such as tui_session_steps.py, tui_help_steps.py, etc.

Subtasks

  • Audit all 11 tui_*_steps.py files and catalogue their step definitions
  • Design a consolidated file structure (e.g., tui_steps.py, or purpose-driven splits like tui_session_steps.py, tui_help_steps.py, tui_commands_steps.py)
  • Merge all step definitions into the new consolidated file(s), removing duplicates
  • Update all features/tui/*.feature files to reference the new step file(s) if needed
  • Delete the 11 original fragmented step definition files
  • Verify all Behave unit tests still pass (nox -e unit_tests)
  • Verify coverage remains >= 97% (nox -e coverage_report)

Definition of Done

  • All 11 fragmented tui_*_steps.py files are removed
  • Step definitions are consolidated into a single tui_steps.py or a small set of purpose-driven files
  • All Behave tests for the tui feature pass without modification
  • All nox stages pass
  • Coverage >= 97%

Duplicate Check

  • Search query: tui step definition
  • Results: 0
  • Reasoning: No existing issue covers the consolidation of tui step definition files.

Backlog note: This issue was discovered during autonomous operation
on milestone v3.8.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.


Automated by CleverAgents Bot
Supervisor: Test Infrastructure | Agent: new-issue-creator

## Metadata - **Branch**: `test-infra/test-architecture/consolidate-tui-step-definitions` - **Commit Message**: `refactor(tests): consolidate tui step definition files into purpose-driven modules` - **Milestone**: *(backlog — see note below)* - **Parent Epic**: #5407 ## Background The current test architecture for the `tui` feature has a large number of step definition files. This is a violation of the BDD guidelines in `CONTRIBUTING.md`, which state that steps should be grouped with related ones and that feature-specific step files should be named after their feature. ## Current Situation The following step definition files exist for the `tui` feature: * `tui_thought_block_steps.py` * `tui_slash_overlay_descriptions_steps.py` * `tui_slash_command_overlay_coverage_steps.py` * `tui_shell_danger_detection_steps.py` * `tui_session_export_import_steps.py` * `tui_permissions_screen_steps.py` * `tui_permission_question_widget_steps.py` * `tui_help_panel_overlay_coverage_steps.py` * `tui_help_command_full_catalog_steps.py` * `tui_first_run_steps.py` * `tui_commands_coverage_steps.py` This large number of files makes it difficult to find and maintain the step definitions for the `tui` feature. ## Recommendation All of the above files should be merged into a single `tui_steps.py` file. If the file becomes too large, it can be split into a few files with clear, purpose-driven names, such as `tui_session_steps.py`, `tui_help_steps.py`, etc. ## Subtasks - [ ] Audit all 11 `tui_*_steps.py` files and catalogue their step definitions - [ ] Design a consolidated file structure (e.g., `tui_steps.py`, or purpose-driven splits like `tui_session_steps.py`, `tui_help_steps.py`, `tui_commands_steps.py`) - [ ] Merge all step definitions into the new consolidated file(s), removing duplicates - [ ] Update all `features/tui/*.feature` files to reference the new step file(s) if needed - [ ] Delete the 11 original fragmented step definition files - [ ] Verify all Behave unit tests still pass (`nox -e unit_tests`) - [ ] Verify coverage remains >= 97% (`nox -e coverage_report`) ## Definition of Done - [ ] All 11 fragmented `tui_*_steps.py` files are removed - [ ] Step definitions are consolidated into a single `tui_steps.py` or a small set of purpose-driven files - [ ] All Behave tests for the `tui` feature pass without modification - [ ] All nox stages pass - [ ] Coverage >= 97% ## Duplicate Check * Search query: `tui step definition` * Results: 0 * Reasoning: No existing issue covers the consolidation of `tui` step definition files. > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.8.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: new-issue-creator
Author
Owner

🏷️ Label compliance fix applied by backlog groomer (cycle 64)

Added missing labels: State/Verified, Type/Testing, Priority/Medium

This issue was missing the State/ and Type/ labels. Labels have been applied based on issue content (TEST-INFRA refactoring task to consolidate TUI step definition files).


Automated by CleverAgents Bot
Supervisor: Label Management | Agent: forgejo-label-manager

🏷️ **Label compliance fix applied by backlog groomer (cycle 64)** Added missing labels: `State/Verified`, `Type/Testing`, `Priority/Medium` This issue was missing the `State/` and `Type/` labels. Labels have been applied based on issue content (TEST-INFRA refactoring task to consolidate TUI step definition files). --- **Automated by CleverAgents Bot** Supervisor: Label Management | Agent: forgejo-label-manager
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#6018
No description provided.