Commit 4862a61a authored by Pavel Reznikov's avatar Pavel Reznikov
Browse files

protractor e2e test

parent 50607a97
node_modules
bower_components
coverage
\ No newline at end of file
coverage
*.log
language: node_js
node_js:
- "5.7.0"
env:
- CXX=g++-4.8
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
before_install:
- npm install -g protractor
install:
- npm install -g npm@2
- npm install -g grunt-cli
- npm install -g bower
- bower install
- npm install
- webdriver-manager update --standalone
before_script:
- npm install -g grunt-cli
- npm install -g bower
- bower install
- npm install
- export CHROME_BIN=chromium-browser
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- nohup bash -c "webdriver-manager start 2>&1 &"
script:
- npm run build
- npm test
\ No newline at end of file
- npm run build
- npm test
- grunt e2e-test
......@@ -7,6 +7,8 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-jscs');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-protractor-runner');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.initConfig({
sass: {
......@@ -95,7 +97,25 @@ module.exports = function(grunt) {
},
},
},
protractor: {
options: {
configFile: 'protractor.conf.js',
},
all: {}
},
connect: {
all: {
options: {
port: 8080,
hostname: 'localhost',
base: '.',
},
},
},
});
grunt.registerTask('default', ['sass', 'cssmin', 'jshint', 'jscs', 'copy', 'uglify', 'doctoc']);
grunt.registerTask('e2e-test', ['connect', 'protractor']);
};
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['spec/e2e/*-spec.js'],
capabilities: {
browserName: 'firefox',
version: '',
platform: 'ANY'
},
};
describe('gridstack.js two grids demo', function() {
beforeAll(function() {
browser.ignoreSynchronization = true;
});
beforeEach(function() {
browser.get('http://localhost:8080/demo/two.html');
});
it('should have proper title', function() {
expect(browser.getTitle()).toEqual('Two grids demo');
});
});
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment