Angular. Build step to remove attribute from html markup
Check this article on how to remove data-cy
attributes during compilation (using webpack loader) or runtime (using directive). You can do exact the same steps for any data-*
attribute (and ignore the Cypress stuff). Just replace the data-cy
expression with data-test
and you are done.
https://medium.com/agilix/angular-and-cypress-data-cy-attributes-d698c01df062
This works at least for Angular6+.