Argos visual testing SDK for Ember applications.
To get most out of this guide, you'll need to:
- Have an app with Ember testing set up
npm install --save-dev puppeteer @argos-ci/ember
Use argos-chrome
as browser in your testem configuration.
// testem.js
"use strict";
const path = require("path");
const argosChrome = path.resolve(__dirname, "node_modules/.bin/argos-chrome");
module.exports = {
test_page: "tests/index.html?hidepassed",
launch_in_ci: ["Chrome"],
browser_paths: {
Chrome: argosChrome,
},
};
Use argosScreenshot
to take screenshot of your application.
import { module, test } from "qunit";
import { visit } from "@ember/test-helpers";
import { setupApplicationTest } from "ember-qunit";
import { argosScreenshot } from "@argos-ci/ember";
module("Home", function (hooks) {
setupApplicationTest(hooks);
test("takes a screenshot of the homepage", async function () {
await visit("/");
await argosScreenshot("home");
});
});
Add this command to your CI pipeline to upload the screenshots to Argos.
npm exec -- argos upload --token <ARGOS_TOKEN> ./screenshots