Sex/cheating/pregnancy

Me and my now ex had sex 4&2 days before my fertile window not knowing when I’d be fertile. I found out he cheated on me on Wednesday. (Caught him at dinner with another girl.) I’m scared I may be pregnant, but my period is supposed to start on May 1st. Should I take a test before my period or after?