Afghanistan successfully tests water flow at major dam