The magnitude of displacement is equal to the distance covered in a given interval of time if the particle
Moves with constant acceleration along any path
Moves with constant speed
Moves in same direction with constant velocity or with variable velocity
Moves with constant velocity
To have distance equal to magnitude of displacement, the particle has to move in the same direction. The velocity may or may not be constant.