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

@grafana/e2e: improvements #25677

Merged
merged 3 commits into from Jun 17, 2020
Merged

@grafana/e2e: improvements #25677

merged 3 commits into from Jun 17, 2020

Conversation

stevenvachon
Copy link
Contributor

See commit message(s).

… where it appeared as though the wrong one was selected
@stevenvachon stevenvachon added type/e2e Everything related to end-to-end tests area/grafana/e2e labels Jun 17, 2020
@stevenvachon stevenvachon self-assigned this Jun 17, 2020
@stevenvachon stevenvachon requested review from mckn and removed request for a team June 17, 2020 18:53
Copy link
Contributor

@briangann briangann left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@scottlepp scottlepp left a 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);
Copy link
Contributor

Choose a reason for hiding this comment

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

seems brittle

Copy link
Contributor Author

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').

Copy link
Contributor

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?

Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

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()).

@scottlepp scottlepp self-requested a review June 17, 2020 19:30
@stevenvachon stevenvachon merged commit 5b5b247 into master Jun 17, 2020
@stevenvachon stevenvachon deleted the e2e branch June 17, 2020 19:39
aknuds1 pushed a commit that referenced this pull request Jun 30, 2020
* 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
@ying-jeanne ying-jeanne added pr/external This PR is from external contributor and removed pr/external This PR is from external contributor labels Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/grafana/e2e type/e2e Everything related to end-to-end tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants