The party is spending its summer mired in a series of acrimonious primaries. Will it hurt them when it’s time to take on Republicans?