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

Migrate st.heading cypress test to playwright #8598

Merged
merged 8 commits into from
May 3, 2024

Conversation

raethlein
Copy link
Collaborator

@raethlein raethlein commented May 2, 2024

Describe your changes

This PR migrates the existing st_heading and st_subheading tests from Cypress to playwright. Since the two tests touch the same area, they are merged into one test script.

The migration happens in preparation of the #8587 PR. In that PR a couple of screenshots need to be updated but I don't want to touch the legacy cypress test artifacts.

GitHub Issue Link (if applicable)

Testing Plan

  • ✅ E2E Tests

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 force-pushed the tests/migrate-st-header-to-playwright branch 3 times, most recently from c8b6590 to de0a7dd Compare May 3, 2024 09:20
@raethlein raethlein changed the title Migrate st.heading to playwright Migrate st.heading cypress test to playwright May 3, 2024
@raethlein raethlein marked this pull request as ready for review May 3, 2024 10:50
@raethlein raethlein force-pushed the tests/migrate-st-header-to-playwright branch from 47ba721 to 0cf73e3 Compare May 3, 2024 12:44
@@ -22,11 +22,25 @@
st.title("`Code` - Title with Anchor", anchor="title")
Copy link
Collaborator

Choose a reason for hiding this comment

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

The other header and title cases here do not seem to have a screenshot test. Is that planned to be added later?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The original cypress test did not have screenshots for them, but good point, I will add it!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added more screenshot tests, including hovering over it to see the anchor button etc.

@raethlein raethlein force-pushed the tests/migrate-st-header-to-playwright branch 2 times, most recently from 097b94f to 5ceea15 Compare May 3, 2024 15:06
@raethlein raethlein force-pushed the tests/migrate-st-header-to-playwright branch 2 times, most recently from bd6ffa5 to 854a68f Compare May 3, 2024 16:06
@raethlein raethlein force-pushed the tests/migrate-st-header-to-playwright branch from 854a68f to 60538fd Compare May 3, 2024 16:22
Copy link
Collaborator

@LukasMasuch LukasMasuch left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@LukasMasuch
Copy link
Collaborator

The st_title e2e test can be deleted as well or?

https://github.com/streamlit/streamlit/blob/develop/e2e/scripts/st_title.py

@raethlein
Copy link
Collaborator Author

The st_title e2e test can be deleted as well or?

https://github.com/streamlit/streamlit/blob/develop/e2e/scripts/st_title.py

Yep! I have migrated those tests as well into the st_heading test and deleted the Cypress files, thanks for the catch!

@raethlein raethlein force-pushed the tests/migrate-st-header-to-playwright branch 2 times, most recently from 8c168f1 to 3c8124f Compare May 3, 2024 18:26
@raethlein raethlein force-pushed the tests/migrate-st-header-to-playwright branch from 3c8124f to 55ed99a Compare May 3, 2024 18:58
@raethlein raethlein merged commit facd80e into develop May 3, 2024
34 checks passed
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

2 participants