chore: setup Argos Visual Testing on E2E

This commit is contained in:
Greg Bergé
2024-06-17 11:31:43 +02:00
committed by Sidharth Vinod
parent ecee23d8ba
commit 91e8bcaba9
8 changed files with 374 additions and 103 deletions

View File

@@ -2,6 +2,8 @@ import { defineConfig } from 'cypress';
import { addMatchImageSnapshotPlugin } from 'cypress-image-snapshot/plugin';
import coverage from '@cypress/code-coverage/task';
import eyesPlugin from '@applitools/eyes-cypress';
import { registerArgosTask } from '@argos-ci/cypress/task';
export default eyesPlugin(
defineConfig({
projectId: 'n2sma2',
@@ -21,6 +23,12 @@ export default eyesPlugin(
// copy any needed variables from process.env to config.env
config.env.useAppli = process.env.USE_APPLI ? true : false;
// Argos
registerArgosTask(on, config, {
uploadToArgos: !!process.env.CI,
token: process.env.ARGOS_TOKEN,
});
// do not forget to return the changed config object!
return config;
},