{"id":20350647,"url":"https://github.com/mwhitworth/percy_client","last_synced_at":"2025-10-11T11:15:50.771Z","repository":{"id":217695253,"uuid":"744553319","full_name":"mwhitworth/percy_client","owner":"mwhitworth","description":"Percy client for Elixir (using Wallaby)","archived":false,"fork":false,"pushed_at":"2024-04-01T14:00:53.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-19T01:49:27.591Z","etag":null,"topics":["elixir","percy-io","wallaby"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mwhitworth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-17T14:35:51.000Z","updated_at":"2024-11-04T21:20:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"8ee1b162-194a-450f-917b-4c4c6bed10e8","html_url":"https://github.com/mwhitworth/percy_client","commit_stats":null,"previous_names":["mwhitworth/percy_client"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mwhitworth/percy_client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwhitworth%2Fpercy_client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwhitworth%2Fpercy_client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwhitworth%2Fpercy_client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwhitworth%2Fpercy_client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mwhitworth","download_url":"https://codeload.github.com/mwhitworth/percy_client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwhitworth%2Fpercy_client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007037,"owners_count":26084227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elixir","percy-io","wallaby"],"created_at":"2024-11-14T22:32:51.780Z","updated_at":"2025-10-11T11:15:50.744Z","avatar_url":"https://github.com/mwhitworth.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Percy client for Elixir\n\nAn Elixir client for the visual testing and regression service [Percy](https://percy.io), following the instructions\nin the [\"Build your own SDK\" section](https://www.browserstack.com/docs/percy/integrate/build-your-sdk) of the documentation.\n\nThe full documentation for this library can found on [HexDocs](https://hexdocs.pm/).\n\n```elixir\ndefmodule MyApp.PercyTest do\n  use ExUnit.Case, async: true\n  use Wallaby.Feature\n\n  feature \"home page functionality\" do\n    session\n    |\u003e visit(\"/home\")\n    |\u003e PercyClient.snapshot(\"initial home page\", widths: [360, 1280])\n  end\nend\n```\n\n## Prerequisites\n\n### Wallaby\n\nPercy requires a live browser session to inject Javascript and take a snapshot of the DOM. [Wallaby](https://github.com/elixir-wallaby/wallaby)\nis a library that creates a browser session (using ChromeDriver or Selenium) to interact with.\n\nEnsure that the steps described in the project README's [\"Setup\" section](https://github.com/elixir-wallaby/wallaby?tab=readme-ov-file#setup)\nare completed.\n\n### Percy\n\n```\nnpm install -g @percy/cli\n```\n\nfor the `percy` command line tool that provides the infrastructure for screenshots. (https://github.com/percy/cli)\n\n## Installation\n\nThe package can be installed by adding `percy_client` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:percy_client, \"~\u003e 0.1.0\", only: :test}\n  ]\nend\n```\n\n## Test functions\n\n### snapshot(session, name, opts \\\\ [])\n\nFor a given Wallaby session `session`, takes a screenshot of name `name` by checking to see if the local `percy` instance is running,\ninjecting the DOM with the Percy snapshot script and uploading it to the local running `percy` instance. You can pass the\n[Percy options](https://www.browserstack.com/docs/percy/take-percy-snapshots/overview#all-configuration-options) as `opts`, though\nthe snapshot options with a dash listed should be passed as atoms with an underscore separator, to follow Elixir conventions\n(e.g. `min-height: 600` in JSON should be `min_height: 600` in the keyword list)\n\nReturns :ok if the screenshot was taken without issue.\n\n### percy_enabled?\n\nReturns `true` if the local Percy server is running, `false` otherwise.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmwhitworth%2Fpercy_client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmwhitworth%2Fpercy_client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmwhitworth%2Fpercy_client/lists"}