We investigate motion of test particles in exact spacetimes with an expanding impulsive gravitational wave which propagates in a Minkowski, a de Sitter, or an anti-de Sitter universe. Using the continuous form of these metrics we derive explicit junction conditions and simple refraction formulas for null, timelike, and spacelike geodesics crossing a general impulse of this type. In particular, we present a detailed geometrical description of the motion of test particles in a special class of axially symmetric spacetimes in which the impulse is generated by a snapped cosmic string.