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

Add e2e tests for the dataframe selections #8634

Merged

Conversation

raethlein
Copy link
Collaborator

@raethlein raethlein commented May 8, 2024

Describe your changes

Adds e2e tests for the dataframe row and column selections introduced in this PR: #8411

The tests run fine on my local Mac but not on the CI/CD pipeline yet. Likely something with the Meta key for multiple column selection.

GitHub Issue Link (if applicable)

Testing Plan


Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@raethlein raethlein changed the base branch from develop to feature/dataframe-selections May 8, 2024 15:16
@raethlein raethlein changed the title Feature/dataframe selections e2e tests Add e2e tests for the dataframe selections May 8, 2024
@raethlein raethlein force-pushed the feature/dataframe-selections-e2e-tests branch from 7af0243 to 1150dd6 Compare May 10, 2024 12:06
@raethlein raethlein marked this pull request as ready for review May 10, 2024 13:24
@raethlein raethlein merged commit 8650241 into feature/dataframe-selections May 10, 2024
31 checks passed
LukasMasuch added a commit that referenced this pull request May 13, 2024
## Describe your changes

This PR adds row and column selection support to `st.dataframe`. It can
be used like this:

```python
selection = st.dataframe(
    df,
    on_select="rerun",
    selection_mode="single-row"
)
```

- [Demo App](https://dataframe-row-selections.streamlit.app/)


https://github.com/streamlit/streamlit/assets/2852129/f3ff476a-0bd0-4b82-bc97-6bda3a3be98c

## GitHub Issue Link (if applicable)

- Closes #688
- Closes #7134
- #455
- #8319

## Testing Plan

- Added unit tests
- Added e2e tests (see #8634)

```[tasklist]
### e2e tests
- [x] Single row/column selection
- [x] Multi row/column selection
- [x] Mixed selections
- [x] Screenshot of a dataframe with multiple selections
- [x] Clear selections via toolbar
- [x] Clear selections via escape
- [x] Select all rows in multi-row selection via top checkbox
- [x] Optional: Test drag and drop selection
- [x] Optional: Test shift selections
- [x] Optional: Test selections in form
- [x] Have some test cases work with session state and others with return value
- [x] Add a test case validating that the callback gets called
``` 


---

**Contribution License Agreement**

By submitting this pull request you agree that all contributions to this
project are made under the Apache 2.0 license.

---------

Co-authored-by: Benjamin Räthlein <benjamin.raethlein@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant