CodeceptJS ArgosCIHelper helper.
Argos handles its own 'commit status' or 'check' updates. When you approve screenshots, the status is automatically updated by Argos. Visual comparison does not take place during tests; it occurs separately within the Argos process.
NPM package: https://www.npmjs.com/package/codeceptjs-ArgosCIHelper
npm i codeceptjs-ArgosCIHelper --save-dev
This helper should be added in your codeceptjs config file: codecept.conf.*
Example:
{
...
helpers: {
ArgosCIHelper: {
require: 'codeceptjs-ArgosCIHelper',
token: process.env.ARGOS_TOKEN,
screenshotsDir: './output/screenshots',
},
}
}
...
}
- If there is no auto complete for
I
actor, try runningnpx codeceptjs def
Feature('Visual Regression Testing');
Scenario('Test home page visual appearance', async ({ I }) => {
I.amOnPage('/');
await I.takeScreenshot('home-page');
});
Output
CodeceptJS v3.6.5 #StandWithUkraine
Using test root "/Users/t/Desktop/projects/ArgosCIHelper/test"
Helpers: Playwright, ArgosCIHelper
Plugins: screenshotOnFail, tryTo, retryFailedStep, retryTo, eachElement
Visual Regression Testing --
[1] Starting recording promises
Timeouts:
› [Session] Starting singleton browser session
Test home page visual appearance
I am on page "/"
I take screenshot "home-page"
› Screenshot is saving to /Users/t/Desktop/projects/ArgosCIHelper/test/output/screenshots/home-page.png
Screenshot saved: ./output/screenshots/home-page.png
✔ OK in 1683ms
OK | 1 passed // 10s