Skip to content

Migrate framework tests to use WidgetTester.startHover and WidgetTester.startHoverAt #194600

Open

Description

@Mathvdias

Follow-up to #190630 (and #102754).

Many framework tests manually simulate mouse hover gestures using boilerplate:

final TestGesture gesture = await tester.createGesture(kind: PointerDeviceKind.mouse);
await gesture.addPointer(location: ...);
addTearDown(gesture.removePointer);
await gesture.moveTo(...);

In several places, tests also omit addTearDown(gesture.removePointer), leaving mouse pointers connected to MouseTracker across tests and causing order-dependent test failures.

Once #190630 lands, we can migrate existing hover tests across packages/flutter/test/ to use tester.startHover and tester.startHoverAt with addTearDown(gesture.removePointer).

Activity

  1. added
    a: tests"flutter test", flutter_test, or one of our tests
    frameworkflutter/packages/flutter repository. See also f: labels.
    in triagePresently being triaged by the triage team
    and removed
    in triagePresently being triaged by the triage team
    on Oct 19, 2026
  2. added
    P2Important issues not at the top of the work list
    c: tech-debtTechnical debt, code quality, testing, etc.
    on Oct 20, 2026
  3. Renzo-Olivares commented on Oct 20, 2026

    @Renzo-Olivares
    Contributor

    Thank you for following up @Mathvdias!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our testsc: tech-debtTechnical debt, code quality, testing, etc.frameworkflutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions