Wales suffered a 12th successive Test match defeat as they were beaten 45-12 by South Africa in Cardiff.