Skip to content

About

Self-driving in-SPA visual capture + regression runner (reusable across Tiny Electrons apps)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

17 Commits

Folders and files

Repository files navigation

@tiny-electrons/voxissue-sdk

Drives a web app suite-by-suite and signals the VoxIssue iOS app when to take screenshots.

The SDK never takes screenshots itself. Capture is native: the VoxIssue app snapshots its WKWebView when the SDK fires the shutter hooks (window.vi.capture() / window.vi.done()). Outside the VoxIssue app a run is a dry-run — navigation and readiness checks only.

Install

"@tiny-electrons/voxissue-sdk": "git+https://github.com/Tiny-Electrons-LLC/voxissue-sdk.git#v0.3.0"

Public git dependency — installs from the public voxissue-sdk repo, no token required. Learn more at voxissue.com.

What it does

  • Suites (defineSuite): declarative scenarios — route, readiness signal, actions, capture checkpoints.
  • Runner: navigates the app through each scenario, waits for real readiness (data-visual-ready, network quiet, asset settle), and signals the native shutter at each checkpoint.
  • VoxIssue host detection (isMipHost()): inside the app's capture web view the run auto-starts once per capture session, headless, and signals done() at the end so the app advances.
  • Gate (isVisualTestingAllowed): dev/staging/staff-only exposure so the tool never reaches customers.

Vue

import { createVisualTesting, isVisualTestingAllowed, useVisualReady } from '@tiny-electrons/voxissue-sdk/vue'

const controller = createVisualTesting({ router, suites })

Pages signal readiness by binding the marker to their loading state:

<div :data-visual-ready="loading ? null : 'devices-page'">

React

import { createVisualTesting, useVisualReady } from '@tiny-electrons/voxissue-sdk/react'

const controller = createVisualTesting({
  navigate: (route) => router.navigate(route),   // e.g. react-router
  suites,
})

function DevicesPage({ loading }) {
  const readyRef = useVisualReady('devices-page', !loading)
  return <div ref={readyRef}>…</div>
}

Suites

import { defineSuite } from '@tiny-electrons/voxissue-sdk'

export const mobileSuite = defineSuite({
  id: 'mobile-full',
  name: 'Full Mobile UI',
  scenarios: [
    {
      id: 'devices',
      name: 'Devices',
      route: '/devices',
      waitFor: 'devices-page',
      captures: [
        { id: 'top', scroll: 'top' },
        { id: 'middle', scrollPercent: 0.5 },
        { id: 'bottom', scroll: 'bottom' },
      ],
    },
  ],
})

A scenario whose ready signal never fires is still captured after a soft timeout, so an empty tenant can't blank a run.

About

Self-driving in-SPA visual capture + regression runner (reusable across Tiny Electrons apps)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages