Skip to content

Conversation

@sfc-gh-pbelczyk
Copy link
Contributor

@sfc-gh-pbelczyk sfc-gh-pbelczyk commented Aug 10, 2023

Add simple test case and setup for each component and template.

  • change run-e2e dev.py to support template/template-reactless testing in isolation
  • change frontend-react/build to frontend/build
  • propagate e2e_utils.py for each test
  • extract example.py for each component
  • simple test for each component

@sfc-gh-pbelczyk sfc-gh-pbelczyk self-assigned this Aug 10, 2023
@sfc-gh-pbelczyk sfc-gh-pbelczyk changed the title Add simple test case for each component Add test setup for each component Aug 11, 2023
@sfc-gh-pbelczyk sfc-gh-pbelczyk force-pushed the STREAMLIT-3894-duplicate-e2e-setup-for-all-examples-and-components branch from cb65182 to ebfae49 Compare August 16, 2023 09:22
@sfc-gh-pbelczyk sfc-gh-pbelczyk marked this pull request as ready for review August 18, 2023 07:09
# "name" argument without having it get recreated.
name_input = st.text_input("Enter a name", value="Streamlit")
num_clicks = my_component(name_input, key="foo")
st.markdown("You've clicked %s times!" % int(num_clicks))
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to update the component guide now?

Copy link
Contributor

Choose a reason for hiding this comment

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

Screenshot 2023-08-22 at 11 18 00



def _find_free_port():
with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as s:
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be great if the code in our templates had more docstrings. For each method you can write something to make the code easier to use. We should also type hints.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If it's ok I will do this in all utils files sync PR

@sfc-gh-pbelczyk sfc-gh-pbelczyk merged commit 5c386b1 into master Aug 22, 2023
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.

4 participants