Eine Tasse Tee
is a Nominativ, not a Genitiv! To make the cases more visible, let us write:
Eine Tasse schwarzer Tee.
The Tee agrees with Tasse in its case, nominative. In this grammatical structure Tee is called an partitive Apposition and has to follow the case of the noun (Tasse).
Indeed, I had mistakenly flipped the roles of noun and apposition in the previous version. But the rule is clear:
Nach einer Maßangabe oder einer Mengenangabe folgt das Gemessene meist als Apposition
An other grammatical structure, considered better taste in my youth, but uncommon now, uses the partitive genitive:
Eine Tasse schwarzen Tees.
The site I linked mentions the partitive genitive together with appositions. But I don't think they consider it an apposition, because it would violate the age old rule I stated, which is also also repeated here:
Die Apposition steht immer im gleichen Kasus wie das Bezugswort, zu dem sie gehört!
Of course, you can use a construction involving von, but it usually implies specification to a certain tea, sometimes specified before in the case of the definite pronoun:
Gib mir eine Tasse von dem Tee / give me more of the tea.
Gib mir ein Stück von Mamas Kuchen/ give me more of mom's cake.