The Apple diagnostics won’t check the discrete camera elements in this case the actual photo detector (CCD).
Did you have the system opened at any point? Is possible the camera unit it’s self got damaged.
I would bring it into an Apple Store and make sure to say to them you only want someone who has been trained on this system to work on it as I’ve heard some repairs of less skilled folks talking on this much harder and expensive system.
I’ll warn you they may just replace the display assembly as the camera is part of it. Try to get it covered under extended warranty if you can. Otherwise you may just want to go with an add-on camera as that would be cheaper!