Was this racist of my cousin?

I’m half white and half Mexican (yes, I know it’s a nationality but saying Mexican isn’t as vague as saying Hispanic) but I look more like my mom, so I got her olive skin and features. As a kid I was REALLY dark from spending time outside without burning and I visited family in Mexico every summer. Well after one summer my cousin (from my dads side and although she’s not Mexican, she lived there with her husband. She was also an adult at the time) told me to tell my dad I was a beaner. I didn’t understand since I was a kid and thought it was just because Hispanics liked beans and went with it. She laughed when she told me to say that to him so I thought it was some sort of joke.

It has been YEARS later and she is now back in the US. After my cousin had praised the country and people, she’s starting to say some very racist things and my family is really starting to question if she’s racist and if she has always thought that way. I guess it made me think back to that moment. So was it? Do you think she meant in a bad way or could she have been joking?