If you have a CEL on, your car will automatically fail. Depending on when it's actually illuminated (considering it works properly), this is where the technician pulling your car in can inform you prior to entering your car in the system that it will fail.
I know about the CEL, but in all honesty the shops I've been to pop the hood before they enter any kind of information into their computer. Just by realizing they have an illegal header or intake that should be enough to tell the customer "Hey you should get OEM parts and come back for another smog"
NO. Instead they run everything and tell you it didn't pass visuals. In most cases I have been the one pulling up the car and they tell me to pop the hood as soon as I drive it in.
I even had a car pass a GROSS POLLUTER inspection after it was fixed. That is the hardest test to pass even more than the state BAR for the mere fact that there already has been failed emmisions and you have to take it to a special shop to do it. I've dealt with smogging quite a it.
If they don't pass it due to visuals, it's fine, but charge you for it and knowing it wouldn't pass is like scamming someone out of their money.
Like a cop giving you a ticket for a cracked windshield or tags that you have in your glovebox.
I'm going to be a cop and theres something called discretion. It's about having the power to decide whether to give a ticket or not to. Same with stupid gay scamming charges from shops.