Skip to content

Move integration test helpers from tests/common to wireframe_testing crate #433

@coderabbitai

Description

@coderabbitai

Context

Related to PR #424 which demonstrates the pattern for modularisation by refactoring the connection module.

Request from: @leynos
Source: #424

Problem

Integration test helpers in tests/common/mod.rs:7 rely on file-level #![allow] attributes to suppress dead_code and allow_attributes warnings. This is necessary because Rust's per-test-crate compilation model means that helpers used by only some integration tests appear unused within each test crate.

Proposed Solution

Move these helpers into the wireframe_testing crate as part of the public API, then import them from integration tests. This approach:

  1. Eliminates the need for #![allow(dead_code)] and #![allow(allow_attributes)] suppressions
  2. Makes the helpers available as a proper public API for testing
  3. Follows proper module boundaries and compilation unit structure
  4. Allows the helpers to be reused across different test crates without duplication

Benefits

  • Cleaner code: Remove unnecessary lint allowances
  • Better structure: Proper separation between production code and test utilities
  • Reusability: Helpers become available for external users of the library
  • Maintainability: Helpers are compiled once as part of the library, not per-test-crate

Implementation Notes

  • Extract helpers from tests/common/mod.rs into wireframe_testing crate
  • Update integration tests to import from wireframe_testing
  • Remove the #![allow] attributes from tests/common/mod.rs
  • Ensure all integration tests continue to pass

Metadata

Metadata

Assignees

Labels

lowAin't annoying anyone but the QA department

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions