Merge branch 'master' into services
This commit is contained in:
@ -8,7 +8,7 @@ const startApplication = function() {
|
||||
args: ["."],
|
||||
startTimeout: 30000,
|
||||
waitTimeout: 30000,
|
||||
quitTimeout: 10000
|
||||
quitTimeout: 15000
|
||||
});
|
||||
return this.app.start();
|
||||
};
|
||||
|
@ -9,6 +9,8 @@ describe("application", () => {
|
||||
it("check start", async function() {
|
||||
const { app } = this
|
||||
await app.client.waitForExist('#index-window')
|
||||
// fix realtime config
|
||||
require('../src/background/config').reload(await app.electron.remote.app.getPath('userData'))
|
||||
});
|
||||
|
||||
//TESTS
|
||||
|
44
tests/seach.test.js
Normal file
44
tests/seach.test.js
Normal file
@ -0,0 +1,44 @@
|
||||
import { assert } from "chai";
|
||||
const asyncWait = require('../src/background/asyncWait')
|
||||
|
||||
describe("search", function() {
|
||||
this.timeout(30000);
|
||||
|
||||
it("dht seach", async function() {
|
||||
this.timeout(45000);
|
||||
const { app } = this
|
||||
await app.client.waitForExist('#searchInput')
|
||||
await app.client.$('#searchInput').setValue('1413ba1915affdc3de7e1a81d6fdc32ef19395c9')
|
||||
await app.client.click('#search')
|
||||
await app.client.waitForExist('.torrentRow .torrentName')
|
||||
const value = await app.client.$('.torrentRow .torrentName').getText()
|
||||
assert.equal(value, 'Roblox_setup.exe')
|
||||
})
|
||||
|
||||
it("sphinx search", async function() {
|
||||
const { app } = this
|
||||
await app.client.$('#searchInput').setValue('Roblox_setup')
|
||||
await app.client.click('#search')
|
||||
await app.client.waitForExist('.torrentRow .torrentName')
|
||||
const results = (await app.client.$$('.torrentRow .torrentName')).length
|
||||
assert(results >= 1)
|
||||
})
|
||||
|
||||
it("sphinx particial search", async function() {
|
||||
const { app } = this
|
||||
await app.client.$('#searchInput').setValue('Roblo')
|
||||
await app.client.click('#search')
|
||||
await app.client.waitForExist('.torrentRow .torrentName')
|
||||
const results = (await app.client.$$('.torrentRow .torrentName')).length
|
||||
assert(results >= 1)
|
||||
})
|
||||
|
||||
it("magnet search", async function() {
|
||||
const { app } = this
|
||||
await app.client.$('#searchInput').setValue('magnet:?xt=urn:btih:1413ba1915affdc3de7e1a81d6fdc32ef19395c9')
|
||||
await app.client.click('#search')
|
||||
await app.client.waitForExist('.torrentRow .torrentName')
|
||||
const results = (await app.client.$$('.torrentRow .torrentName')).length
|
||||
assert(results == 1)
|
||||
})
|
||||
});
|
Reference in New Issue
Block a user