Refactor tab tests