Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Feb 17, 2021

  • Enable printing to console with cy.task("log", "whatever")
  • Add frontend/cypress/screenshots to .gitignore
  • Add -v/--verbose flag to run_e2e_scripts.py to always print Streamlit/Cypress stdout, even on success

@ghost ghost self-requested a review February 17, 2021 20:35
// enable printing to terminal
on("task", {
log(message) {
console.log(message)
Copy link
Contributor

@karriebear karriebear Feb 17, 2021

Choose a reason for hiding this comment

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

Don't have anything against this but doesn't console.log already work? The annoying part is it prints into the browser console of the test run but wouldn't this do the same?

Copy link
Author

Choose a reason for hiding this comment

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

Based on my understanding, which is based on the internet, which is never wrong, I believe Cypress tasks let you register bits of JS code that run in the Node instance, i.e. the terminal, when cy.task is called.

Whatever's actually happening under the hood, all I'm aware of is that cy.task("log", "whatever") makes whatever show up in my terminal 😛

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahh I clearly missed the comment. Thought this was for logging into the browser, not terminal

@ghost ghost merged commit ecc6c99 into streamlit:develop Feb 18, 2021
@ghost ghost deleted the update-e2e-tests branch February 18, 2021 18:08
schaumb pushed a commit to FloWide/streamlit that referenced this pull request Feb 22, 2021
* improve local testing experience

* save
tconkling added a commit to tconkling/streamlit that referenced this pull request Feb 22, 2021
* develop:
  Color picker - show value (streamlit#2817)
  Minor improvements to local E2E testing  (streamlit#2807)
  Fix datetime timezone handling in data frames (streamlit#2784)
  Remove nonexistent elements from widget state (streamlit#2760)
  Shared selectbox (streamlit#2795)
tconkling added a commit to tconkling/streamlit that referenced this pull request Feb 24, 2021
* develop:
  Update "showErrorDetails" config description and docs (streamlit#2841)
  Pause Dependabot updates for non-security-related issues (streamlit#2840)
  client.showTracebacks -> showErrorDetails (per product) (streamlit#2837)
  Color picker - show value (streamlit#2817)
  Minor improvements to local E2E testing  (streamlit#2807)
  Fix datetime timezone handling in data frames (streamlit#2784)
  Remove nonexistent elements from widget state (streamlit#2760)
  Shared selectbox (streamlit#2795)
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant