js utils for QA testing