When using JS playwright, you can use the test.step
method to create readable nested step descriptions. With POM this might look like
class LoginForm {
async login(email, password) {
return test.step(`user logs in with email ${email} and password ******`, () -> {
// ... implementation
})
}