Refactor page tests.