Partick Thistle defeated Dunfermline Athletic to secure a place in the Scottish Premiership play-off final. They will now face St Mirren for promotion.