stacked icon indicating copy to clipboard operation
stacked copied to clipboard

Type Safe Navigation does't verify in unit tests

Open FilledStacks opened this issue 3 years ago • 1 comments

When we use type safe navigation in our code we can't verify in the unit tests that it was used.

 final navigationService = getAndRegisterNavigationService();
final model = _getModel(fillFormData: false);
await model.goToServiceAreaSelection();
verify(navigationService.navigateToPermissionPrimerView(
  permissionPrimer: PermissionPrimer.location
));

This fails even though the function does this

Future<void> goToServiceAreaSelection() await {
 final permissionGranted =
      await _navigationService.navigateToPermissionPrimerView(
    permissionPrimer: PermissionPrimer.location,
  );
}

FilledStacks avatar Jul 05 '22 08:07 FilledStacks

Requirements

  • Determine if it's possible to verify extension function calls
  • Based on the research, make adjustments to the Stacked generator

FilledStacks avatar May 16 '23 09:05 FilledStacks