rewrite button tests to before / after