Closed LinkPovilas closed 3 weeks ago
Hi! Take a look at test.step. Let me know wether that helps your usecase!
Hi @Skn0tt, thank you for your reply! While the test.step
API is great for its use case, this feature request is more about being able to provide meaningful names for locators themselves without needing additional wrapper functions, especially in short tests that may consist of a single step.
Additionally, some users might find it useful for hiding certain details. For example, in my provided screenshot, the test report exposes the API key name. Another user could accidentally expose an administrator's username or email by selecting a dropdown menu that displays it using the page.getByRole()
strategy.
Thanks for elaborating. Generally speaking, neither steps nor (potential) aliases will be a good way of hiding sensitive credentials. Even if the report doesn't visibly show the sensitive information, it will most likely still contain it in some internal representation. The only right solution here is to use less sensitive credentials.
For other usecases, we believe that test.step
is sufficient.
🚀 Feature Request
Allow the assignment of aliases to locators to improve the readability of test reports.
Example
As locator method:
Usage:
Motivation
It would enhance the readability of test reports for stakeholders, including business analysts, project managers, product owners or clients.
Currently without aliases:
With aliases: