Skip to content

Unique Ids for tests #527

@colbymorrison

Description

@colbymorrison

The frontend tests simulate, say, entering an input by finding the id of the input and simulating a change. For example, this test finds the second "new-password" id in the DOM and simulates inputting text there.

DeepinScreenshot_select-area_20200818230907

However, if another "new-password" ID is added, the input will no longer be the second "new-password" ID, it might now be the third. So the test would fail.

So, we should have components that are targeted by tests have unique IDs for the test to be picked out by the test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenanceCode maintenance tasks, such as refactoring

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions