Tuesday's primaries offered fresh tests of the Democratic Party's direction, the influence of President Donald Trump's endorsements and the Republican Party's future.