I saw a video of a test flight of a GA plane and it stalled with max power and with a moderate AOA (angle of attack). How can a plane stall with max power (with the wings flying below the critical angle of attack)?
If you are wondering how an airplane can stall in straight and level flight with the engine running at full power, the answer has to do with the power curve.
However, by definition it cannot stall "with the wings flying below the critical angle of attack stall". The only reason it might appear to do so while in a straight and level flight would be due to heavy icing or some other factor that reduces the critical angle of attack.
A plane (airfoil) can stall at any airspeed and/or power setting so long as the critical angle of attack is exceeded. Airplanes stalling only below a specified airspeed is a common misconception largely due to the fact planes are usually listed with a “stall speed” below which the aircraft will generally stall in most situations. However if the critical angle of attack is exceeded at a higher speed a stall can also occur. The only way to know the critical angle of attack is from an angle of attack measurement device installed on the airframe it is inherently somewhat different than the aircrafts attitude.
You're probably referring to a power-on stall. This type of stall is the result of climbing more steeply than the engine can provide power for.
Pilots can become distracted or disoriented after takeoff and climb too steeply. The airplane slows, the wing angle of attack increases, and an unintentional stall (and potential spin) is the result.