Here is what I have implemented for NUnit when using Playwright. I would like to do the same thing for TypeScript with Playwright.
public string GetTestClassMethod()
{
return $"{TestContext.CurrentContext.Test.ClassName}.{TestContext.CurrentContext.Test.MethodName}";
}