Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.DS_Store

node_modules
build/*
node_modules
pnpm-lock.yaml
54 changes: 36 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,36 @@ This repo is the home of happo.io documentation, served at docs.happo.io

## 3.58.0

- Document new `flake` webhook event type with example payloads and field reference
- Document new `flake` webhook event type with example payloads and field
reference
- Update happo dependency from 6.10.8 to 6.11.0
- Update React and React DOM to 19.2.6

## 3.57.3

- Add Local development guide documenting how to run Happo locally using the --only flag
- Add Local development guide documenting how to run Happo locally using the
--only flag

## 3.57.2

- Improve SSO documentation with signing requirements and attribute mapping details
- Clarify SHA-256 signing requirement and assertion vs response signature distinction
- Improve SSO documentation with signing requirements and attribute mapping
details
- Clarify SHA-256 signing requirement and assertion vs response signature
distinction
- Document full attribute mapping support for email, name, picture, and roles
- Add guidance on certificate handling, rotation, and domain uniqueness
- Provide quickstart callouts for major IdPs including Okta, Google Workspace, and Entra ID
- Provide quickstart callouts for major IdPs including Okta, Google Workspace,
and Entra ID

## 3.57.1

- Add troubleshooting guidance for guest and cross-tenant sign-in issues (AADSTS650059) with signInAudience manifest fix
- Add troubleshooting guidance for guest and cross-tenant sign-in issues
(AADSTS650059) with signInAudience manifest fix

## 3.57.0

- Document --skip flag usage on Custom, Playwright, and Cypress integration pages
- Document --skip flag usage on Custom, Playwright, and Cypress integration
pages

## 3.56.0

Expand All @@ -37,19 +44,22 @@ This repo is the home of happo.io documentation, served at docs.happo.io

## 3.55.2

- Add documentation for partial runs feature using --only and --skip CLI options to reduce quota usage and speed up CI [by @trotzig in #285]
- Add documentation for partial runs feature using --only and --skip CLI options
to reduce quota usage and speed up CI [by @trotzig in #285]
- Update happo dependency to 6.10.2
- Update prettier to 3.8.3
- Update release-with-ease to 2.2.0

## 3.55.1

- Document --skip and --only CLI arguments for filtering test execution
- Replace deprecated --skippedExamples reference with current argument documentation
- Replace deprecated --skippedExamples reference with current argument
documentation

## 3.55.0

- Fix broken links in documentation that were inadvertently broken during conversion from .md to .mdx files
- Fix broken links in documentation that were inadvertently broken during
conversion from .md to .mdx files
- Update prettier to 3.8.2
- Update react and react-dom to 19.2.5

Expand All @@ -61,7 +71,8 @@ This repo is the home of happo.io documentation, served at docs.happo.io

## 3.53.0

- Document autoApplyPseudoStateAttributes integration option for enhanced pseudo-state handling
- Document autoApplyPseudoStateAttributes integration option for enhanced
pseudo-state handling
- Update happo dependency to 6.8.0 with latest improvements
- Update release-with-ease dependency to 2.0.2

Expand All @@ -74,20 +85,27 @@ This repo is the home of happo.io documentation, served at docs.happo.io
## 3.51.0

- Reframe native apps as a first-class use case in documentation
- Apply installation partial to full-page, CLI, and getting-started docs for improved consistency
- Apply installation partial to full-page, CLI, and getting-started docs for
improved consistency

## 3.50.0

- Document all five deepCompare configuration options (compareThreshold, diffAlgorithm, ignoreThreshold, ignoreWhitespace, applyBlur) with reference tables
- Support auto-chunking via estimatedSnapsCount for custom integrations, removing need for manual chunks configuration
- Document all five deepCompare configuration options (compareThreshold,
diffAlgorithm, ignoreThreshold, ignoreWhitespace, applyBlur) with reference
tables
- Support auto-chunking via estimatedSnapsCount for custom integrations,
removing need for manual chunks configuration
- Document --skippedExamples option for filtering snapshot examples
- Reduce documentation duplication by extracting shared MDX partials for installation, API keys, and troubleshooting
- Improve accessibility with increased color contrast for links in code blocks and throughout documentation
- Reduce documentation duplication by extracting shared MDX partials for
installation, API keys, and troubleshooting
- Improve accessibility with increased color contrast for links in code blocks
and throughout documentation
- Add package manager tabs (npm, pnpm, yarn) to installation instructions

## 3.49.1

- Add documentation for merge ref checkouts to improve discoverability of this workflow
- Add documentation for merge ref checkouts to improve discoverability of this
workflow

## 3.49.0

Expand Down Expand Up @@ -167,7 +185,7 @@ This repo is the home of happo.io documentation, served at docs.happo.io

## 3.40.0

- Graduate next docs to current
- Graduate next docs to current
- Update CLI documentation to reflect new flags

## 3.39.0
Expand Down
6 changes: 5 additions & 1 deletion buildHappoCustom.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ happoCustom.registerExample({
console.log(`Generated bundle.js with ${examples.length} examples`);
console.log(`Custom package created in: ${buildDir}`);

return { rootDir: buildDir, entryPoint: 'bundle.js', estimatedSnapsCount: examples.length * 2 };
return {
rootDir: buildDir,
entryPoint: 'bundle.js',
estimatedSnapsCount: examples.length * 2,
};
}

// Run the function if this file is executed directly
Expand Down
4 changes: 2 additions & 2 deletions docs/_partials/email-notifications.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### Email notifications

If you set the `--notify` CLI argument as part of your {props.framework} run, an email
will be sent out when the Happo comparison report is ready.
If you set the `--notify` CLI argument as part of your {props.framework} run, an
email will be sent out when the Happo comparison report is ready.

Usage instructions for `--notify` are available in
[the Continuous Integration docs](continuous-integration.md#email-notifications).
4 changes: 2 additions & 2 deletions docs/_partials/styles-missing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ happened:
something like `#start-page .header { color: red }` and screenshoot `.header`,
the red color will be missing. This is because Happo only sees the `.header`
element, never the surrounding page.
- There could be a bug in how `{props.module}` collects styles and assets.
Reach out to support@happo.io and we'll triage.
- There could be a bug in how `{props.module}` collects styles and assets. Reach
out to support@happo.io and we'll triage.
12 changes: 6 additions & 6 deletions docs/accessibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ We support multiple WCAG conformance levels:
### Configuring axe options

Happo workers read an optional `window.happoAxeOptions` object before running
accessibility checks. When present, the options you specify are merged in on
top of the Happo defaults, which lets you tweak the axe-core run without
replacing the defaults wholesale. See the
accessibility checks. When present, the options you specify are merged in on top
of the Happo defaults, which lets you tweak the axe-core run without replacing
the defaults wholesale. See the
[axe-core API reference](https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#options-parameter)
for the full list of supported options.

Expand All @@ -96,8 +96,8 @@ Where you define `window.happoAxeOptions` depends on your testing framework.

#### Storybook

Set the options in `.storybook/preview.js` so they are defined before any
story is rendered:
Set the options in `.storybook/preview.js` so they are defined before any story
is rendered:

```js title=".storybook/preview.js"
import 'happo/storybook/register';
Expand Down Expand Up @@ -144,7 +144,7 @@ options are set on every page load, before any app code runs:
```js title="cypress/support/e2e.js"
import 'happo/cypress';

Cypress.on('window:before:load', (win) => {
Cypress.on('window:before:load', win => {
win.happoAxeOptions = {
rules: {
'color-contrast': { enabled: false },
Expand Down
24 changes: 11 additions & 13 deletions docs/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ needs.

## Authentication

The `happo` CLI requires authentication to communicate with the happo.io service.
You can authenticate in two ways:
The `happo` CLI requires authentication to communicate with the happo.io
service. You can authenticate in two ways:

1. **API Key and Secret** (recommended for CI and production): Provide `apiKey`
and `apiSecret` in your configuration file or as environment variables. See
Expand Down Expand Up @@ -86,7 +86,6 @@ npm run happo finalize
npm run happo finalize --nonce [NONCE]
```


### Flake command

List [reported flakes](reporting-flake.md) for a project. By default, results
Expand Down Expand Up @@ -256,23 +255,22 @@ npm run happo --skip '[{"component":"Card"},{"component":"Button","variant":"pri
npm run happo --skip '[{"storyFile":"./src/stories/Card.stories.js"}]'
```

See [Partial runs](storybook#partial-runs) in the Storybook guide for how to
use `--skip` to reduce quota usage.
See [Partial runs](storybook#partial-runs) in the Storybook guide for how to use
`--skip` to reduce quota usage.

### `--only <json>`

JSON array of components or story files to exclusively render, skipping all
others. Uses the same entry format as [`--skip`](#--skip-json). The
`storyFile` entry form is Storybook-only; the `component` form works for all
integrations.
others. Uses the same entry format as [`--skip`](#--skip-json). The `storyFile`
entry form is Storybook-only; the `component` form works for all integrations.

```sh
npm run happo --only '[{"component":"Card"},{"storyFile":"./src/stories/Button.stories.js"}]'
```

See [Partial runs](storybook#partial-runs) in the Storybook guide for how to
use `--only` to reduce quota usage, or [Local development](local-development)
for using it from a developer's machine.
See [Partial runs](storybook#partial-runs) in the Storybook guide for how to use
`--only` to reduce quota usage, or [Local development](local-development) for
using it from a developer's machine.

### `--githubToken <token>`

Expand All @@ -290,8 +288,8 @@ These options apply only to the `happo flake` command.

### `--allProjects`

List flakes across all projects. By default, only flakes for the current
project (from your config) are shown.
List flakes across all projects. By default, only flakes for the current project
(from your config) are shown.

```sh
npm run happo flake --allProjects
Expand Down
31 changes: 15 additions & 16 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,9 @@ When `true` (default behavior), media queries that use

### Target `allowPointerEvents`

Since v6.8.0, pointer events are allowed by default. Happo no longer injects
CSS to disable pointer events, so mouse interactions in tests work without any
extra configuration.
Since v6.8.0, pointer events are allowed by default. Happo no longer injects CSS
to disable pointer events, so mouse interactions in tests work without any extra
configuration.

If you notice unexpected diffs caused by hover effects, you can set
`allowPointerEvents: false` to restore the previous behavior:
Expand All @@ -392,9 +392,8 @@ export default defineConfig({
});
```

:::note
Before v6.8.0, the default was `allowPointerEvents: false`, which caused Happo
to inject this CSS:
:::note Before v6.8.0, the default was `allowPointerEvents: false`, which caused
Happo to inject this CSS:

```css
* {
Expand All @@ -403,8 +402,7 @@ to inject this CSS:
```

This prevented spurious hover effects but also caused Storybook interaction
tests that relied on pointer events to be silently skipped.
:::
tests that relied on pointer events to be silently skipped. :::

If you're interested in testing hover, focus, and active states with Happo, you
may also want to use the
Expand Down Expand Up @@ -475,13 +473,13 @@ export default defineConfig({
});
```

| Option | Type | Default | Description |
|---|---|---|---|
| `compareThreshold` | `number` | — | How different two pixels are allowed to be (0–1). Required when using deepCompare. |
| `diffAlgorithm` | `'color-delta'` \| `'ssim'` | `'color-delta'` | Algorithm used for pixel comparison. `'ssim'` is experimental. |
| `ignoreThreshold` | `number` | `0` | Fraction of pixels allowed to exceed `compareThreshold` before the screenshot is considered a diff (e.g. `0.01` = 1% of pixels). |
| `ignoreWhitespace` | `boolean` | `false` | When `true`, whitespace-only differences are ignored. |
| `applyBlur` | `boolean` | `false` | When `true`, a blur is applied before comparing to smooth out subtle edge differences. |
| Option | Type | Default | Description |
| ------------------ | --------------------------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `compareThreshold` | `number` | — | How different two pixels are allowed to be (0–1). Required when using deepCompare. |
| `diffAlgorithm` | `'color-delta'` \| `'ssim'` | `'color-delta'` | Algorithm used for pixel comparison. `'ssim'` is experimental. |
| `ignoreThreshold` | `number` | `0` | Fraction of pixels allowed to exceed `compareThreshold` before the screenshot is considered a diff (e.g. `0.01` = 1% of pixels). |
| `ignoreWhitespace` | `boolean` | `false` | When `true`, whitespace-only differences are ignored. |
| `applyBlur` | `boolean` | `false` | When `true`, a blur is applied before comparing to smooth out subtle edge differences. |

## `integration`

Expand Down Expand Up @@ -650,7 +648,8 @@ When set to `true`, Happo automatically collects and represents `:focus`,
capture interactive states without manually adding `data-happo-*` attributes to
your markup.

This option requires the [`applyPseudoClasses` target option](#target-applypseudoclasses).
This option requires the
[`applyPseudoClasses` target option](#target-applypseudoclasses).

```js title="happo.config.ts"
import { defineConfig } from 'happo';
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ consists of a set of components and variants of those components. There are many
ways to do this, and it all depends on your existing tech stack, your
application, experience with other test frameworks, and more.

- A [Storybook](storybook.mdx) application can serve as the test suite driver for
Happo.
- A [Storybook](storybook.mdx) application can serve as the test suite driver
for Happo.
- By integrating Happo with [Cypress](cypress.mdx) or
[Playwright](playwright.mdx), you can turn your end-to-end tests into a Happo
test suite.
Expand Down
Loading
Loading