diff --git a/.travis.yml b/.travis.yml
index e6673cf..9fb5722 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,4 +4,4 @@ node_js:
before_script:
- gulp bundle
- sleep 5
-script: gulp test
\ No newline at end of file
+script: npm test
diff --git a/src/js/darkwire.js b/src/js/darkwire.js
index ed43389..284c0b6 100644
--- a/src/js/darkwire.js
+++ b/src/js/darkwire.js
@@ -24,11 +24,6 @@ export default class Darkwire {
return file.data;
}
- set fileQueue(fileQueue) {
- this._fileQueue = fileQueue;
- return this;
- }
-
get autoEmbedImages() {
return this._autoEmbedImages;
}
diff --git a/src/room.js b/src/room.js
index ef9075e..5e11e04 100644
--- a/src/room.js
+++ b/src/room.js
@@ -27,7 +27,7 @@ class Room {
vector: data.vector,
secretKeys: data.secretKeys,
signature: data.signature,
- timestamp: new Date
+ timestamp: new Date()
});
});
@@ -48,7 +48,7 @@ class Room {
username: socket.username,
numUsers: this.numUsers,
users: this.users,
- timestamp: new Date
+ timestamp: new Date()
});
});
@@ -78,7 +78,7 @@ class Room {
numUsers: this.numUsers,
users: this.users,
id: socket.user.id,
- timestamp: new Date
+ timestamp: new Date()
});
// remove room from rooms array
@@ -111,7 +111,7 @@ class Room {
newUsername: data.newUsername,
publicKey: data.publicKey,
users: this.users,
- timestamp: new Date
+ timestamp: new Date()
});
});
@@ -119,7 +119,7 @@ class Room {
});
}
- get roomId() {
+ roomId() {
return this.id;
}
}
diff --git a/src/views/index.mustache b/src/views/index.mustache
index 1e7238a..58a643a 100644
--- a/src/views/index.mustache
+++ b/src/views/index.mustache
@@ -68,7 +68,7 @@
{{>partials/disclaimer}}
diff --git a/test/app.js b/test/app.js
index afbd0cf..f10bd11 100644
--- a/test/app.js
+++ b/test/app.js
@@ -1,15 +1,18 @@
+import appPkg from '../package.json';
import helpers from './helpers';
import app from '../index';
import mochaJSCS from 'mocha-jscs';
import mochaJSHint from 'mocha-jshint';
+import Browser from 'zombie';
+
+const APPVER = 'v' + appPkg.version;
-const Browser = require('zombie');
Browser.localhost('localhost', 3000);
mochaJSCS();
mochaJSHint();
-describe('Visiting /', () => {
+describe('Darkwire', () => {
const browser = new Browser();
@@ -22,19 +25,25 @@ describe('Visiting /', () => {
browser.visit('/', done);
});
- it('should be successful', () => {
- browser.assert.success();
- });
+ describe('Navigate to /', () => {
+ it('should be running released version', () => {
+ browser.assert.text('#appVersion', APPVER);
+ });
- it('should show welcome modal', () => {
- browser.assert.evaluate('$("#first-modal:visible").length', 1);
- browser.assert.text('#first-modal h4.modal-title', 'Welcome to darkwire.io');
+ it('should be successful', () => {
+ browser.assert.success();
+ });
+
+ it('should show welcome modal', () => {
+ browser.assert.evaluate('$("#first-modal:visible").length', 1);
+ browser.assert.text('#first-modal h4.modal-title', 'Welcome to darkwire.io ' + APPVER);
+ });
});
describe('closing the initial modal', () => {
before((done) => {
- browser.pressButton('#first-modal .modal-footer button', done);
+ return browser.pressButton('#first-modal .modal-footer button', done);
});
it('should close the modal and show the main chat page', () => {
@@ -68,7 +77,9 @@ describe('Visiting /', () => {
it('should send message', () => {
browser.tabs.current = 0;
- browser.assert.text('body', /Hello world/);
+ browser.wait('1s', () => {
+ browser.assert.text('.messageBody', /Hello world/);
+ });
});
});