Skip to content

Test IDs #77

Description

@dgp1130

While working on the docs site, I found it useful to have test IDs so certain elements could be identified at test time. While I think this is generally an anti-pattern to be avoided, sometimes it is useful. @rules_prerender in particular happens to be pretty good at this since the test IDs can be relatively trivially removed from the production build, as if they were never there. Should experiment to see if it's worth making this a real public API of @rules_prerender.

One other question: Is test ID the right primitive, or do we want more comprehensive "testonly logic" support built into the rendering process? Similar to how test IDs are kind of an anti-pattern, I would also argue that testonly logic in production code is an anti-pattern. Need to investigate more to see.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions