diff --git a/docs/learn/guides/visual-coverage/compare-non-image-files.mdx b/docs/learn/guides/visual-coverage/compare-non-image-files.mdx new file mode 100644 index 00000000..04510441 --- /dev/null +++ b/docs/learn/guides/visual-coverage/compare-non-image-files.mdx @@ -0,0 +1,53 @@ +--- +slug: /compare-non-image-files +sidebar_label: Non-image comparisons +description: Compare text-based artifacts in Argos by uploading them with the CLI. +--- + +import { RunPkgCommand } from "@site/src/partials"; + +# Compare non-image files + +Argos can compare more than screenshots. With the CLI, you can upload text-based artifacts such as API snapshots, generated HTML, Markdown files, CSS output, JavaScript bundles, XML documents, YAML files, or JSON fixtures and review their changes in Argos. + +![Compare non-image files in Argos](json-comparison.png) + +## Upload non-image files + +Use the `-f` or `--files` option to tell the CLI which files to upload: + + + +The `-f` option replaces the default screenshot glob. If you want to upload screenshots and non-image files in the same build, include both patterns: + + + +Use stable file names and paths so Argos can match each uploaded file with its baseline on future builds. + +## Supported content types + +Argos currently supports these non-image content types: + +- `text/plain` +- `application/json` +- `application/yaml` +- `text/yaml` +- `application/xml` +- `text/xml` +- `text/html` +- `text/markdown` +- `text/css` +- `application/javascript` +- `text/javascript` + +## Framework support + +Non-image comparisons are only supported through the CLI for now. [Contact us](mailto:contact@argos-ci.com) if you are interested in using this feature from a test framework like Vitest. diff --git a/docs/learn/guides/visual-coverage/json-comparison.png b/docs/learn/guides/visual-coverage/json-comparison.png new file mode 100644 index 00000000..f061e2a0 Binary files /dev/null and b/docs/learn/guides/visual-coverage/json-comparison.png differ diff --git a/docs/sdks/cli.mdx b/docs/sdks/cli.mdx index f7ce9feb..f8fb7eb0 100644 --- a/docs/sdks/cli.mdx +++ b/docs/sdks/cli.mdx @@ -47,6 +47,10 @@ Use the `upload` command to upload screenshots stored in your `./screenshots` di +### Compare non-image files + +Use `-f` or `--files` to upload text-based artifacts such as JSON, YAML, XML, HTML, Markdown, CSS, or JavaScript files. See [Compare non-image files](/compare-non-image-files) for examples and the full list of supported content types. + ### Debug mode You can enable debug mode by setting the `DEBUG` environment variable.