Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Duplicate Test IDs for DRep Links and Identity Reference Field Errors #1965

Closed
kneerose opened this issue Sep 6, 2024 · 3 comments
Closed
Assignees
Labels

Comments

@kneerose
Copy link
Contributor

kneerose commented Sep 6, 2024

Area

Delegation Pillar

Domain

preview.gov.tools

Which wallet were you using?

No response

Context

Test IDs for all fields should be unique to ensure accurate testing and identification. Currently, the test IDs for the error messages related to description, URL of links, and identity fields are duplicated (e.g., invalid-url-error and max-80-characters-error). This issue also includes the overlap where the description error message shares a test ID with one of the name error messages i.e max-80-characters-error. Therefore, distinct test IDs are required for each error message to avoid confusion and ensure proper testing.

Steps to reproduce

  1. Connect to the wallet.
  2. Navigate to the /register_dRep page.
  3. Observe the test IDs for the error messages related to description andURL, of identity and links reference

Actual behavior

Test IDs for the error messages of description, and URL, of identity and links reference are duplicated, which may lead to confusion during testing.

Screenshot from 2024-09-06 13-13-24

Screenshot from 2024-09-06 13-13-29

Screenshot from 2024-09-06 13-13-36

Screenshot from 2024-09-06 13-13-44

Expected behavior

Each error message should have a unique test ID to ensure clear and accurate testing.

@spannercode
Copy link
Contributor

@jdyczka Here is the ticket for missing test-ids.

@jdyczka jdyczka moved this from To do to In progress in Govtool all Oct 2, 2024
@jdyczka
Copy link
Contributor

jdyczka commented Oct 2, 2024

@spannercode Right now test ids for inputs are generated automatically based on the error message. So in theory this can also affect other places where there are different fields, but with the same error message. The same applies to the hint below the input.
Maybe it would make more sense to generate test ids based on the test id of the input field? If done globally that would ensure uniqueness, however, it might also require a bunch of changes on your side.
Let me know if you would prefer me to go with the global approach, or just handle the case of link and identity references.

@spannercode
Copy link
Contributor

To document it here, our recommendation would be to fix this specific case first so that we can working tests and properly refactor while unpacking the pillars.
CC: @jdyczka

jdyczka added a commit that referenced this issue Oct 18, 2024
…-for-reference-errors

[#1965] fix duplicate testIds for reference errors and hints
@bosko-m bosko-m closed this as completed Nov 3, 2024
@github-project-automation github-project-automation bot moved this from In progress to Done in Govtool all Nov 3, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Governance Tools Community Backlog Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

7 participants