diff --git a/.travis.yml b/.travis.yml index b16d7f92..7d18768f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,22 @@ language: node_js -node_js: - - "6" \ No newline at end of file +node_js: "stable" + + before_install: + - stty cols 80 + +dist: trusty +sudo: required + +addons: + firefox: latest + apt: + sources: + - google-chrome + packages: + - google-chrome-stable fluxbox + +before_script: + - "export DISPLAY=:99.0" + - "sh -e /etc/init.d/xvfb start" + - sleep 3 + - fluxbox >/dev/null 2>&1 & \ No newline at end of file diff --git a/README.md b/README.md index a3556cfd..f3d9d099 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ No problem. With the help of ES6 Template literals, we can customize the any com - you have to install node.js v6+ because our unit tests are based on jsdom v11 - you have to install modern browsers because many behaviors of orgchart plugin are based on HTML5 and CSS3 - run ```npm install``` to install necessary dependencies -- run ```npm test``` to start up unit testing +- run ```npm test``` to run all tests including unit tests, integration tests and e2e tests - run ```npm run build``` to generate production js&css files of plugin - run ```npm start``` to start up local web server to host all the demos diff --git a/bower.json b/bower.json index 293cbbda..1b765c49 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "orgchart", - "version": "2.0.14", + "version": "2.0.15", "homepage": "https://github.com/dabeng/OrgChart", "authors": [ "dabeng " diff --git a/demo/ajax-datasource.html b/demo/ajax-datasource.html index ed2ea607..ea78c941 100644 --- a/demo/ajax-datasource.html +++ b/demo/ajax-datasource.html @@ -5,7 +5,7 @@ Organization Chart Plugin - + @@ -13,7 +13,7 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - \ No newline at end of file diff --git a/test/tests-manual.js b/test/tests-manual.js deleted file mode 100644 index c1e83401..00000000 --- a/test/tests-manual.js +++ /dev/null @@ -1,43 +0,0 @@ -chai.should(); - -describe('orgchart', function () { - - var $container = $('#chart-container'); - var datascource = { - 'name': 'Lao Lao', - 'title': 'general manager', - 'children': [ - { 'name': 'Bo Miao', 'title': 'department manager' }, - { 'name': 'Su Miao', 'title': 'department manager', - 'children': [ - { 'name': 'Tie Hua', 'title': 'senior engineer' }, - { 'name': 'Hei Hei', 'title': 'senior engineer', - 'children': [ - { 'name': 'Pang Pang', 'title': 'engineer' }, - { 'name': 'Xiang Xiang', 'title': 'UE engineer' } - ] - } - ] - }, - { 'name': 'Hong Miao', 'title': 'department manager' }, - { 'name': 'Chun Miao', 'title': 'department manager' } - ] - }; - - beforeEach(function () { - var oc = $('#chart-container').orgchart({ - 'data' : datascource, - 'nodeContent': 'title' - }); - }); - - afterEach(function () { - $container.empty(); - }); - - it('There will be an orgchart embeded in the container div after initialization', function () { - var $chart = $container.find('.orgchart'); - - $chart.length.should.equal(1); - }); -}); \ No newline at end of file diff --git a/test/unit-tests.js b/test/unit/tests.js similarity index 99% rename from test/unit-tests.js rename to test/unit/tests.js index 5d6c38b6..3475f36c 100644 --- a/test/unit-tests.js +++ b/test/unit/tests.js @@ -9,7 +9,7 @@ var dom = new JSDOM('
global.window = dom.window; global.document = dom.window.document; var $ = require('jquery'); -require('../src/js/jquery.orgchart'); +require('../../src/js/jquery.orgchart'); describe('orgchart -- unit tests', function () {