Refactor tests to use shared examples
Add tests for clicking links