Skip to content

Argos visual testing SDK for Ember applications.

License

Notifications You must be signed in to change notification settings

argos-ci/argos-ember

Folders and files

NameName
Last commit message
Last commit date

Latest commit

May 26, 2024
867093d · May 26, 2024

History

24 Commits
Mar 26, 2024
Mar 25, 2024
Mar 25, 2024
Mar 25, 2024
May 26, 2024
Mar 25, 2024
Mar 25, 2024
Mar 25, 2024
Mar 26, 2024
Mar 25, 2024
May 26, 2024
May 26, 2024
May 26, 2024

Repository files navigation

@argos-ci/ember

Argos visual testing SDK for Ember applications.

Prerequisites

To get most out of this guide, you'll need to:

Getting started

1. Install

npm install --save-dev puppeteer @argos-ci/ember

2. Configure testem

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,
  },
};

3. Take screenshots

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");
  });
});

4. Setup your CI

Add this command to your CI pipeline to upload the screenshots to Argos.

npm exec -- argos upload --token <ARGOS_TOKEN> ./screenshots