The toddler threw a tantrum.
A classic story of the power of a childhood tantrum.
A temper tantrum, sometimes called a hissy fit or a conniption fit, is a raw and unplanned extreme emotional response to frustration, emotionally overwhelming situations, anger, sadness, unexpected...
I always have tantrums when my cousin come over.
Literally, "for having a temper tantrum" translates into "por tener una rabieta de mal genio".