Adds onAttach triggerMethod.

Adds `triggerAttach` and `beforeTriggerAttach` triggerMethods.

This is the 3rd out of 3 PRs to get #1886 in.
I like these tests a lot - my comments were all related to the degree of test setup duplication. If we could reduce some of that through a couple base view classes with well placed stubs, i think it'll make it easier to modify/understand these tests in the future when inevitably they all fail at once and some poor soul needs to do something about it