Fix tests
This commit is contained in:
parent
5b26c9cf69
commit
d8abb4b9c7
|
@ -1,4 +1,4 @@
|
||||||
dist/
|
**/*_bundle.js
|
||||||
node_modules/
|
node_modules/
|
||||||
release/
|
release/
|
||||||
src/node_modules/
|
src/node_modules/
|
||||||
|
|
|
@ -481,7 +481,7 @@ app.on('ready', () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// and load the index.html of the app.
|
// and load the index.html of the app.
|
||||||
if (isDev) {
|
if (isDev && !argv.testMode) {
|
||||||
mainWindow.loadURL('http://localhost:8080/browser/index.html');
|
mainWindow.loadURL('http://localhost:8080/browser/index.html');
|
||||||
} else {
|
} else {
|
||||||
mainWindow.loadURL('file://' + __dirname + '/browser/index.html');
|
mainWindow.loadURL('file://' + __dirname + '/browser/index.html');
|
||||||
|
|
|
@ -44,7 +44,7 @@ module.exports = {
|
||||||
getSpectronApp() {
|
getSpectronApp() {
|
||||||
const app = new Application({
|
const app = new Application({
|
||||||
path: electronBinaryPath,
|
path: electronBinaryPath,
|
||||||
args: [`${path.join(sourceRootDir, 'dist')}`, `--data-dir=${userDataDir}`]
|
args: [`${path.join(sourceRootDir, 'src')}`, `--data-dir=${userDataDir}`, '--test-mode']
|
||||||
});
|
});
|
||||||
chaiAsPromised.transferPromiseness = app.transferPromiseness;
|
chaiAsPromised.transferPromiseness = app.transferPromiseness;
|
||||||
return app;
|
return app;
|
||||||
|
@ -52,7 +52,7 @@ module.exports = {
|
||||||
|
|
||||||
addClientCommands(client) {
|
addClientCommands(client) {
|
||||||
client.addCommand('loadSettingsPage', function async() {
|
client.addCommand('loadSettingsPage', function async() {
|
||||||
return this.url('file://' + path.join(sourceRootDir, 'dist/browser/settings.html')).waitUntilWindowLoaded();
|
return this.url('file://' + path.join(sourceRootDir, 'src/browser/settings.html')).waitUntilWindowLoaded();
|
||||||
});
|
});
|
||||||
client.addCommand('isNodeEnabled', function async() {
|
client.addCommand('isNodeEnabled', function async() {
|
||||||
return this.execute(() => {
|
return this.execute(() => {
|
||||||
|
|
Loading…
Reference in a new issue