Yes, it's particularly unfortunate that it happened in a World Cup warm up match. The players must be absolutely gutted.
Chris Jones made the point that Wales usually have strong second choice options (e.g. Dan Biggar for Gareth Anscombe) but their third choice options are a bit more limited. If Biggar picks up a knock in the RWC, they don't really have a world class replacement.
It is certainly unfortunate, but dealing with injuries before and during a tournament is part of tournaments. Teams will always have injuries but managing those injuries and selecting your tournament players is a key part of management at that level, to provide the best strength in depth. Sometimes that means selecting the odd utility player - maybe not the best in any particular position but able to play well enough in a number of positions to cover for likely injury.
On the warm up match. Sometimes I think players are perhaps most likely to get injured in these kind of matches as I think they hold back a little specifically because it is a warm up match and that can lead to more injuries than if you go full tilt. The very nature that players are scared of getting injured just before a tournament and adjust their play accordingly leads to greater likelihood of injury.
Also not sure playing other top teams at this stage is smart - the final few warm up games for a top side are probably better against lesser sides. You'll meet the big boys in due course, what's the point of testing yourself against them in non competitive warm up matches.