Integration tests: offline by default
This commit is contained in:
@@ -38,7 +38,7 @@ function waitForLoad (app, t, opts) {
|
|||||||
return app.client.waitUntilWindowLoaded()
|
return app.client.waitUntilWindowLoaded()
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
// Offline mode
|
// Offline mode
|
||||||
if (opts.offline) app.webContents.executeJavaScript('testOfflineMode()')
|
if (!opts.online) app.webContents.executeJavaScript('testOfflineMode()')
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
// Switch to the main window. Index 0 is apparently the hidden webtorrent window...
|
// Switch to the main window. Index 0 is apparently the hidden webtorrent window...
|
||||||
return app.client.windowByIndex(1)
|
return app.client.windowByIndex(1)
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ test('torrent-list: start, stop, and delete torrents', function (t) {
|
|||||||
setup.resetTestDataDir()
|
setup.resetTestDataDir()
|
||||||
|
|
||||||
const app = setup.createApp()
|
const app = setup.createApp()
|
||||||
setup.waitForLoad(app, t, {offline: true})
|
setup.waitForLoad(app, t)
|
||||||
.then(() => app.client.waitUntilTextExists('.torrent-list', 'Big Buck Bunny'))
|
.then(() => app.client.waitUntilTextExists('.torrent-list', 'Big Buck Bunny'))
|
||||||
// Mouse over the first torrent
|
// Mouse over the first torrent
|
||||||
.then(() => app.client.moveToObject('.torrent'))
|
.then(() => app.client.moveToObject('.torrent'))
|
||||||
@@ -66,7 +66,7 @@ test('torrent-list: expand torrent, unselect file', function (t) {
|
|||||||
setup.resetTestDataDir()
|
setup.resetTestDataDir()
|
||||||
|
|
||||||
const app = setup.createApp()
|
const app = setup.createApp()
|
||||||
setup.waitForLoad(app, t, {offline: true})
|
setup.waitForLoad(app, t)
|
||||||
.then(() => app.client.waitUntilTextExists('.torrent-list', 'Big Buck Bunny'))
|
.then(() => app.client.waitUntilTextExists('.torrent-list', 'Big Buck Bunny'))
|
||||||
// Mouse over the torrent
|
// Mouse over the torrent
|
||||||
.then(() => app.client.moveToObject('#torrent-cosmos'))
|
.then(() => app.client.moveToObject('#torrent-cosmos'))
|
||||||
|
|||||||
Reference in New Issue
Block a user