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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# @webship/diffy-steps
# @webship-js/diffy-steps

[![Test](https://github.com/webship/diffy-steps/actions/workflows/test.yml/badge.svg)](https://github.com/webship/diffy-steps/actions/workflows/test.yml)

Diffy-specific Cucumber step definitions for [webship-js](https://www.npmjs.com/package/webship-js) — a Playwright + Cucumber BDD testing framework. `@webship/diffy-steps` adds a `diffy.steps.js` step-pack that captures full-page Playwright screenshots at multiple breakpoints and drives [Diffy](https://diffy.website) visual-regression comparisons through the Diffy REST API, so you can express visual checks as readable Gherkin instead of hand-rolling API calls.
Diffy-specific Cucumber step definitions for [webship-js](https://www.npmjs.com/package/webship-js) — a Playwright + Cucumber BDD testing framework. `@webship-js/diffy-steps` adds a `diffy.steps.js` step-pack that captures full-page Playwright screenshots at multiple breakpoints and drives [Diffy](https://diffy.website) visual-regression comparisons through the Diffy REST API, so you can express visual checks as readable Gherkin instead of hand-rolling API calls.

It is a **plugin for webship-js** — it does not run standalone. It ships one file of step definitions; you drop it into an existing (or new) webship-js test project.

Expand All @@ -27,7 +27,7 @@ See [tests/step-definitions/diffy.steps.js](tests/step-definitions/diffy.steps.j
## Installation

```bash
npm install --save-dev webship-js @webship/diffy-steps
npm install --save-dev webship-js @webship-js/diffy-steps
```

Add both step-definition paths to your project's `cucumber.js`:
Expand All @@ -37,7 +37,7 @@ module.exports = {
default: {
require: [
'node_modules/webship-js/tests/step-definitions/**/*.js', // webship-js core steps
'node_modules/@webship/diffy-steps/tests/step-definitions/**/*.js', // this plugin
'node_modules/@webship-js/diffy-steps/tests/step-definitions/**/*.js', // this plugin
'tests/step-definitions/**/*.js', // your own custom steps, if any
],
paths: ['tests/features/**/*.feature'],
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @webship/diffy-steps documentation
# @webship-js/diffy-steps documentation

Per-step reference for the `@webship/diffy-steps` plugin for [webship-js](https://www.npmjs.com/package/webship-js).
Per-step reference for the `@webship-js/diffy-steps` plugin for [webship-js](https://www.npmjs.com/package/webship-js).

Start with the [root README](../README.md) for installation, configuration, and the environment-variable table. The [step-definitions README](../tests/step-definitions/README.md) carries the deep reference: the adoption walkthrough, the Diffy REST API endpoint map, the Diffy-side IP allow-list, and links into Diffy's own documentation.

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@webship/diffy-steps",
"name": "@webship-js/diffy-steps",
"version": "2.0.0",
"description": "Diffy-specific Cucumber step definitions plugin for webship-js — visual-regression testing for any site via the Diffy REST API (Playwright + Cucumber).",
"main": "tests/step-definitions/diffy.steps.js",
Expand Down
10 changes: 5 additions & 5 deletions tests/step-definitions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ and links into Diffy's own documentation.
Install the plugin alongside webship-js:

```bash
npm install --save-dev webship-js @webship/diffy-steps
npm install --save-dev webship-js @webship-js/diffy-steps
```

`diffy.steps.js` pulls in `axios` (a direct dependency of this package) plus
Expand All @@ -45,7 +45,7 @@ module.exports = {
requireModule: ['tsx/cjs'],
require: [
'node_modules/webship-js/tests/step-definitions/**/*.js',
'node_modules/@webship/diffy-steps/tests/step-definitions/**/*.js',
'node_modules/@webship-js/diffy-steps/tests/step-definitions/**/*.js',
'tests/step-definitions/**/*.js',
],
paths: ['tests/features/**/*.feature'],
Expand Down Expand Up @@ -126,7 +126,7 @@ option.
Start from one of this repository's reference features:

```bash
cp node_modules/@webship/diffy-steps/tests/features/01-example-demo.feature \
cp node_modules/@webship-js/diffy-steps/tests/features/01-example-demo.feature \
tests/features/my-visual-regression.feature
```

Expand Down Expand Up @@ -157,8 +157,8 @@ examples (GitHub Actions, CircleCI, Tugboat, Platform.sh).
### Remove Diffy later (reversible)

```bash
npm uninstall @webship/diffy-steps
# then remove the 'node_modules/@webship/diffy-steps/**' line from cucumber.js require:
npm uninstall @webship-js/diffy-steps
# then remove the 'node_modules/@webship-js/diffy-steps/**' line from cucumber.js require:
# and delete your own @diffy feature files.
```

Expand Down
2 changes: 1 addition & 1 deletion tests/step-definitions/diffy.steps.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

// ---------------------------------------------------------------------------
// @webship/diffy-steps — Diffy visual-regression step definitions for webship-js
// @webship-js/diffy-steps — Diffy visual-regression step definitions for webship-js
//
// Plugin for webship-js (https://www.npmjs.com/package/webship-js): relies on
// the World it installs (this.page, this.parameters) and adds nothing to it.
Expand Down
Loading