Increase capybara wait time to 10s for locating .chat-input.
Slight refactoring; added comments about what is going on. :)