[WIP] Fix integration test errors

This only fixes errors, not failures.
Can we find something to wait/loop for instead of a sleep? This is likely brittle, if for some reason the loading is a bit slower it might still fail