Issue #3404508 by mstrelan, smustgrave, larowlan, quietone: Fix strict type errors in Functional tests: Add casts and fix types where needed