-
npm install visualreg-codeceptjs
-
add the lib on the "codecept steps" (steps_file.js):
// in this file you can append custom step methods to 'I' object
const visualTest = require("@shelloliver/visualreg-codeceptjs")
module.exports = function () {
return actor({
visualTest
})
- use into the test
Example:
const { assert } = require('chai')
Scenario('test something', async (I) => {
I.amOnPage('https://github.com/Codeception/VisualCeption');
const output = await I.visualTest('someimage')
assert.equal(output, true)
});
open a issue or a PR :)