Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ sudo: false

language: node_js

os:
- osx
- linux

dist:
trusty

Expand All @@ -21,22 +25,12 @@ addons:
- xvfb
- at-spi2-core

os:
- osx
- linux

before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade python ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pip3 install click pyobjc-framework-Quartz; fi

install:
- if [ $TRAVIS_OS_NAME = linux ]; then export CC="gcc-5"; fi
- export DISPLAY=':99.0'
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- npm install


after_script:
- (cd tests/_snapshots && ../../node_modules/.bin/now --public --token "$NOW_TOKEN")

Expand Down
44 changes: 23 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"now": "^11.1.11",
"p-map": "^1.2.0",
"rimraf": "^2.6.2",
"screenshot-tester": "^0.3.0",
"screenshot-tester": "^0.3.2",
"tap-spec": "^5.0.0",
"tape": "^4.9.0",
"to-dot-case": "^1.0.0"
Expand Down
Binary file modified tests/_snapshots/reference/darwin/core-api.js.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 20 additions & 1 deletion tests/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ function tapLogger(type, file, err) {
break;
case 'FAILED':
case 'ERROR':

if (!isCI && file == 'core-api.js - "Test window"') {
total++;
passed++;
Expand All @@ -37,6 +36,14 @@ function tapLogger(type, file, err) {
passed++;
console.log(`ok ${total} - ${file}`);
break;
case 'PUSH':
if (err) {
console.error(`Sending report to: ${file} failed`);
console.error('\t', err);
} else {
console.log(`Sent report to: ${file}`);
}
break;
}
}

Expand All @@ -63,6 +70,18 @@ test('ui', t => {
.then(() => tester('example/node-pad.js', 'Node Pad'))
.then(() => tester('example/text.js', 'textDrawArea Example'))
.then(() => tester.generateHTML())
.then(() => {
const PR_REPO =
process.env.TRAVIS_REPO_SLUG || process.env.APPVEYOR_REPO_NAME;
const PR_NUM = process.env.TRAVIS_PULL_REQUEST ||
process.env.APPVEYOR_PULL_REQUEST_NUMBER;
const NODE_MAJOR = process.version.substr(1).split('.')[0];
if (PR_REPO && Number(PR_NUM)) {
tester.pushToServer('https://sts.mischnic.ml', PR_REPO, PR_NUM,
!(NODE_MAJOR === '11' || NODE_MAJOR === '10'),
' - Node ' + NODE_MAJOR);
}
})
.then(() => {
test.getHarness()._results.count += total - start;
test.getHarness()._results.pass += passed;
Expand Down