Testing manipulating complex (for me) Javascript using Opal