Virginians voted in races for governor, lieutenant governor, attorney general and the state legislature on Tuesday. The state’s 100 House of Delegate races represent the purest test of grass-roots anger at the president, election analysts said.

That is because the candidates are little known to voters, largely absent from TV ads, and the races approximate a generic partisan ballot. If the past is a guide, they may also prefigure nationwide congressional voting in 2018.