Create a Visual Diff

Creates a visual diff between two screenshots. Any two screenshots can be compared, but they must be of the same screen type.

Arguments

  • service
    Create, or re-create the configured visualdiffs for the specified service.

  • preview
    Create, or re-create the configured visualdiffs for all services in the specified preview. Ignored if service is also specified

  • before
    The ID of the "before" screenshot. Ignored if service or preview are specified. Required if neither are specified.

  • after
    The ID of the "after" screenshot. The visual diff is linked to this screenshot. Ignored if service or preview are specifed. Required if neither are specified.

  • force
    When a visual diff is created, Tugboat caches it. Setting this to true forces Tugboat to re-create the visual diff and overwrite the cached copy. Default: false

Example

socket.emit('tugboat', 'visualdiffs', 'create', args, callback);

Output

The result includes the metadata for the visual diff that was created.

{
    "_id": "5cb78ccdfd2894ca0f74aa1c",
    "after": "5cb78ca8fd2894ca0f74a869",
    "before": "5cb77fe9fd2894ca0f747c56",
    "createdAt": "2019-04-17T20:30:05.720Z",
    "differences": 137683,
    "dimension": 1470000,
    "height": 1050,
    "size": 26092,
    "stale": false,
    "updatedAt": "2019-04-17T20:30:05.720Z",
    "width": 1400,
    "id": "5cb78ccdfd2894ca0f74aa1c",
    "type": "visualdiff",
    "visualdiff": "5cb78ccdfd2894ca0f74aa1c",
    "screenshot": "5cb78ca8fd2894ca0f74a869",
    "service": "5cb78c7197568d8f5aff1b89",
    "preview": "5cb78c6f97568d379cff1b86",
    "repo": "5cb78c6597568dfefaff1b83",
    "project": "5cad02084e25464fadde4aa8"
}

results matching ""

    No results matching ""