A US election once written off as a routine Republican win has turned into an unexpected test of president Donald Trump's ...