본문으로 건너뛰기
cccskills
무료GitHub에 공개

creating-visual-test-examples

Build Handsontable demo pages for visual regression tests, which compare screenshots for appearance changes. It guides feature routes, URL-driven display states, sample data, and decisions about testing the same feature across framework wrappers.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Use when adding or changing a demo the visual regression suite photographs - the Vite-based demo apps in examples/next/visual-tests/<framework>/demo/, the js Navigo router with one /<feature>-demo route per feature, the shared / grid that must stay identical across frameworks, and the sample-data patterns

설치 방법 보기

이럴 때 유용합니다

  • Adding a demo route for a new feature
  • Creating multiple visual states through URL parameters
  • Planning visual coverage across framework wrappers
  • Preparing sample data for screenshot tests

포함된 파일(1)

  • SKILL.md5.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Creating Visual Test Examples

Covers the demo apps the visual suite (visual-tests/) renders: examples/next/visual-tests/{js,react-wrapper,vue3,angular-wrapper}/demo/, served on port 8082 by visual-tests/scripts/run-tests.mjs. The documentation examples in examples/next/docs/ are another tree, owned by the creating-docs-examples skill, and the visual suite does not serve it.

Decision rule

A new feature gets its own /<feature>-demo route on the js demo's router, and the shared / demo stays unchanged. A screenshot proves pixels only, so the visual spec that photographs the route is in addition to, never instead of a Playwright assertion in tests/e2e. The paragraph, the measured numbers, and the wrapper-coverage trade-off are visual-tests/AGENTS.md → Decision rule.

Example location

The js demo is one Vite app with a Navigo router (examples/next/visual-tests/js/demo/src/index.js): / renders the shared multi-feature grid (src/demos/default/), and each feature has a /<name>-demo route backed by a src/demos/<name>/ module. The wrapper demos serve / only, plus /scenario-grid in react-wrapper and angular-wrapper (vue3 has no router).

Directory structure

examples/next/visual-tests/js/demo/
  index.html          # <div id="root">
  src/
    index.js          # The Navigo router: `/` plus one `/<name>-demo` route per feature
    data.js           # Shared sample data
    utils.js          # URL helpers (theme, direction, per-route params)
    demos/
      default/        # The shared `/` grid, frozen; the multi-frameworks specs photograph it
      <name>/         # One module per feature route, exporting `init()`
    styles/           # `styles.css` for `/`, `<name>-demo.css` for a route that needs one
  spec/
    Smoke.spec.js     # Puppeteer smoke test

How to add a feature route

1. Create the module. src/demos/<feature>/index.js exports init(), which builds the grid inside #root. Read per-route options from the URL through getFromURL() in src/utils.js, so one route serves several visual states.

2. Register the route. In src/index.js, import the module and add '/<feature>-demo' next to the existing entries: removeCSS(), load the route's stylesheet (if any) and the theme through loadThemeCSS(), then call init().

3. Import from handsontable/base and register what the module needs. Do not import the full bundle into a new route:

import Handsontable from 'handsontable/base';
import { registerPlugin, ContextMenu, Filters } from 'handsontable/plugins';
import { registerCellType, NumericCellType } from 'handsontable/cellTypes';

registerPlugin(ContextMenu);
registerPlugin(Filters);
registerCellType(NumericCellType);

4. Write the visual spec under visual-tests/tests/js-only/<feature>/, navigating with goto(helpers.setBaseUrl('/<feature>-demo').getFullUrl()) (pattern: visual-testing skill).

5. Decide wrapper coverage out loud. A route exists on the js demo only, so the spec is js-only by construction. To photograph the feature under a wrapper, either extend / (every spec that photographs it re-captures on every variant, the change is declared with [visual budget: N – reason] in the pull request body, and the config is mirrored in all four demos) or add the route to react-wrapper/demo/src/index.tsx, angular-wrapper/demo/src/app/app.config.ts, and the Vue demo (no router today), a per-framework change. Trade-off: visual-tests/AGENTS.md → Decision rule.

The shared / grid

/ combines several features in one grid (column sorting + filters + dropdown menu + hidden columns + context menu, …) and the wrapper demos render the same grid. It is frozen: any change to its config that affects rendering (cell types, dateFormat, locale, formatting, data) must be mirrored in all three wrapper demos, or the js-copied baseline gotcha (visual-tests/AGENTS.md, Golden snapshots) turns it into a red nightly. Put new features on their own route.

Sample data, license, container

  • Put realistic sample data (company names, dates, currencies, countries; 20-50+ rows) in a data module (src/data.js is shared; a route can carry its own data.js).
  • Include licenseKey: 'non-commercial-and-evaluation'.
  • Mount inside #root; a route module appends its own container to it.

Smoke test

Every framework demo has spec/Smoke.spec.js, a Puppeteer test that asserts the grid rendered (await page.$('.handsontable td')). Base URL: process.env.TEST_URL || 'http://localhost:8080'.

Key reference

examples/next/visual-tests/js/demo/src/demos/default/index.js (shared grid) and src/demos/dialog/ (small single-feature route driven by URL parameters).

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Develop and modify the Handsontable Angular wrapper with guidance on component lifecycle, settings updates, and NgZone, which controls change detection. It also covers standalone examples, global configuration, and the build and test workflow.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Fix settings updates in the Angular wrapper
  • Review change detection around grid operations
  • Update examples to standalone components
handsontable/handsontable2.2만2026년 10월 19일 업데이트

Open local or public web pages in BrowserStack Live for checks on real mobile devices or desktop browsers. The skill prepares temporary access to a local server, launches the requested session, and shares its dashboard link.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Check a local page on an Android device
  • Open a page in Safari on an iPhone or iPad
  • Inspect behavior in a specific desktop browser
handsontable/handsontable2.2만2026년 10월 19일 업데이트

Prepare user-facing changelog entries for source code changes. The skill determines whether an entry is needed, classifies the change, writes a clear title, and uses the project CLI to create a JSON file tied to the pull request.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Add a changelog entry for a bug fix
  • Classify a new feature or behavior change
  • Explain a breaking change and its replacement
handsontable/handsontable2.2만2026년 10월 19일 업데이트

Explore relationships between functions and files using a prebuilt code graph, a map of code dependencies. Trace bugs, inspect callers and execution paths, and assess the impact of refactoring or proposed changes.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Explore callers and dependencies in unfamiliar code
  • Trace a bug across multiple files
  • Assess the impact of renaming or removing code
handsontable/handsontable2.2만2026년 10월 19일 업데이트

Work with Handsontable row and column positions by distinguishing source data, displayed order, and rendered cells. It guides index conversion and helps investigate misplaced data when sorting, filtering, hiding, or moving rows and columns.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Investigating misplaced rows or columns
  • Converting between source and displayed indexes
  • Combining filters with manual column movement
handsontable/handsontable2.2만2026년 10월 19일 업데이트

Create Handsontable documentation examples for JavaScript, TypeScript, React, Angular, and Vue. The skill explains source files, generated JavaScript, required imports and license settings, embedding examples in guides, and checking that each framework version displays correctly.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Adding a code example to a feature guide
  • Preparing examples for multiple frameworks
  • Generating JavaScript examples from TypeScript
handsontable/handsontable2.2만2026년 10월 19일 업데이트

handsontable의 스킬 모두 보기

이 스킬의 문제 신고