fix intermittent jasmine test by defining $element
fix intermittent jasmine test by defining $element

We were missing the '$element = $(html)' call here, which is applied to all of the other beforeEach callbacks. Consequently, the value of '$element' was subject to race conditions, leading to errors such as:

- TypeError: undefined is not an object (evaluating '$element.attr')
- An option select component initialising when the parent is hidden and data-closed-on-load is true sets the height of the container sensibly when the option select is opened. Expected 200 to be greater than 200.
- Error: Expected 100 to be greater than 200.

...and so on.

alphagov/finder-frontend,alphagov/finder-frontend,alphagov/finder-frontend,alphagov/finder-frontend