The nomination poses a politically risky test for lawmakers as they try to probe Barrett’s views on issues of abortion, health care access and gay marriage without running afoul of the Constitution’s prohibition against a religious test for public officials.