Mu'awiya made Yazeed his Khalifa during his lifetime
the last will and testament of Mu'awiya in which it is clear that he has made Yazeed his khalifa:
"O my son, I have arranged everything for you, and I have made all the Arabs agree to obey you. No one will now oppose you in your title to the caliphate, but I am very much afraid of Husayn b. Ali, Abd Allah b. 'Umar, Abd ar-Rahman b. Abi Bakr, and Abd Allah b. az- Zubayr. Among them Husayn b. Ali commands great love and respect because of his superior rights and close relationship to the Prophet. I do not think that the people of Iraq will abandon him until they have risen in rebellion for him against you. As far as possible, try to deal with him gently. But the man who will attack you with full force, like a lion attacks his prey, and who will pounce upon you, like a fox when it finds an opportunity to pounce, is Abd Allah b. az-Zubayr. Whenever you get a chance, cut him into pieces." Iqd al Fareed, Volume 4 page 226
will of hazrat muavia in badaya is very much different and contains no such things .......