Skip to content

Usage for test-id #7

@gaurav5430

Description

@gaurav5430

Can this library help with generating unique test ids, so that we can use that to target specific elements in tests ?

Currently, this is how it seems to work and some issues:

  • the order of unique ids generated would be the same, every time you reset. I also suppose that this guarantees the same ids and order if the app is run again, or the page is refreshed?
  • It seems that we can get different ids for the same component if the code is executed in a way that the order of loading that component differs ( for example, it would probably be affected by conditional rendering)
  • this only happens at runtime, but is there a way to expose all these generated ids somehow as a map in json, so that the file can then be used in the testing framework.

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