Commit 30fe129e authored by Alexander Bogdanov's avatar Alexander Bogdanov

Using official selenium docker for chrome

parent ea2e78e3
......@@ -40,19 +40,20 @@ services:
- USERNAME=$USER
- EMAIL=${USER}@localhost
- PASSWORD=password
- SELENIUM_REMOTE_URL=http://chromedriver:4444/wd/hub
- SELENIUM_REMOTE_URL=http://selenium:4444/wd/hub
- SELENIUM_BROWSER=chrome
working_dir: /pwd/test
command: |
sh -c "
npm install &&
while ! echo waiting for chromedriver:444 | nc chromedriver 4444; do sleep .3; done &&
while ! echo waiting for selenium:4444 | nc selenium 4444 > /dev/null; do sleep .3; done &&
mocha --bail test.js
"
chromedriver:
image: robcherry/docker-chromedriver:latest
environment:
- CHROMEDRIVER_WHITELISTED_IPS=
selenium:
image: selenium/standalone-chrome-debug
ports:
- 127.0.0.1::5900
volumes:
data:
\ No newline at end of file
......@@ -14,9 +14,6 @@
"mkdirp": "^0.5.1",
"mocha": "^2.3.4",
"rimraf": "^2.4.4",
"selenium-webdriver": "^2.53.3"
},
"dependencies": {
"chromedriver": "^2.40.0"
"selenium-webdriver": "3.6.0"
}
}
......@@ -7,10 +7,6 @@
'use strict';
if (!process.env.SELENIUM_REMOTE_URL){
require('chromedriver');
}
var execSync = require('child_process').execSync,
expect = require('expect.js'),
path = require('path'),
......@@ -30,8 +26,8 @@ if (!process.env.USERNAME || !process.env.PASSWORD || !process.env.EMAIL) {
describe('Application life cycle test', function () {
this.timeout(0);
var chrome = require('selenium-webdriver/chrome');
var browser = new chrome.Driver(), uploadedImageUrl;
var browser = new webdriver.Builder().build();
var uploadedImageUrl;
var username = process.env.USERNAME, password = process.env.PASSWORD;
var email = process.env.EMAIL;
......@@ -223,13 +219,6 @@ describe('Application life cycle test', function () {
});
}
function joinChannel(done) {
browser.get('https://' + app.fqdn + '/channel/' + TEST_CHANNEL).then(function () {
return browser.wait(until.elementLocated(by.name('msg')), TEST_TIMEOUT);
}).then(function () {
done();
});
}
xit('build app', function () {
execSync('cloudron build', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
......@@ -250,7 +239,6 @@ describe('Application life cycle test', function () {
it('can pass setup wizard', setupWizard);
it('can logout', logout); // the wizard will auto-login
it('can login', login.bind(null, username));
it('can join channel', joinChannel);
it('can send message', sendMessage);
it('can upload file', uploadFile);
it('can logout', logout);
......@@ -350,7 +338,6 @@ describe('Application life cycle test', function () {
it('can pass setup wizard', setupWizard);
it('can logout', logout); // the wizard will auto-login
it('can login', login.bind(null, username));
it('can join channel', joinChannel);
it('can send message', sendMessage);
it('can upload file', uploadFile);
it('can update', function () {
......
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