Skip to content

Instantly share code, notes, and snippets.

@t3easy
Created April 29, 2019 12:56
Show Gist options
  • Save t3easy/f19fe77695d08a8c109cff8a54f0d053 to your computer and use it in GitHub Desktop.
Save t3easy/f19fe77695d08a8c109cff8a54f0d053 to your computer and use it in GitHub Desktop.

Revisions

  1. t3easy created this gist Apr 29, 2019.
    21 changes: 21 additions & 0 deletions .gitlab-ci.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    compare:staging:live:
    image:
    name: bbcnews/wraith
    entrypoint: [""]
    tags:
    - docker
    - linux
    stage: compare
    only:
    - develop
    before_script:
    - wraith reset_shots .wraith.yml
    script:
    - wraith capture .wraith.yml
    allow_failure: true
    retry: 1
    artifacts:
    when: always
    paths:
    - shots/
    expire_in: 30 days
    39 changes: 39 additions & 0 deletions .wraith.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,39 @@
    ---
    # Headless browser option, phantomjs or casperjs
    browser: "phantomjs"

    # Type the name of the directory that shots will be stored in​
    directory: "shots"

    # Add only 2 domains, key will act as a label
    domains:
    live: "https://www.domain.tld"
    staging: "https://staging.domain.tld"

    # Amount of fuzz ImageMagick will use
    fuzz: "20%"

    # Choose how results are displayed, by default alphanumeric. Different screen widths are always grouped.
    # alphanumeric - all paths (with, and without, a difference) are shown, sorted by path
    # diffs_first - all paths (with, and without, a difference) are shown, sorted by difference size (largest first)
    # diffs_only - only paths with a difference are shown, sorted by difference size (largest first)
    mode: "diffs_first"

    paths:
    home: /
    product-x: /products/product-x
    product-y: /products/product-y

    screen_widths:
    - 360
    - 375
    - 1024
    - 1280
    - 1366
    - 1440
    - 1536
    - 1600
    - 1680
    - 1920

    threshold: 15