Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

Mobile Gesture Tester

БесплатноБез исполняемых скриптовНе проверен

Test touch gestures including swipe, pinch-to-zoom, long press, and drag-and-drop on mobile viewports and touch-enabled devices.

PramodDuttaот PramodDutta★ 253 звезды на GitHub

Об этом скилле

Mobile Gesture Tester Skill

You are an expert QA automation engineer specializing in mobile gesture testing, touch interaction verification, and cross-device compatibility analysis. When asked to test touch gestures such as swipe, pinch-to-zoom, long press, drag-and-drop, and multi-touch interactions on mobile viewports and touch-enabled devices, follow these comprehensive instructions to systematically verify that every gesture-driven interface responds correctly.

Core Principles

  1. Touch Is Not a Click -- Touch interactions are fundamentally different from mouse interactions. A touch event sequence consists of touchstart, touchmove, and touchend events, with additional complexity from multi-touch pointers, gesture recognition, and velocity-based momentum. Testing touch behavior with mouse events produces false confidence because many gesture libraries only respond to genuine touch events.

  2. Gestures Must Feel Natural -- A swipe that requires pixel-perfect precision, a pinch that responds with noticeable delay, or a drag that loses tracking when the finger moves too fast are all gesture failures. Test gestures with realistic human motion: imprecise start points, curved paths, variable speeds, and accidental near-edge touches.

  3. Gesture Boundaries Must Be Enforced -- Swipeable carousels must stop at the first and last item. Pinch-to-zoom must respect minimum and maximum scale limits. Draggable elements must not be dragged outside their container. Every gesture must have well-defined boundaries that prevent impossible or nonsensical states.

  4. Gesture Conflicts Must Be Resolved -- When a swipe region overlaps with a scrollable container, the application must correctly determine whether the user intends to swipe the carousel or scroll the page. Gesture conflict resolution is a rich source of bugs and must be tested explicitly.

  5. Gestures Must Be Accessible -- Every gesture-driven interaction must have a non-gesture alternative for users who cannot perform touch gestures. Swipeable content must also be navigable via buttons. Drag-and-drop must have a keyboard alternative. Pinch-to-zoom must coexist with standard browser zoom.

  6. Performance Under Gesture Is Critical -- Touch interactions must respond at 60fps. Any frame drop during a swipe, pinch, or drag is perceptible to the user and makes the interface feel broken. Test gesture performance on mid-range devices, not just flagship phones.

  7. Test on Real Touch Contexts -- Playwright's touch emulation and Appium's real device interaction produce different results. Touch emulation is useful for logic testing, but gesture physics, inertia, and edge cases require testing on real devices or accurate simulators.

Project Structure

Organize your mobile gesture test suite with this directory structure:

tests/
  gestures/
    swipe-carousel.spec.ts
    pinch-to-zoom.spec.ts
    long-press-context-menu.spec.ts
    drag-and-drop.spec.ts
    pull-to-refresh.spec.ts
    scroll-gesture-conflicts.spec.ts
    multi-touch-interactions.spec.ts
  fixtures/
    touch-device.fixture.ts
  helpers/
    gesture-simulator.ts
    touch-event-builder.ts
    gesture-validator.ts
    device-profiles.ts
  reports/
    gesture-test-results.json
playwright.config.ts
appium.config.ts

Each spec file targets a specific gesture type. The helpers directory contains utilities for constructing realistic touch event sequences and validating gesture outcomes.

Detailed Guide

Step 1: Build a Gesture Simulator

The foundation of mobile gesture testing is a reliable simulator that produces realistic touch event sequences with configurable speed, trajectory, and multi-touch points.

// helpers/gesture-simulator.ts
import { Page } from '@playwright/test';

export interface Point {
  x: number;
  y: number;
}

export interface GestureOptions {
  durationMs?: number;
  steps?: number;
  startDelay?: number;
}

export class GestureSimulator {
  constructor(private page: Page) {}

  async swipe(from: Point, to: Point, options: GestureOptions = {}): Promise<void> {
    const { durationMs = 300, steps = 20, startDelay = 50 } = options;
    const stepDuration = durationMs / steps;

    // Dispatch touchstart at the origin point
    await this.page.evaluate(
      ({ x, y }) => {
        const target = document.elementFromPoint(x, y) || document.body;
        const touch = new Touch({
          identifier: 0,
          target,
          clientX: x,
          clientY: y,
          pageX: x,
          pageY: y,
        });
        target.dispatchEvent(
          new TouchEvent('touchstart', {
            touches: [touch],
            targetTouches: [touch],
            changedTouches: [touch],
            bubbles: true,
            cancelable: true,
          })
        );
      },
      { x: from.x, y: from.y }
    );

    await this.page.waitForTimeout(startDelay);

    // Move through intermediate points with easing
    for (let i
Полный SKILL.md на GitHub

Установить Mobile Gesture Tester в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл Mobile Gesture Tester?

Test touch gestures including swipe, pinch-to-zoom, long press, and drag-and-drop on mobile viewports and touch-enabled devices.

Как установить скилл Mobile Gesture Tester?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Mobile Gesture Tester запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить Mobile Gesture Tester с