Integration test: address PR comments
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 478 KiB After Width: | Height: | Size: 478 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 480 KiB After Width: | Height: | Size: 480 KiB |
@@ -165,6 +165,6 @@ function compareTorrentFiles (t, pathActual, pathExpected) {
|
||||
|
||||
function extractImportantFields (parsedTorrent) {
|
||||
const { infoHash, name, announce, urlList, comment } = parsedTorrent
|
||||
const priv = parsedTorrent.private
|
||||
const priv = parsedTorrent.private // private is a reserved word in JS
|
||||
return { infoHash, name, announce, urlList, comment, 'private': priv }
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ const setup = require('./setup')
|
||||
test('audio-streaming', function (t) {
|
||||
setup.resetTestDataDir()
|
||||
|
||||
t.timeoutAfter(40e3)
|
||||
t.timeoutAfter(60e3)
|
||||
const app = setup.createApp()
|
||||
setup.waitForLoad(app, t, {online: true})
|
||||
.then(() => app.client.waitUntilTextExists('.torrent-list', 'Big Buck Bunny'))
|
||||
@@ -12,15 +12,17 @@ test('audio-streaming', function (t) {
|
||||
.then(() => app.client.moveToObject('#torrent-wired'))
|
||||
.then(() => setup.wait())
|
||||
.then(() => app.client.click('#torrent-wired .icon.play'))
|
||||
.then(() => setup.wait(5e3))
|
||||
.then(() => app.client.waitUntilTextExists('The Wired CD'))
|
||||
// Pause. Skip to two seconds in. Wait another two seconds for it to load.
|
||||
.then(() => app.webContents.executeJavaScript('dispatch("playPause")'))
|
||||
.then(() => app.webContents.executeJavaScript('dispatch("skipTo", 2)'))
|
||||
.then(() => setup.wait())
|
||||
.then(() => app.client.waitUntilTextExists('Artist'))
|
||||
.then(() => setup.screenshotCreateOrCompare(app, t, 'play-torrent-wired'))
|
||||
// Click next
|
||||
.then(() => app.client.click('.skip-next'))
|
||||
.then(() => setup.wait())
|
||||
.then(() => app.client.waitUntilTextExists('The Wired CD'))
|
||||
.then(() => app.client.moveToObject('.letterbox'))
|
||||
.then(() => app.webContents.executeJavaScript('dispatch("playPause")'))
|
||||
.then(() => app.webContents.executeJavaScript('dispatch("skipTo", 2)'))
|
||||
.then(() => setup.wait())
|
||||
@@ -28,7 +30,7 @@ test('audio-streaming', function (t) {
|
||||
// Play from end of song, let it advance on its own
|
||||
.then(() => app.webContents.executeJavaScript('dispatch("skipTo", 206)'))
|
||||
.then(() => app.webContents.executeJavaScript('dispatch("playPause")'))
|
||||
.then(() => setup.wait(5e3))
|
||||
.then(() => setup.wait(5e3)) // Let it play a few seconds, past the end of the song
|
||||
.then(() => app.webContents.executeJavaScript('dispatch("playPause")'))
|
||||
.then(() => app.webContents.executeJavaScript('dispatch("skipTo", 2)'))
|
||||
.then(() => setup.wait())
|
||||
@@ -39,11 +41,11 @@ test('audio-streaming', function (t) {
|
||||
.then(() => setup.screenshotCreateOrCompare(app, t, 'play-torrent-wired-fullscreen'))
|
||||
// Back to normal audio view. Give the player controls have had time to disappear.
|
||||
.then(() => app.webContents.executeJavaScript('dispatch("escapeBack")'))
|
||||
.then(() => setup.wait(5e3))
|
||||
.then(() => setup.wait())
|
||||
.then(() => setup.screenshotCreateOrCompare(app, t, 'play-torrent-wired-4'))
|
||||
// Back. Return to torrent list
|
||||
.then(() => app.client.click('.back'))
|
||||
.then(() => setup.wait())
|
||||
.then(() => app.client.waitUntilTextExists('Big Buck Bunny'))
|
||||
.then(() => setup.screenshotCreateOrCompare(app, t, 'play-torrent-wired-list'))
|
||||
// Forward. Should play again where we left off (should not stay paused)
|
||||
.then(() => app.client.click('.forward'))
|
||||
|
||||
@@ -3,7 +3,7 @@ const fs = require('fs-extra')
|
||||
const setup = require('./setup')
|
||||
const config = require('./config')
|
||||
|
||||
test.skip('torrent-list: show download path missing', function (t) {
|
||||
test('torrent-list: show download path missing', function (t) {
|
||||
setup.resetTestDataDir()
|
||||
fs.removeSync(config.TEST_DIR_DOWNLOAD)
|
||||
|
||||
@@ -36,7 +36,7 @@ test('torrent-list: start, stop, and delete torrents', function (t) {
|
||||
.then(() => setup.screenshotCreateOrCompare(app, t, 'torrent-list-hover'))
|
||||
// Click download on the first torrent, start downloading
|
||||
.then(() => app.client.click('.icon.download'))
|
||||
.then(() => app.client.waitUntilTextExists('.torrent-list', '0%'))
|
||||
.then(() => app.client.waitUntilTextExists('.torrent-list', '276MB'))
|
||||
.then(() => setup.screenshotCreateOrCompare(app, t, 'torrent-list-start-download'))
|
||||
// Click download on the first torrent again, stop downloading
|
||||
.then(() => app.client.click('.icon.download'))
|
||||
|
||||
Reference in New Issue
Block a user