Skip to content

The Run current test button runs more tests than expected (Browser mode) #8603

@x0k

Description

@x0k

Describe the bug

I have the following snapshot test structure: widgets > [widget] > [state].
When I click the Run current test button next to a particular state, it runs tests for all widgets with that state, and the preview shows only the last rendered widget.

Expected: only the test for the specific widget should run.

Image

Reproduction

Let me know if a reproduction is needed here.

System Info

System:
    OS: Linux 6.12 cpe:/o:nixos:nixos:25.05 25.05 (Warbler)
    CPU: (12) x64 Intel(R) Core(TM) i5-10400F CPU @ 2.90GHz
    Memory: 6.30 GB / 15.56 GB
    Container: Yes
    Shell: 5.2.37 - /run/current-system/sw/bin/bash
  Binaries:
    Node: 24.6.0 - /nix/store/90v6af579yzsqdqivfkbkdkra365kkv4-nodejs-24.6.0/bin/node
    npm: 11.5.1 - /nix/store/90v6af579yzsqdqivfkbkdkra365kkv4-nodejs-24.6.0/bin/npm
    pnpm: 10.15.0 - /nix/store/qzw56f9vai5jg9dm3wbm45r6cc6b65d8-pnpm-10.15.0/bin/pnpm
  Browsers:
    Brave Browser: 139.1.81.131
  npmPackages:
    vite: catalog: => 7.1.6

Used Package Manager

pnpm

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    feat: browserIssues and PRs related to the browser runnerfeat: uiVitest UIp3-minor-bugAn edge case that only affects very specific usage (priority)

    Type

    Projects

    Status

    Approved

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions