This cleans up the dismissable_test to be less fragile, and make it harder to forget to reset things between runs.
I eliminated a bunch of globals that were susceptible to being missed and passed them in to buildTest instead, and removed some values that were always the same (itemExtent).