mirror of
https://github.com/webslides/WebSlides.git
synced 2025-08-26 06:24:28 +02:00
Tests now load repository web
This commit is contained in:
@@ -4,13 +4,17 @@ import test from 'ava';
|
|||||||
let ph_, page_, status_;
|
let ph_, page_, status_;
|
||||||
|
|
||||||
const load = async () => {
|
const load = async () => {
|
||||||
await phantom.create().then(async ph => {
|
const log = console.log;
|
||||||
|
const nolog = function() {};
|
||||||
|
await phantom.create([], { logger: { warn: log, debug: nolog, error: log } }
|
||||||
|
).then(async ph => {
|
||||||
ph_ = ph;
|
ph_ = ph;
|
||||||
return await ph_.createPage();
|
return await ph_.createPage();
|
||||||
}).then(page => {
|
}).then(page => {
|
||||||
page_ = page;
|
page_ = page;
|
||||||
return page_.open('http://webslides.tv/');
|
return page_.open('file:///'+__dirname.replace(/\\/g, '/')+'/../../index.html');
|
||||||
}).then(status => {
|
}).then(async status => {
|
||||||
|
const content = await page_.property('content');
|
||||||
status_ = status;
|
status_ = status;
|
||||||
return true;
|
return true;
|
||||||
}).catch(e => console.log(e));
|
}).catch(e => console.log(e));
|
||||||
|
Reference in New Issue
Block a user