Refactor disable dom watching test to not use set timeout