Skip to content

[Hackathon] Frontend runner uses a fixed desktop viewport - cannot test mobile/responsive layouts #174

Description

@lxcario

Summary

The frontend runner appears to execute at a fixed desktop viewport width, and there is no way (via a CLI flag or a plan step) to run a test at a mobile viewport. Responsive / mobile-only UI — e.g. a md:hidden bottom navigation bar — therefore can't be verified.

Environment

  • CLI: testsprite (latest)
  • Test type: frontend (--plan-from)
  • Target: live Next.js app using Tailwind responsive breakpoints

What happened

I wrote a plan whose first step was "resize the browser to 390px width" to test a mobile bottom-nav. Across two runs:

  • The runner ignored the resize step and instead appended ?mobile=1 to the URL (a no-op for the app).
  • The desktop sidebar stayed visible; the md:hidden bottom nav never rendered.
  • The mobile layout was never exercised, so the run couldn't assert on it.

Expected

A way to set the viewport / device for a frontend run — for example a --viewport <WxH> or --device <name> flag on test create / test run, or a recognized "set viewport" plan step that the runner honors.

Actual

No viewport / mobile / device / width / height option exists on any command (checked testsprite --help and test create/run --help, and the CLI source). The runner defaults to a desktop viewport with no override, so mobile-responsive assertions are untestable.

Impact

Any app with responsive or mobile-specific UI can't be covered. We had to delete an otherwise-valid mobile bottom-nav test and document it as a runner limitation rather than hide a red result.

Suggested fix

Add a viewport / device override (a flag, or a plan step the runner honors) so responsive layouts can be tested at defined widths.


Filed as part of TestSprite S3 Hackathon dogfooding (project: Norahttps://github.com/lxcario/Nora). Happy to provide the exact plan JSON and run IDs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions