No clicks on mobile

This commit is contained in:
Austin Mroz
2026-03-30 17:30:20 -07:00
parent bbcc983190
commit 3a6c65a68c
2 changed files with 12 additions and 6 deletions

View File

@@ -35,4 +35,7 @@ export class MobileAppHelper {
private get page(): Page {
return this.comfyPage.page
}
async tap(locator: Locator, { count = 1 }: { count: number }) {
for (let i = 0; i < count; i++) await locator.tap()
}
}

View File

@@ -52,13 +52,16 @@ test.describe('App mode usage', () => {
const steps = comfyPage.page.getByRole('spinbutton')
await expect(steps).toHaveValue('20')
await comfyPage.page
.getByRole('button', { name: 'increment' })
.click({ clickCount: 5 })
await mobile.tap(
comfyPage.page.getByRole('button', { name: 'increment' }),
{ count: 5 }
)
await expect(steps).toHaveValue('25')
await comfyPage.page
.getByRole('button', { name: 'decrement' })
.click({ clickCount: 3 })
await mobile.tap(
comfyPage.page.getByRole('button', { name: 'decrement' }),
{ count: 3 }
)
await expect(steps).toHaveValue('22')
})