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 gr.Image
interaction test + gr.ImageEditor
interaction test improvement
#7309
Conversation
🪼 branch checks and previews
|
🦄 change detectedThis Pull Request includes changes to the following packages.
With the following changelog entry.
Maintainers or the PR author can modify the PR title to modify this entry.
|
…radio into story-source-select
gr.Image
gr.Image
gr.Image
gr.Image
interaction test + gr.ImageEditor
interaction test improvement
@@ -51,6 +51,9 @@ | |||
|
|||
<Story | |||
name="Image Editor Interactions" | |||
parameters={{ | |||
diffThreshold: 0.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
on:click={select_source} | ||
aria-label={mode === "image" ? "capture photo" : "start recording"} | ||
aria-label="select input source" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks @hannahblair!
Let me merge this in so that tests on other PRs are not flaky |
…mprovement (#7309) * add source selection interaction story * add changeset * add source selection e2e test * add changeset * add diff threshold to imageeditor story * remove redundant <button> * add changeset * typo * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Description
This PR adds an interaction test to assert the source selection in
gr.Image
behaves as expected. Note, we can't do a storybook story for this because storybook doesn't provide access to the browser context to allow us to access the permissions API and grant camera access - but we can do this with playwright.Closes: #7308
Closes: #7310
🎯 PRs Should Target Issues
Before your create a PR, please check to see if there is an existing issue for this change. If not, please create an issue before you create this PR, unless the fix is very small.
Not adhering to this guideline will result in the PR being closed.
Tests
PRs will only be merged if tests pass on CI. To run the tests locally, please set up your Gradio environment locally and run the tests:
bash scripts/run_all_tests.sh
You may need to run the linters:
bash scripts/format_backend.sh
andbash scripts/format_frontend.sh