Skip to content

Commit

Permalink
feat(tags-input): add test for editing tag with mouse double click (#921
Browse files Browse the repository at this point in the history
)

test(tags-input): add test for editing tag with mouse double click
  • Loading branch information
ojj1123 authored Oct 3, 2023
1 parent 169f6bd commit 2cc6911
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions e2e/tags-input.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,30 @@ test.describe("tags-input", () => {
await expect(page.locator(input)).toBeFocused()
})

test("edit tag with mouse double click", async ({ page }) => {
const svelte = item("Svelte")
await page.type(input, svelte.text)
await page.keyboard.press("Enter")

const solid = item("Solid")
await page.type(input, solid.text)
await page.keyboard.press("Enter")

await page.locator(svelte.tag).dblclick()

await expect(page.locator(svelte.input)).toBeFocused()
await expect(page.locator(svelte.input)).toHaveValue("Svelte")

const jenkins = item("Jenkins")
await page.keyboard.type(jenkins.text)
await page.keyboard.press("Enter")

await expectToBeHighlighted(page.locator(jenkins.tag))
await expect(page.locator(jenkins.input)).toBeHidden()

await expect(page.locator(input)).toBeFocused()
})

test("add tags from paste event", async ({ page }) => {
await page.check(testid("addOnPaste"))
await page.focus(input)
Expand Down

4 comments on commit 2cc6911

@vercel
Copy link

@vercel vercel bot commented on 2cc6911 Oct 3, 2023

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on 2cc6911 Oct 3, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

zag-solid – ./examples/solid-ts

zag-solid-chakra-ui.vercel.app
zag-solid.vercel.app
zag-solid-git-main-chakra-ui.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 2cc6911 Oct 3, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

zag-vue – ./examples/vue-ts

zag-vue-git-main-chakra-ui.vercel.app
zag-vue-chakra-ui.vercel.app
zag-vue.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 2cc6911 Oct 3, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

zag-nextjs – ./examples/next-ts

zag-nextjs-git-main-chakra-ui.vercel.app
zag-two.vercel.app
zag-nextjs-chakra-ui.vercel.app

Please sign in to comment.