Either way, but I don't think I have heard of the option number 2 being offered unless the damage was so bad you'd want to refuse delivery anyway even if fixed. It's either "let us fix this right this moment" or "accept delivery and we'll fix it later" (which is most likely a lie so never fall for it. Demand things fixed before accepting delivery or be ready to live with them broken forever because things magically become in-spec once you actually take delivery)When you say "fix on the spot" does that mean they deal with issues I point out that very moment and I wait around there or leave and come back to officially take delivery once things are fixed?
Also obviously for any of this to work it's absolutely 100% important to never pay in advance until you accept delivery. I am not sure how that works in practical terms if you are financing the car (so probably don't), but with both a lease and no financing basically just don't give them the check with the whatever amount due until you are sure you are accepting the car.