From 1e9b35d18f65a63ab85cc01d20ee6551f3fe2ad3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?=
Date: Thu, 26 Jan 2017 21:13:58 -0300
Subject: [PATCH 01/12] Fix bug validation when is not set MM_CONFIG_FILE
enviroment variable
---
js/app.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/js/app.js b/js/app.js
index 9f992b29..6466fe3f 100644
--- a/js/app.js
+++ b/js/app.js
@@ -49,7 +49,7 @@ var App = function() {
// For this check proposed to TestSuite
// https://forum.magicmirror.builders/topic/1456/test-suite-for-magicmirror/8
var configFilename = path.resolve(global.root_path + "/config/config.js");
- if (typeof(global.configuration_file) === "undefined" ) {
+ if (typeof(global.configuration_file) !== "undefined") {
configFilename = path.resolve(global.configuration_file);
}
From de69fe17457b6790014ea4af255e96f716d7155e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?=
Date: Fri, 27 Jan 2017 13:42:20 -0300
Subject: [PATCH 02/12] Show splash screen image on reboot and halt.
---
CHANGELOG.md | 1 +
splashscreen/MagicMirror.script | 17 +++++++++++------
splashscreen/splash_halt.png | Bin 0 -> 22304 bytes
3 files changed, 12 insertions(+), 6 deletions(-)
create mode 100644 splashscreen/splash_halt.png
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 706299cd..6a3d7332 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Replace HTML tables with markdown tables in README files.
- Added `DAYAFTERTOMORROW`, `UPDATE_NOTIFICATION` and `UPDATE_NOTIFICATION_MODULE` to Finnish translations.
- Run `npm test` on Travis automatically
+- Show the splash screen image even when is reboot or halted.
### Added
- Add loaded function to modules, providing an async callback.
diff --git a/splashscreen/MagicMirror.script b/splashscreen/MagicMirror.script
index 9b614389..6e2f5643 100644
--- a/splashscreen/MagicMirror.script
+++ b/splashscreen/MagicMirror.script
@@ -1,7 +1,15 @@
screen_width = Window.GetWidth();
screen_height = Window.GetHeight();
-theme_image = Image("splash.png");
+if (Plymouth.GetMode() != "shutdown")
+{
+ theme_image = Image("splash.png");
+}
+else
+{
+ theme_image = Image("splash_halt.png");
+}
+
image_width = theme_image.GetWidth();
image_height = theme_image.GetHeight();
@@ -30,11 +38,8 @@ else
image_y = (screen_height - image_height) / 2;
}
-if (Plymouth.GetMode() != "shutdown")
-{
- sprite = Sprite (resized_image);
- sprite.SetPosition (image_x, image_y, -100);
-}
+sprite = Sprite (resized_image);
+sprite.SetPosition (image_x, image_y, -100);
message_sprite = Sprite();
message_sprite.SetPosition(screen_width * 0.1, screen_height * 0.9, 10000);
diff --git a/splashscreen/splash_halt.png b/splashscreen/splash_halt.png
new file mode 100644
index 0000000000000000000000000000000000000000..dcf9d8be0de9cc11079c61ef6e57c5d52f9cab15
GIT binary patch
literal 22304
zcmc$`2UwF?*ESllpeW#sC{h$lfI%rL0@58BOQ;ULgMxrm1(6a$bQF0lfClN1$k2u$
zARs{qNmLY!lqeWl2tf%TB?JN_goNbmIPdwd^MCI-@ArMzxxVX<7~-
zYv=w&`}49g$}$iLL>6}8H%AC$6Zp6hvULmi)zY$C7W~?B+2;Ij5V7RXGeSisxU%iq
z1&TMV88w996vlqhv)jlBJ@N&
zwAWi5=z&908(I$>dG_qUmffviY&PprhxZHmaNNPp#pRb3)e((2+;D&Y@US1PFB@CE
z;vBl0sX++Y{p+>^Qa^u^k-7WZ)}7HC&uGL9#faP)MbC#CH1j&qHe)M^=mZoYIEd9q
z4D0R^wGQxl_o}FD2P0b;>@V2{exC+^A&{*<-Zx0z5B&HjnK9(nkB>Wlyh};m{~sSu
z|G4_^p8J1q;{W5h|Fr9WdG6nJ{V(JEG5UXL;s8YQ`j6wh_2cTlH1Y5H`;SdP{#}3n
zovEJwF_wSV^}mes-*x>T$NAry>VY3)`HxNfpPA~v%=$kS(f{03|I@DjMMS56NbH)|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&s74V{pHG>C^eC2IdyJ69Xi)ER{l
z6o1rcqKW)b&<)WUq%kB&$ApEWM9@Lq$Z5hKG5cPGYNL$wcrm5KL+>QR9(o?OOS
z2vbAy#<0*}3Izm&Xt3cdWvEQaLy=1idcxjzv=G$>C0@I9J(F~6=n_Q~lm{@6dV6a#
zFaE|krm79<(iF!?Z&b6xumDp0vVTk&tkwI)tdqE6^~k9>lnEF-K4ft6(!h}g2PvoJ
zTZ_AQuzSm2Hrfp`eavzSi380bcEr#Cn6<*czyv1|=?tPOx5@VTiphA9d}x=;(gr9m
zH>sZn93d7JEH@mCNJ0$i@bx_}-R>QD0hv%oY(=8b?E6;A@_Fr-idtM-EL=8`CBGw_
zi2`H2rkaqw$|P7C5Hn|nhUIyry*wr3=`0wYn{f
z?>?*5N;}zg7_M@peQ_`51VD}q@(LF4`~A;jj=Qg6i<-*lIbUvaD3^9-1n~1xM3yx^&
zE4}u*WNA*i_h)VBNP+d~qu)~{fNoz|f$N^CId5l^&8>Qkvi&E+u>CBSoSRs(goK0=
zyF@pb*3abtb!dS!U_C+nT|lx1Rw^>IfiGT;lV;XmN`g}LKqS3|t?*f|0>bjv$
z%+c4Ds!5|;s~)?INEcmiu%R#o-s`fSi26*|RbW;rrKe2f9bDjbl|K1l>ZdXLj5)B!iAu3t$n`A$0qq3VLE)asY7i_De!FwaAGhC>y}_
z{^q}dcp4`Ew>g`bnZnmZVEgyG^9DoR4SmAE2tN1}P8~tx!}Y(-S;WkI&m1LAd*wU{
zpV_h5bP@V*I6V(X__U$UtvO%9!%*~;vgX#^DZPauJRC*OtMG6X{n11s=$bjrA5G*R
cwGPx#
literal 0
HcmV?d00001
From d3c0b9a4385ca7542837df002e8ff7e27fea7726 Mon Sep 17 00:00:00 2001
From: Joseph Bethge
Date: Sat, 28 Jan 2017 12:26:52 +0100
Subject: [PATCH 03/12] fix module hidden status
---
CHANGELOG.md | 1 +
js/main.js | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6a3d7332..9f233c2a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -37,6 +37,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Fix an issue where the analog clock looked scrambled. ([#611](https://github.com/MichMich/MagicMirror/issues/611))
- If units is set to imperial, the showRainAmount option of weatherforecast will show the correct unit.
- Module currentWeather: check if temperature received from api is defined.
+- Fix an issue with module hidden status changing to `true` although lock string prevented showing it
## [2.1.0] - 2016-12-31
diff --git a/js/main.js b/js/main.js
index 325a7efe..fde5564d 100644
--- a/js/main.js
+++ b/js/main.js
@@ -232,6 +232,8 @@ var MM = (function() {
return;
}
+ module.hidden = false;
+
// If forced show, clean current lockstrings.
if (module.lockStrings.length !== 0 && options.force === true) {
Log.log("Force show of module: " + module.name);
@@ -504,7 +506,7 @@ var MM = (function() {
* argument options object - Optional settings for the hide method.
*/
showModule: function(module, speed, callback, options) {
- module.hidden = false;
+ // do not change module.hidden yet, only if we really show it later
showModule(module, speed, callback, options);
}
};
From ebb2db17f35a83e0e20ba4a0607eea602af93691 Mon Sep 17 00:00:00 2001
From: snille
Date: Sun, 29 Jan 2017 00:06:06 +0100
Subject: [PATCH 04/12] Fixed the Swedish translation.
---
translations/sv.json | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/translations/sv.json b/translations/sv.json
index 9643a07b..8db89752 100644
--- a/translations/sv.json
+++ b/translations/sv.json
@@ -5,6 +5,7 @@
/* CALENDAR */
"TODAY": "Idag",
"TOMORROW": "Imorgon",
+ "DAYAFTERTOMORROW": "Iövermorgon",
"RUNNING": "Slutar",
"EMPTY": "Inga kommande händelser.",
@@ -25,4 +26,9 @@
"WNW": "VNV",
"NW": "NV",
"NNW": "NNV"
+
+ /* UPDATE INFO */
+ "UPDATE_NOTIFICATION": "MagicMirror² uppdatering finns tillgänglig.",
+ "UPDATE_NOTIFICATION_MODULE": "Uppdatering finns tillgänglig av MODULE_NAME modulen.",
+ "UPDATE_INFO": "Denna installation ligger COMMIT_COUNT steg bakom BRANCH_NAME grenen."
}
From e738ee0812fb70fb7cb75c250ed6282a53d01201 Mon Sep 17 00:00:00 2001
From: Erik Pettersson
Date: Sun, 29 Jan 2017 00:09:51 +0100
Subject: [PATCH 05/12] Added information about the sv.json update.
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9f233c2a..2aa0ec6b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Added `DAYAFTERTOMORROW`, `UPDATE_NOTIFICATION` and `UPDATE_NOTIFICATION_MODULE` to Finnish translations.
- Run `npm test` on Travis automatically
- Show the splash screen image even when is reboot or halted.
+- Added some missing translaton strings in the sv.json file.
### Added
- Add loaded function to modules, providing an async callback.
From bbdc43c750de3d6099b11198fb60fa266649cded Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?=
Date: Sat, 28 Jan 2017 21:37:12 -0300
Subject: [PATCH 06/12] Use configuration file in index.html when is set
MM_CONFIG_FILE
---
index.html | 2 +-
js/server.js | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/index.html b/index.html
index 86a69a4a..606f5aac 100644
--- a/index.html
+++ b/index.html
@@ -33,7 +33,7 @@
-
+
diff --git a/js/server.js b/js/server.js
index f1de2420..5c775f69 100644
--- a/js/server.js
+++ b/js/server.js
@@ -46,6 +46,12 @@ var Server = function(config, callback) {
var html = fs.readFileSync(path.resolve(global.root_path + "/index.html"), {encoding: "utf8"});
html = html.replace("#VERSION#", global.version);
+ configFile = "config/config.js";
+ if (typeof(global.configuration_file) !== "undefined") {
+ configFile = global.configuration_file;
+ }
+ html = html.replace("#CONFIG_FILE#", configFile);
+
res.send(html);
});
From a0fa3a6063ef94b011a926ff083293d5f627a1f5 Mon Sep 17 00:00:00 2001
From: Jopyth
Date: Mon, 30 Jan 2017 09:28:37 +0100
Subject: [PATCH 07/12] missing comma in sv.json translation
---
translations/sv.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/translations/sv.json b/translations/sv.json
index 8db89752..8a1440f0 100644
--- a/translations/sv.json
+++ b/translations/sv.json
@@ -25,7 +25,7 @@
"W": "V",
"WNW": "VNV",
"NW": "NV",
- "NNW": "NNV"
+ "NNW": "NNV",
/* UPDATE INFO */
"UPDATE_NOTIFICATION": "MagicMirror² uppdatering finns tillgänglig.",
From 0d8d8f042692b249f046a1d488ca58782656373d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?=
Date: Sat, 28 Jan 2017 23:23:32 -0300
Subject: [PATCH 08/12] Add tests configs directory as express route.
---
js/server.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/js/server.js b/js/server.js
index 5c775f69..e7050021 100644
--- a/js/server.js
+++ b/js/server.js
@@ -37,6 +37,7 @@ var Server = function(config, callback) {
app.use("/modules", express.static(path.resolve(global.root_path + "/modules")));
app.use("/vendor", express.static(path.resolve(global.root_path + "/vendor")));
app.use("/translations", express.static(path.resolve(global.root_path + "/translations")));
+ app.use("/tests/confs", express.static(path.resolve(global.root_path + "/tests/confs")));
app.get("/version", function(req,res) {
res.send(global.version);
From 52b8dbcbb11d891c84c81df3c7d92c5f30331740 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?=
Date: Sat, 28 Jan 2017 23:25:43 -0300
Subject: [PATCH 09/12] separate test type. Create directory for End-to-end
testing.
---
package.json | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 9d94a012..927cd2bc 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,8 @@
"scripts": {
"start": "sh run-start.sh",
"postinstall": "sh installers/postinstall/postinstall.sh",
- "test": "./node_modules/mocha/bin/mocha tests --recursive"
+ "test": "./node_modules/mocha/bin/mocha $(find tests -path '*js*' ! -ipath '*e2e*')",
+ "test:e2e": "./node_modules/mocha/bin/mocha tests/e2e --recursive"
},
"repository": {
"type": "git",
From d474d518cae0882dffbb32638605a038d2a8c0ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?=
Date: Mon, 30 Jan 2017 12:24:49 -0300
Subject: [PATCH 10/12] test e2e module helloworld
---
CHANGELOG.md | 1 +
package.json | 1 +
tests/confs/helloworld.js | 32 +++++++++++++++++++++++++
tests/e2e/modules/helloworld.js | 42 +++++++++++++++++++++++++++++++++
4 files changed, 76 insertions(+)
create mode 100644 tests/confs/helloworld.js
create mode 100644 tests/e2e/modules/helloworld.js
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2aa0ec6b..9c6b1a48 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,6 +30,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Icelandic Translation.
- Add use a script to prevent when is run by SSH session set DISPLAY enviroment.
- Enable ability to set configuration file by the enviroment variable called MM_CONFIG_FILE.
+- Add test e2e helloworld
### Fixed
- Update .gitignore to not ignore default modules folder.
diff --git a/package.json b/package.json
index 927cd2bc..92202936 100644
--- a/package.json
+++ b/package.json
@@ -37,6 +37,7 @@
"grunt-stylelint": "latest",
"grunt-yamllint": "latest",
"mocha": "^3.2.0",
+ "spectron": "^3.4.1",
"stylelint-config-standard": "latest",
"time-grunt": "latest"
},
diff --git a/tests/confs/helloworld.js b/tests/confs/helloworld.js
new file mode 100644
index 00000000..6b617cf2
--- /dev/null
+++ b/tests/confs/helloworld.js
@@ -0,0 +1,32 @@
+/* Magic Mirror Test config sample module hello world
+ *
+ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
+ * MIT Licensed.
+ */
+
+var config = {
+ port: 8080,
+ ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
+
+ language: "en",
+ timeFormat: 24,
+ units: "metric",
+ electronOptions: {
+ webPreferences: {
+ nodeIntegration: true,
+ },
+ },
+
+ modules: [
+ {
+ module: "helloworld",
+ position: "bottom_bar",
+ config: {
+ text: "Test HelloWorld Module"
+ }
+ }
+ ]
+};
+
+/*************** DO NOT EDIT THE LINE BELOW ***************/
+if (typeof module !== "undefined") {module.exports = config;}
diff --git a/tests/e2e/modules/helloworld.js b/tests/e2e/modules/helloworld.js
new file mode 100644
index 00000000..960917c3
--- /dev/null
+++ b/tests/e2e/modules/helloworld.js
@@ -0,0 +1,42 @@
+const Application = require("spectron").Application;
+const path = require('path');
+const chai = require('chai');
+const chaiAsPromised = require('chai-as-promised');
+
+// Set config sample for use in test
+process.env.MM_CONFIG_FILE = 'tests/confs/helloworld.js';
+
+var electronPath = path.join(__dirname, '../../../', 'node_modules', '.bin', 'electron');
+
+if (process.platform === 'win32') {
+ electronPath += '.cmd';
+}
+
+var appPath = path.join(__dirname, '../../../js/electron.js');
+
+var app = new Application({
+ path: electronPath,
+ args: [appPath]
+});
+
+global.before(function () {
+ chai.should();
+ chai.use(chaiAsPromised);
+});
+
+describe('Test helloworld module', function () {
+ this.timeout(10000);
+
+ beforeEach(function (done) {
+ app.start().then(function() { done(); } );
+ });
+
+ afterEach(function (done) {
+ app.stop().then(function() { done(); });
+ });
+
+ it('Test message helloworld module', function () {
+ return app.client.waitUntilWindowLoaded()
+ .getText('.helloworld').should.eventually.equal('Test HelloWorld Module');
+ });
+});
From c75ee042a8cd58013cd7d739c85ddffee04144be Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?=
Date: Mon, 30 Jan 2017 12:29:32 -0300
Subject: [PATCH 11/12] add e2e test enviroment
---
CHANGELOG.md | 1 +
tests/confs/env.js | 25 +++++++++++++++++++++++
tests/e2e/env.js | 49 ++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 75 insertions(+)
create mode 100644 tests/confs/env.js
create mode 100644 tests/e2e/env.js
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9c6b1a48..17da5a9a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -31,6 +31,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Add use a script to prevent when is run by SSH session set DISPLAY enviroment.
- Enable ability to set configuration file by the enviroment variable called MM_CONFIG_FILE.
- Add test e2e helloworld
+- Add test e2e enviroment
### Fixed
- Update .gitignore to not ignore default modules folder.
diff --git a/tests/confs/env.js b/tests/confs/env.js
new file mode 100644
index 00000000..252934d7
--- /dev/null
+++ b/tests/confs/env.js
@@ -0,0 +1,25 @@
+/* Magic Mirror Test config sample enviroment
+ *
+ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
+ * MIT Licensed.
+ */
+
+var config = {
+ port: 8080,
+ ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
+
+ language: "en",
+ timeFormat: 24,
+ units: "metric",
+ electronOptions: {
+ webPreferences: {
+ nodeIntegration: true,
+ },
+ },
+
+ modules: [
+ ]
+};
+
+/*************** DO NOT EDIT THE LINE BELOW ***************/
+if (typeof module !== "undefined") {module.exports = config;}
diff --git a/tests/e2e/env.js b/tests/e2e/env.js
new file mode 100644
index 00000000..0046ddec
--- /dev/null
+++ b/tests/e2e/env.js
@@ -0,0 +1,49 @@
+const Application = require("spectron").Application;
+const path = require('path');
+const chai = require('chai');
+const chaiAsPromised = require('chai-as-promised');
+
+// Set config sample for use in test
+process.env.MM_CONFIG_FILE = 'tests/confs/env.js';
+
+var electronPath = path.join(__dirname, '../../', 'node_modules', '.bin', 'electron');
+
+if (process.platform === 'win32') {
+ electronPath += '.cmd';
+}
+
+var appPath = path.join(__dirname, '../../js/electron.js');
+
+var app = new Application({
+ path: electronPath,
+ args: [appPath]
+});
+
+global.before(function () {
+ chai.should();
+ chai.use(chaiAsPromised);
+});
+
+describe('Test enviroment app electron', function () {
+ this.timeout(10000);
+
+ beforeEach(function (done) {
+ app.start().then(function() { done(); } );
+ });
+
+ afterEach(function (done) {
+ app.stop().then(function() { done(); });
+ });
+
+
+ it('open a window app and test if is open', function () {
+ return app.client.waitUntilWindowLoaded()
+ .getWindowCount().should.eventually.equal(1);
+ });
+
+ it('tests the title', function () {
+ return app.client.waitUntilWindowLoaded()
+ .getTitle().should.eventually.equal('Magic Mirror');
+ });
+
+});
From e2dc5ef4f2c14ac22ad69162a27206f71a119f4e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?=
Date: Mon, 30 Jan 2017 12:42:04 -0300
Subject: [PATCH 12/12] fix eslint change single quote by double quote
---
tests/e2e/env.js | 24 ++++++++++++------------
tests/e2e/modules/helloworld.js | 22 +++++++++++-----------
2 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/tests/e2e/env.js b/tests/e2e/env.js
index 0046ddec..41386499 100644
--- a/tests/e2e/env.js
+++ b/tests/e2e/env.js
@@ -1,18 +1,18 @@
const Application = require("spectron").Application;
-const path = require('path');
-const chai = require('chai');
-const chaiAsPromised = require('chai-as-promised');
+const path = require("path");
+const chai = require("chai");
+const chaiAsPromised = require("chai-as-promised");
// Set config sample for use in test
-process.env.MM_CONFIG_FILE = 'tests/confs/env.js';
+process.env.MM_CONFIG_FILE = "tests/confs/env.js";
-var electronPath = path.join(__dirname, '../../', 'node_modules', '.bin', 'electron');
+var electronPath = path.join(__dirname, "../../", "node_modules", ".bin", "electron");
-if (process.platform === 'win32') {
- electronPath += '.cmd';
+if (process.platform === "win32") {
+ electronPath += ".cmd";
}
-var appPath = path.join(__dirname, '../../js/electron.js');
+var appPath = path.join(__dirname, "../../js/electron.js");
var app = new Application({
path: electronPath,
@@ -24,7 +24,7 @@ global.before(function () {
chai.use(chaiAsPromised);
});
-describe('Test enviroment app electron', function () {
+describe("Test enviroment app electron", function () {
this.timeout(10000);
beforeEach(function (done) {
@@ -36,14 +36,14 @@ describe('Test enviroment app electron', function () {
});
- it('open a window app and test if is open', function () {
+ it("open a window app and test if is open", function () {
return app.client.waitUntilWindowLoaded()
.getWindowCount().should.eventually.equal(1);
});
- it('tests the title', function () {
+ it("tests the title", function () {
return app.client.waitUntilWindowLoaded()
- .getTitle().should.eventually.equal('Magic Mirror');
+ .getTitle().should.eventually.equal("Magic Mirror");
});
});
diff --git a/tests/e2e/modules/helloworld.js b/tests/e2e/modules/helloworld.js
index 960917c3..ebf8a8d1 100644
--- a/tests/e2e/modules/helloworld.js
+++ b/tests/e2e/modules/helloworld.js
@@ -1,18 +1,18 @@
const Application = require("spectron").Application;
-const path = require('path');
-const chai = require('chai');
-const chaiAsPromised = require('chai-as-promised');
+const path = require("path");
+const chai = require("chai");
+const chaiAsPromised = require("chai-as-promised");
// Set config sample for use in test
-process.env.MM_CONFIG_FILE = 'tests/confs/helloworld.js';
+process.env.MM_CONFIG_FILE = "tests/confs/helloworld.js";
-var electronPath = path.join(__dirname, '../../../', 'node_modules', '.bin', 'electron');
+var electronPath = path.join(__dirname, "../../../", "node_modules", ".bin", "electron");
-if (process.platform === 'win32') {
- electronPath += '.cmd';
+if (process.platform === "win32") {
+ electronPath += ".cmd";
}
-var appPath = path.join(__dirname, '../../../js/electron.js');
+var appPath = path.join(__dirname, "../../../js/electron.js");
var app = new Application({
path: electronPath,
@@ -24,7 +24,7 @@ global.before(function () {
chai.use(chaiAsPromised);
});
-describe('Test helloworld module', function () {
+describe("Test helloworld module", function () {
this.timeout(10000);
beforeEach(function (done) {
@@ -35,8 +35,8 @@ describe('Test helloworld module', function () {
app.stop().then(function() { done(); });
});
- it('Test message helloworld module', function () {
+ it("Test message helloworld module", function () {
return app.client.waitUntilWindowLoaded()
- .getText('.helloworld').should.eventually.equal('Test HelloWorld Module');
+ .getText(".helloworld").should.eventually.equal("Test HelloWorld Module");
});
});