It sounds like you did it right. It's really up to you if you want to stay or leave in that case, but I think leaving might give you the 30 min wait time if you ended up completing the party by joining (someone correct me if I'm wrong).

One way to tell if you are with your friends when you queue in-progress is to be mindful of the dungeon progress. If they're past the 1st boss for example, it will say In progress: 1 / #