Preheat oven to 400 F degrees. Prick sweet potato with fork all over and then place on a baking tray.
Roast the sweet potato at 400 F for 30-35 minutes or till knife goes inside the sweet potato easily. Let it cool. Peel and chop into cubes. Set aside.
Heat 1 teaspoon of oil in a pan on medium heat. Once the oil is hot, add chopped onion and saute for 30 seconds. Then add garlic salt, salt, black pepper and mix.
Add spinach leaves to pan and mix. Add dried parsley, cayenne pepper and cook for a minute till spinach is slightly wilted.
Roll the thawed puff pastry sheet and cut it into 4 rectangles. For all the rectangles - leave margin on all sides and poke the center with fork. This way the center of the puff pastry won't rise up as it bakes.
Transfer the tarts on to a baking sheet lined with parchment paper. Now place 1 tablespoon of pesto on each of the tarts.
Place cubes of roasted sweet potato and then the prepared onion-spinach mixture on each. Brush sides with egg wash (for egg wash, mix 1 egg with 1 tablespoon water or milk).
Bake the tarts at 400 F degrees for 15 minutes till puff pastry if nicely browned.
Top with feta cheese (optional) and garnish the sweet potato pesto tart with fresh thyme. Serve immediately!