As the SNP's candidate in Paisley and Renfrewshire South in 2015, she defeated Labour's shadow foreign secretary Douglas Alexander on a day that saw Ed Miliband resign as leader and pave the way for Jeremy Corbyn's leadership.