I went through the effort of trying it on, but I didn't buy it in the end.
I tried it on, but I still didn't buy it.
「試着までしたのに買わなかった」は
"I went through the effort of trying it on, but I didn't buy it in the end"
となります。
"I went through the effort~"は「~の努力をした」という意味合いのフレーズです
「試着までしたけど、やっぱり買わなかったよ」
「試着したけど、それでも買わなかった」は
"I tried it on, but I still didn't buy it"
微妙にニュアンスが違いますが、こちらも例文としてあげております。
ご参考になれば幸いです。