The open source visual testing platform for teams and AI agents.
Official Argos Cypress integration
Capture stable Argos screenshots from your Cypress tests.
Visit the Cypress SDK documentation for guides, the API reference, and more.
Installation
npm install --save-dev @argos-ci/cypress
Usage
Register the Argos task in your Cypress config:
// cypress.config.js
const { defineConfig } = require("cypress");
const { registerArgosTask } = require("@argos-ci/cypress/task");
module.exports = defineConfig({
e2e: {
setupNodeEvents(on, config) {
registerArgosTask(on, config, {
// Upload the screenshots to Argos only on CI.
uploadToArgos: !!process.env.CI,
});
return config;
},
},
});
Import the command in your support file:
// cypress/support/e2e.js
import "@argos-ci/cypress/support";
Then capture stable screenshots with cy.argosScreenshot in your tests:
// cypress/e2e/example.cy.js
describe("Homepage", () => {
it("takes a screenshot", () => {
cy.visit("http://localhost:3000");
cy.argosScreenshot("homepage");
});
});