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 select slider to playwright #8703

Merged
merged 8 commits into from
May 21, 2024
Merged

Conversation

sfc-gh-wihuang
Copy link
Contributor

@sfc-gh-wihuang sfc-gh-wihuang commented May 17, 2024

Describe your changes

  • added fragment tests
  • added form tests
  • add clicking functionality tests
  • added dragging functionality tests
  • added left and right keys functionality tests
  • added tests for session state
  • added tests for key and help

GitHub Issue Link (if applicable)

Testing Plan

  • Explanation of why no additional tests are needed
  • Unit Tests (JS and/or Python)
  • E2E Tests
  • Any manual testing needed?

Contribution License Agreement

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

@sfc-gh-wihuang sfc-gh-wihuang marked this pull request as ready for review May 20, 2024 16:54
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 👍


# Move mouse to 500, 0 pixels on the screen to simulate dragging left
app.mouse.move(500, 0)
app.mouse.up()
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: This triggers a rerun or? maybe we add a wait_for_app_run(app) here as well to make this more obvious. The current setup should be pretty save regarding flakiness, but we had a couple of cases where adding this also improved flakiness

def format_option(option):
return f"Color: {option}"


w1 = st.select_slider(
"Label 1",
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: In many other widget tests we have been using the labels to give some indication of what the widgets is supposed to be tested for:

v6 = st.text_input("text input 6 (disabled)", "default text", disabled=True)

@sfc-gh-wihuang sfc-gh-wihuang merged commit d421861 into develop May 21, 2024
35 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

3 participants