auto_route_library icon indicating copy to clipboard operation
auto_route_library copied to clipboard

Testcases for Bottom Navigation Bar that uses AutoRouterScaffold

Open BrindhaEaswaramurthy opened this issue 10 months ago • 2 comments

I'm getting this error when I tried to write testcase for Bottom Navigation bar that uses AutoRouterScaffold

"RouteData operation requested with a context that does not include an RouteData. The context used to retrieve the RouteData must be that of a widget that is a descendant of a AutoRoutePage."

I have mocked StackRouter and PageRouteInfo but no luck.

@Milad-Akarie

BrindhaEaswaramurthy avatar Oct 16 '23 12:10 BrindhaEaswaramurthy

@BrindhaEaswaramurthy the test page does not seem to get wrapped with RouteDataScope widget. show some code?

Milad-Akarie avatar Oct 18 '23 10:10 Milad-Akarie

hi @Milad-Akarie, can you write a code for widget testing AutoTabRouter, when I've tried to test then error occurs.

like: "RouteData operation requested with a context that does not include an RouteData. The context used to retrieve the RouteData must be that of a widget that is a descendant of a AutoRoutePage."

can you please help me fix it or give me an example of AutoTabsRouter widget testing?

I also add a new issue please help me to solve it. https://github.com/Milad-Akarie/auto_route_library/issues/1821

kaushikbh99 avatar Dec 19 '23 05:12 kaushikbh99