-
Notifications
You must be signed in to change notification settings - Fork 32
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
e2eTesting: update selectors #874
Conversation
All E2E tests are failing (e.g. this one). Is this happening because the selectors deviate from grafana/grafana main branch or do I have to fix anything in this repo? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for raising this PR!
The e2e-selectors in plugin-e2e are a little different than the ones defined in grafana/e2e-selectors. In grafana/e2e-selectors, the entire package has the same version strategy as Grafana. The plugin-e2e package is detached from the Grafana release cycle, so instead every single selector has a minimum Grafana version associated with it.
Now that you're changing these selectors in Grafana 11.1.0-pre
, you can set 11.1.0
as the associated version. This means for example PanelEditor.General.content
will have the value Panel editor content
in versions prior to 11.1.0, and the value data-testid Panel editor content
in versions equals to or larger than 11.1.0.
PanelEditor: {
General: {
content: {
'11.1.0': 'data-testid Panel editor content',
[MIN_GRAFANA_VERSION]: 'Panel editor content',
},
},
If you change this, tests should be working again.
I didn't see the feedback from platform team. Good to know!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! You can ignore the tests that are failing for grafana-dev@11.1.0-174229 as the selectors are resolved for all builds in 11.1.0 and currently not taking build version into account.
🚀 PR was released in |
An external contributor updated some e2e selectors which are duplicated in this repo. In order to fix playwright tests in their PR in grafana/grafana I updated the selectors here.
Related to grafana/grafana#78536
📦 Published PR as canary version:
Canary Versions
✨ Test out this PR locally via:
npm install @grafana/plugin-e2e@1.1.1-canary.874.63ebb8f.0 # or yarn add @grafana/plugin-e2e@1.1.1-canary.874.63ebb8f.0