Interface UploadParameters

interface UploadParameters {
    apiBaseUrl?: string;
    branch?: string;
    buildName?: string;
    commit?: string;
    files?: string[];
    ignore?: string[];
    metadata?: {
        testReport?: {
            stats?: { duration?: number; startTime?: string };
            status: "failed" | "passed" | "timedout" | "interrupted";
        };
    };
    mode?: "ci"
    | "monitoring";
    parallel?: false | { index?: number; nonce: string; total: number };
    previewUrl?: { baseUrl: string } | (url: string) => string;
    prNumber?: number;
    referenceBranch?: string;
    referenceCommit?: string;
    root?: string;
    threshold?: number;
    token?: string;
}

Properties

apiBaseUrl?: string

Base URL of Argos API

"https://api.argos-ci.com/v2/"
branch?: string

Git branch

buildName?: string

Name of the build used to trigger multiple Argos builds on one commit

commit?: string

Git commit

files?: string[]

Globs matching image file paths to upload

ignore?: string[]

Globs matching image file paths to ignore

["**/*.{png,jpg,jpeg}"]
metadata?: {
    testReport?: {
        stats?: { duration?: number; startTime?: string };
        status: "failed" | "passed" | "timedout" | "interrupted";
    };
}

Build metadata.

mode?: "ci" | "monitoring"

Mode of comparison applied

"ci"
parallel?: false | { index?: number; nonce: string; total: number }

Parallel test suite mode

Type declaration

  • false
  • { index?: number; nonce: string; total: number }
    • Optionalindex?: number

      The index of the parallel node

    • nonce: string

      Unique build ID for this parallel build

    • total: number

      The number of parallel nodes being ran

previewUrl?: { baseUrl: string } | (url: string) => string

Preview URL configuration. Accepts a base URL or a function that receives the URL and returns the preview URL.

prNumber?: number

Pull-request number

referenceBranch?: string

Branch used as baseline for screenshot comparison

referenceCommit?: string

Commit used as baseline for screenshot comparison

root?: string

Root directory to look for image to upload

process.cwd()
threshold?: number

Sensitivity threshold between 0 and 1. The higher the threshold, the less sensitive the diff will be.

0.5
token?: string

Argos repository token