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
@grafana/e2e: improvements #25677
@grafana/e2e: improvements #25677
Conversation
… where it appeared as though the wrong one was selected
... thrown from RxJS
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.
LGTM!
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.
the wait for rxjs bit seems a bit brittle. can we log a message or something so when that times out we know why? otherwise the test will fail and we won't know the reason
e2e().wait('@chartData'); | ||
|
||
// Wait for RxJS | ||
e2e().wait(500); |
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.
seems brittle
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.
I agree that it's not a great solution, but It doesn't kill it after 500ms, it simply waits for one of our RxJS actions. I don't know why, but Cypress screenshot()
causes RxJS to fail without the delay.
I'm not sure what logging a would message accomplish as it'd be something like log('Hopefully avoided "executing a canceled action" error from RxJS')
.
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.
what happens if rxjs is not loaded?
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.
is there a way to determine what you are waiting for has loaded?
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.
Not that I know of. RxJS isn't a global.
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.
i'm ignorant here with cypress. can you execute something that would test the existence of rxjs?
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.
This sounds very disturbing, I'd like to look into this closer but will not have time today. RxJs is our library for streaming data from the backendSrv to visualisations so we really don't know when it's completed.
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.
"Streaming" doesn't sound like a normal request, so perhaps it can be covered in the near future with cypress-io/cypress#687
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.
i'm ignorant here with cypress. can you execute something that would test the existence of rxjs?
Not that I can think of. We can wait()
for requested URLs (currently only XMLHttpRequest
and not fetch()
).
* Minor changes * Fixed data source selection issue … where it appeared as though the wrong one was selected * Fixed “executing a canceled action” issue ... thrown from RxJS
See commit message(s).