Ireland finally won their first Test match on Friday when they defeated Afghanistan by six wickets in Abu Dhabi, ending a streak of seven successive losses.