]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
test(e2e): Replace deprecated 'clickCount' property with 'count' (#12778)
authorJeff Muizelaar <jrmuizel@gmail.com>
Wed, 29 Jan 2025 12:22:20 +0000 (07:22 -0500)
committerGitHub <noreply@github.com>
Wed, 29 Jan 2025 12:22:20 +0000 (20:22 +0800)
This fixes double clicks when using WebDriver BiDi.
See https://github.com/puppeteer/puppeteer/issues/13550

packages/vue/__tests__/e2e/todomvc.spec.ts
packages/vue/__tests__/e2e/tree.spec.ts

index 6283172c396668fd0a35ecbe3a12f9c8b5d87e15..c76bba5351558766b6b0f108ea5fcbfddcfc9123 100644 (file)
@@ -139,7 +139,7 @@ describe('e2e: todomvc', () => {
     // editing triggered by blur
     await click('.filters li:nth-child(1) a')
     await timeout(1)
-    await click('.todo:nth-child(1) label', { clickCount: 2 })
+    await click('.todo:nth-child(1) label', { count: 2 })
     expect(await count('.todo.editing')).toBe(1)
     expect(await isFocused('.todo:nth-child(1) .edit')).toBe(true)
     await clearValue('.todo:nth-child(1) .edit')
@@ -149,13 +149,13 @@ describe('e2e: todomvc', () => {
     expect(await text('.todo:nth-child(1) label')).toBe('edited!')
 
     // editing triggered by enter
-    await click('.todo label', { clickCount: 2 })
+    await click('.todo label', { count: 2 })
     await enterValue('.todo:nth-child(1) .edit', 'edited again!')
     expect(await count('.todo.editing')).toBe(0)
     expect(await text('.todo:nth-child(1) label')).toBe('edited again!')
 
     // cancel
-    await click('.todo label', { clickCount: 2 })
+    await click('.todo label', { count: 2 })
     await clearValue('.todo:nth-child(1) .edit')
     await page().type('.todo:nth-child(1) .edit', 'edited!')
     await page().keyboard.press('Escape')
@@ -163,7 +163,7 @@ describe('e2e: todomvc', () => {
     expect(await text('.todo:nth-child(1) label')).toBe('edited again!')
 
     // empty value should remove
-    await click('.todo label', { clickCount: 2 })
+    await click('.todo label', { count: 2 })
     await enterValue('.todo:nth-child(1) .edit', ' ')
     expect(await count('.todo')).toBe(3)
 
index 8c12537aeb04758440f702263b789e259872871f..557712bc9dbd3e7cd113464f9c7bfa75be35b725 100644 (file)
@@ -88,7 +88,7 @@ describe('e2e: tree', () => {
     expect(await isVisible('#demo ul')).toBe(true)
     expect(await text('#demo li div span')).toContain('[-]')
 
-    await click('#demo ul > .item div', { clickCount: 2 })
+    await click('#demo ul > .item div', { count: 2 })
     expect(await count('.item')).toBe(15)
     expect(await count('.item > ul')).toBe(5)
     expect(await text('#demo ul > .item:nth-child(1)')).toContain('[-]')