refactor(tests): remove some duplicate conditions

Closes #9706