Giter VIP home page Giter VIP logo

Comments (6)

luigi-rosso avatar luigi-rosso commented on June 3, 2024

I've done a few quick tests to see if I could find something interesting.

I don't think it's related to size/hit test as even adding a driver.waitFor(_startGameFinder); before the tap call seems to hang up the driver. I also added a GestureDetector (just in case/to test) around the StartScreenHero to print out when it gets tapped on, but that never happens.

That made me wonder if the presence of the idle animation (basically painting every frame) is somehow holding the driver up, so I removed the animation by having the StartScreenHeroRenderObject always return false here:

@override
  bool get isPlaying => false;

This makes it paint the first frame, but not repaint.

That immediately worked/let it continue. It seems like the way we advance animations in Flare is somehow hanging up the driver (it works with the regular testing framework). Does the driver client wait for all painting to settle before propagating data/communicating back? It seems like something of the sort is happening.

from developer_quest.

luigi-rosso avatar luigi-rosso commented on June 3, 2024

Aha!
https://docs.flutter.io/flutter/flutter_driver/FlutterDriver/runUnsynchronized.html

By default, Flutter Driver waits until there is no pending frame scheduled in the app under test before executing an action. This mechanism is called "frame sync". It greatly reduces flakiness because Flutter Driver will not execute an action while the app under test is undergoing a transition.

from developer_quest.

luigi-rosso avatar luigi-rosso commented on June 3, 2024

This works!

  await driver.runUnsynchronized<void>(() {
	  return driver.tap(_startGameFinder);
  });

from developer_quest.

luigi-rosso avatar luigi-rosso commented on June 3, 2024

I had to make some other changes to make this work in the themed_tasks branch. Here's the commit:

https://github.com/luigi-rosso/dev_rpg/commit/20d9375350106fb0880b1459bbc19639b8a345f9

from developer_quest.

filiph avatar filiph commented on June 3, 2024

from developer_quest.

filiph avatar filiph commented on June 3, 2024

Thanks again! I'm closing this.

from developer_quest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.