Lawmakers advanced a controversial immigration bill and pressed forward on confirming the president’s Cabinet nominees.