refactor tests for navbar dropdown