Skip to content

Commit

Permalink
Fix ImageEditor interaction story (#6809)
Browse files Browse the repository at this point in the history
* fix test + align + symbol to centre of button

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
  • Loading branch information
3 people committed Dec 18, 2023
1 parent 51bdf43 commit 1401d99
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/giant-mammals-design.md
@@ -0,0 +1,6 @@
---
"@gradio/imageeditor": minor
"gradio": minor
---

feat:Fix `ImageEditor` interaction story
6 changes: 5 additions & 1 deletion js/imageeditor/ImageEditor.stories.svelte
Expand Up @@ -105,7 +105,11 @@

await userEvent.click(canvas.getByLabelText("Color button"));

await userEvent.click(document.getElementsByClassName("color")[1]);
var availableColors = document.querySelectorAll(
"button.color:not(.empty):not(.selected):not(.hidden)"
);

await userEvent.click(availableColors[0]);

await userEvent.keyboard("{Escape}");

Expand Down
1 change: 1 addition & 0 deletions js/imageeditor/shared/tools/ColorSwatch.svelte
Expand Up @@ -104,6 +104,7 @@
.empty::after {
content: "+";
margin-bottom: var(--size-1);
}
.color {
Expand Down

0 comments on commit 1401d99

Please sign in to comment.