resetForTesting static method
Test-only reset. Drops all fourteen enrichers from
TapirPlugin.enrichers, clears the navigate adapter, cancels the Echo
connection-state subscription, and clears the idempotency guard.
Implementation
@visibleForTesting
static void resetForTesting() {
TapirPlugin.enrichers.remove(magicFormEnricher);
TapirPlugin.enrichers.remove(magicNavigationEnricher);
TapirPlugin.enrichers.remove(magicControllerEnricher);
TapirPlugin.enrichers.remove(magicFormErrorsEnricher);
TapirPlugin.enrichers.remove(magicGateResultEnricher);
TapirPlugin.enrichers.remove(magicMiddlewareEnricher);
TapirPlugin.enrichers.remove(magicAuthUserEnricher);
TapirPlugin.enrichers.remove(magicControllerFlagsEnricher);
TapirPlugin.enrichers.remove(magicRouteParamsEnricher);
TapirPlugin.enrichers.remove(magicEchoConnectionEnricher);
TapirPlugin.enrichers.remove(magicGateResultsAllEnricher);
TapirPlugin.enrichers.remove(magicRecentHttpEnricher);
TapirPlugin.enrichers.remove(magicRecentLogsEnricher);
TapirPlugin.enrichers.remove(magicRecentExceptionsEnricher);
TapirPlugin.registerNavigateAdapter(null);
_echoSubscription?.cancel();
_echoSubscription = null;
_lastEchoState = null;
_installed = false;
}