Refactoring the test to work with tabs