From 802a898394ce33869cda3231723561a37d8e49d6 Mon Sep 17 00:00:00 2001 From: DC Date: Mon, 19 Sep 2016 19:41:43 -0700 Subject: [PATCH] Integration tests: offline by default --- test/setup.js | 2 +- test/test-torrent-list.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/setup.js b/test/setup.js index 2c664d6a..e2063ef9 100644 --- a/test/setup.js +++ b/test/setup.js @@ -38,7 +38,7 @@ function waitForLoad (app, t, opts) { return app.client.waitUntilWindowLoaded() }).then(function () { // Offline mode - if (opts.offline) app.webContents.executeJavaScript('testOfflineMode()') + if (!opts.online) app.webContents.executeJavaScript('testOfflineMode()') }).then(function () { // Switch to the main window. Index 0 is apparently the hidden webtorrent window... return app.client.windowByIndex(1) diff --git a/test/test-torrent-list.js b/test/test-torrent-list.js index 70e1ff05..c9b946fe 100644 --- a/test/test-torrent-list.js +++ b/test/test-torrent-list.js @@ -28,7 +28,7 @@ test('torrent-list: start, stop, and delete torrents', function (t) { setup.resetTestDataDir() const app = setup.createApp() - setup.waitForLoad(app, t, {offline: true}) + setup.waitForLoad(app, t) .then(() => app.client.waitUntilTextExists('.torrent-list', 'Big Buck Bunny')) // Mouse over the first torrent .then(() => app.client.moveToObject('.torrent')) @@ -66,7 +66,7 @@ test('torrent-list: expand torrent, unselect file', function (t) { setup.resetTestDataDir() const app = setup.createApp() - setup.waitForLoad(app, t, {offline: true}) + setup.waitForLoad(app, t) .then(() => app.client.waitUntilTextExists('.torrent-list', 'Big Buck Bunny')) // Mouse over the torrent .then(() => app.client.moveToObject('#torrent-cosmos'))