https://github.com/visual-regression-tracker/agent-codeceptjs
https://github.com/visual-regression-tracker/agent-codeceptjs
typescript
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/visual-regression-tracker/agent-codeceptjs
- Owner: Visual-Regression-Tracker
- Created: 2020-07-21T16:21:56.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-17T02:58:45.000Z (over 3 years ago)
- Last Synced: 2025-09-02T12:42:41.593Z (10 months ago)
- Topics: typescript
- Language: TypeScript
- Size: 381 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Native integration for [CodeceptJS](https://github.com/codecept-js/CodeceptJS) with [Visual Regression Tracker](https://github.com/Visual-Regression-Tracker/Visual-Regression-Tracker)
[](https://www.codacy.com/gh/Visual-Regression-Tracker/agent-codeceptjs?utm_source=github.com&utm_medium=referral&utm_content=Visual-Regression-Tracker/agent-codeceptjs&utm_campaign=Badge_Grade)
## Npm
https://www.npmjs.com/package/@visual-regression-tracker/agent-codeceptjs
## Install
### Add package
`npm install @visual-regression-tracker/agent-codeceptjs`
### Add helper
Update `codeceptjs.conf.js`
```js
helpers: {
VisualRegressionTrackerHelper: {
require: "@visual-regression-tracker/agent-codeceptjs",
// URL where backend is running
// Required
apiUrl: "http://localhost:4200",
// Project name or ID
// Required
project: "Default project",
// User apiKey
// Required
apiKey: "tXZVHX0EA4YQM1MGDD",
// Current git branch
// Required
branchName: "develop",
// Log errors instead of throwing exceptions
// Optional - default false
enableSoftAssert: true,
// Unique ID related to one CI build
// Optional - default null
ciBuildId: "SOME_UNIQUE_ID",
},
}
```
### Update TypeScript Definitions
More on this in official COdeceptJS (docs)[https://codecept.io/commands/#typescript-definitions]
`npx codeceptjs def`
## Usage
### Setup
```js
I.vrtStart();
```
### Teardown
```js
I.vrtStop();
```
### Assert
```js
// default
I.vrtTrack("Default");
// With additional options
I.vrtTrack("Additional options", {
os: "windows",
device: "device",
browser: "chrome",
diffTollerancePercent: 1,
ignoreAreas: [
{
x: 10,
y: 10,
width: 200,
height: 200,
},
],
});
```
## Examples
https://github.com/Visual-Regression-Tracker/examples-js