[flagged]
Autism is heritable which suggests there are autism genes involved. [1]
It's not a 100% thing, which could point to things other than genetics causing autism. It is, however, very strongly correlated to your parents.
The fact exists that there is no singular autism gene. And there could never be a genetic test for autism. It could predict the likelihood, but it wouldn't be pass/fail. Because there are many autism-related genes but no single gene trigger like a light switch. And you could still have all of those genes turned on and not have autism due to environmental factors.