Vote follows tense fight that exposed bipartisan concerns about installing an ally of President Donald Trump