Skip to content

tap() throwing WaitUntilVisibleTimeoutException #405

Description

@burhankhanzada

I have list of widgtes showing with some translate animation. Before using Patrol I have used ensureVisible() which works:

void main() {
  testWidgets('some test'), (tester) async {
    await app.main();
    await tester.pumpAndSettle();

    final cards = find.byType(Card);

    expect(cards, findsNWidgets(4));

    final firstCard = cards.evaluate().first.widget;

    final card = find.byWidget(firstCard);

    await tester.ensureVisible(card);
    await tester.pumpAndSettle();
    await tester.tap(card);
  }
}

but in Patrol docs says it will handle the visibility issue itself but it is giving me WaitUntilVisibleTimeoutException when setting visible or settle duration

void main() {
  IntegrationTestWidgetsFlutterBinding.ensureInitialized();

  patrolTest('some test', ($) async {
    await app.main();

    await $.pumpAndSettle();

    final cards = $(Card);

    expect(cards, findsNWidgets(4));

    final firstCard = cards.evaluate().first.widget;

    final card = $(firstCard);

    await card.tap(settleTimeout: 5.seconds, visibleTimeout: 5.seconds);
  });
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Issues not at the top of the work listblockedBlocked by external factorsbugSomething isn't workingneeds more infoLooks valid, but more info is neededpackage: patrolRelated to the patrol package (native automation, test bundling)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions