Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

Add StreamingUxValidator for real-time UX testing #16

Description

@noahgift

Part of Epic #14

Problem

Cannot validate real-time streaming UX elements like:

  • VU meters responding to audio
  • Progress bars advancing
  • State indicators transitioning
  • Latency between events

Proposed API

pub struct StreamingUxValidator {
    states: Vec<(String, Instant)>,
}

impl StreamingUxValidator {
    /// Start tracking a state indicator element
    pub async fn track_state(page: &Page, selector: &str) -> ProbarResult<Self>;
    
    /// Assert state sequence occurred in order
    pub fn assert_state_sequence(&self, expected: &[&str]) -> ProbarResult<()>;
    
    /// Assert VU meter level changes (element width/height changes)
    pub async fn assert_level_changing(
        page: &Page,
        selector: &str,
        property: &str, // "width" or "height"
        min_change_percent: f32,
        timeout_ms: u32,
    ) -> ProbarResult<()>;
    
    /// Assert progress advances from 0 toward 100
    pub async fn assert_progress_advancing(
        page: &Page,
        selector: &str,
        timeout_ms: u32,
    ) -> ProbarResult<()>;
    
    /// Assert transition latency is within bounds
    pub fn assert_transition_latency(
        &self,
        from_state: &str,
        to_state: &str,
        max_ms: u32,
    ) -> ProbarResult<()>;
}

Use Cases

  • Validate VU meter responds to audio input
  • Validate state indicator shows correct states
  • Validate chunk progress bar fills during recording
  • Measure and assert on real-time latency

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions