Always a good idea to test and identify the motor phases before connecting them as there are no standards or color codings. Even the motor spec sheets can be incorrect.

https://duet3d.dozuki.com/Wiki/Choosing_and_connecting_stepper_motors#Section_Identifying_the_stepper_motor_phases