testing/src/ny_test_helper
library
Classes
-
NyToastRecorder
-
A simple recorder that tracks toast notifications shown during tests.
-
ToastRecord
-
A recorded toast notification entry.
Functions
-
apiWasCalled(String endpoint, {String? method, int? times})
→ Matcher
-
Custom matcher for API calls.
-
backpackHas(String key, {dynamic value})
→ Matcher
-
Custom matcher for Backpack containing key.
-
expectApiCalled(String endpoint, {String? method, int? times})
→ void
-
Assert that an API endpoint was called.
-
expectApiNotCalled(String endpoint, {String? method})
→ void
-
Assert that an API endpoint was not called.
-
expectAuthenticated<T>()
→ void
-
Assert that a user is authenticated.
-
expectBackpackContains(String key, {dynamic value})
→ void
-
Assert that Backpack contains a specific key.
-
expectBackpackNotContains(String key)
→ void
-
Assert that Backpack does not contain a specific key.
-
expectDebugMode()
→ void
-
Assert that Nylo is in debug mode.
-
expectDevelopingMode()
→ void
-
Assert that Nylo is in developing mode.
-
expectEnv(String key, dynamic expectedValue)
→ void
-
Assert that an environment variable has a specific value.
-
expectEnvSet(String key)
→ void
-
Assert that an environment variable is set (not null).
-
expectGuest()
→ void
-
Assert that no user is authenticated (guest).
-
expectLoadingNamed(WidgetTester tester, Finder finder, String name)
→ void
-
Assert that a named loading key is active in a NyPage/NyState widget.
-
expectLocale(String locale)
→ void
-
Assert that the current locale matches.
-
expectLocked(WidgetTester tester, Finder finder, String name)
→ void
-
Assert that a named lock is currently held in a NyPage/NyState widget.
-
expectNotLoadingNamed(WidgetTester tester, Finder finder, String name)
→ void
-
Assert that a named loading key is not active in a NyPage/NyState widget.
-
expectNotLocked(WidgetTester tester, Finder finder, String name)
→ void
-
Assert that a named lock is not held in a NyPage/NyState widget.
-
expectNoToastShown({String? id, String? description})
→ void
-
Assert that no toast notification was shown matching the criteria.
-
expectNotRoute(String route)
→ void
-
Assert that the current route is not the specified route.
-
expectNyloInitialized()
→ void
-
Assert that Nylo is initialized.
-
expectProductionMode()
→ void
-
Assert that Nylo is in production mode.
-
expectRoute(String route)
→ void
-
Test helper utilities for Nylo testing.
-
expectRouteExists(String route)
→ void
-
Assert that a route exists in the router.
-
expectRouteInHistory(String route)
→ void
-
Assert that the route history contains a specific route.
-
expectRoutesExist(List<String> routes)
→ void
-
Assert that routes exist in the router.
-
expectTestMode()
→ void
-
Assert that Nylo is in test mode.
-
expectToastShown({String? id, String? description})
→ void
-
Assert that a toast notification was shown.
-
hasRouteName(String name)
→ Matcher
-
Custom matcher for route name.
-
isType<T>()
→ TypeMatcher<T>
-
Matcher for checking if an object is of a specific type.