Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add percy #159

Merged
merged 1 commit into from
Sep 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 9 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@ cache:
- node_modules

env:
- PARTITION=1
- PARTITION=2
- PARTITION=3
- PARTITION=4
- PARTITION=5
global:
- PERCY_PROJECT=kellyselden/package-hint-historic-resolver
- PERCY_PARALLEL_TOTAL=5
matrix:
- PARTITION=1
- PARTITION=2
- PARTITION=3
- PARTITION=4
- PARTITION=5

before_install:
- npm config set spin false
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"ember-metrics": "^0.6.0",
"ember-metrics-mixins": "0.1.0",
"ember-moment": "^6.0.0",
"ember-percy": "^1.2.1",
"ember-resolver": "^2.0.3",
"ember-simple-auth": "^1.0.0",
"ember-sinon": "0.5.1",
Expand Down
3 changes: 3 additions & 0 deletions tests/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
module.exports = {
env: {
'embertest': true
},
globals: {
percySnapshot: true
}
};
11 changes: 9 additions & 2 deletions tests/acceptance/application-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ let githubRequestHeaders;

moduleForAcceptance('Acceptance | application', {
beforeEach() {
server = new Pretender();
server = new Pretender(function() {
this.post('/_percy/:method', this.passthrough);
});
server.prepareBody = JSON.stringify;

user = 'test-user';
Expand Down Expand Up @@ -86,9 +88,14 @@ moduleForAcceptance('Acceptance | application', {
}
});

test('loads a fresh page', function(assert) {
let testName;

testName = 'loads a fresh page';
test(testName, function(assert) {
visit('/');

percySnapshot(testName);

andThen(function() {
assert.equal(find('#header').text().trim(), 'Why is CI Broken?');
});
Expand Down
1 change: 1 addition & 0 deletions tests/helpers/module-for-acceptance.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { module } from 'qunit';
import Ember from 'ember';
import startApp from '../helpers/start-app';
import destroyApp from '../helpers/destroy-app';
import '../helpers/percy/register-helpers';

const { RSVP: { Promise } } = Ember;

Expand Down