fix: make test more robust by replacing wait with findTimeout