Reduce duplication testing navbar helper