Well trucks still have a lot of low hanging fruit for becoming more aerodynamic.
Plus you could use the sides of the trailer for some power too.
Finally even if 10kw can't power the truck. It could extend its range by some amount. Plus that's still a significant amount of power you don't need to buy. 2-3 rooftops worth?
Those improvements are presently not done because of cost. Grid electricity is a lot cheaper than diesel.
I guess electric trucks would still put a lot more effort into avoiding air resistance because of the lower energy per unit mass of batteries (the aerodynamic improvements can be pretty directly traded for either range or cargo capacity).
I think present day solar cells are a combination of too expensive and too heavy to bother with. That could change in the future.
I have thought the same thing -- that trucks could be more aerodynamic. So why aren't they? The economics of freight are such that any measurable improvement in fuel economy is worth a lot. Why do we not see super streamlined semis? Maybe there's some non-obvious reason? I don't know.