Test improvements

refs #4309
- replace waitForResource with waitForSelector to prevent UI timing
issues.
Merge pull request #4314 from sebgie/test

Test improvements