Open BuyMyBeard opened 6 months ago
What target operating system is your test running on? The gesture is only handled on Android or Web.
For mobile
It should be possible to widget test context menu, but only when target platform is android. On iOS the gesture is driven by the operating system through platform channel. Alternatively the widget could always fallback to Flutter codepath when widget tester is detected.
I've tried declaring debugDefaultTargetPlatformOverride = TargetPlatform.android;
at the start of my widget test, but the context menu isn't rendering at all. The target platform during my widget test is Windows, since I'm running the test on my windows machine, but it doesn't seem like something I can change manually
I am trying to setup some widget tests that open the context menu to access options. I tried with tester.longPress and dragGestures, and also tried pumping multiple delays.
I also attempted looking up how the gesture detector works for the ContextMenuWidget works, but didn't find an answer.
Basically long press and drag gestures don't open the context menu. Any pointers?