Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Visual query builder: Update e2e selectors #111

Merged
merged 2 commits into from
Jan 29, 2024
Merged

Conversation

ivanahuckova
Copy link
Member

@ivanahuckova ivanahuckova commented Jan 29, 2024

WIP
Trough the migration of visual query builder to this repository, grafana/grafana#78554 was merged which changes code related to e2e tests - instead of aria labels it uses data-testid in LabelFilterItem.

This caused the issue with e2e where I couldn't merge grafana/grafana#81380 as e2e test was failing.

In this PR I am:

  • adding @grafana/e2e-selectors as peer and dev dependency as it is with @grafana/data, @grafana/ui, ...
  • I've noticed that inputIds weren't unique, so I updated the logic
  • I am using useRef to keep ids consistent and not change on every re-render
  • I am using DataQuery from @grafana/data. If we want to use it in the future from schema, we need to add it as dev/peer dependency.

Passing e2e test with updated component:

e2e.mov

@ivanahuckova ivanahuckova marked this pull request as draft January 29, 2024 10:06
@ivanahuckova ivanahuckova marked this pull request as ready for review January 29, 2024 10:13
@ivanahuckova ivanahuckova self-assigned this Jan 29, 2024
Copy link

@bohandley bohandley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! Good find on the e2e selectors that I changed in late November. Sorry about that

More recently, I was working on Prometheus e2e tests and made sure sure not to change any other shared e2e selectors for shared code. After I complete the migration of the Prometheus library and use the shared folder, I may go back into the shared folder and add more selectors. I will not do that until Prometheus is using this location for the shared folder.

Thank you for finding this!

@ivanahuckova ivanahuckova merged commit 049096d into main Jan 29, 2024
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants