1
0
mirror of https://github.com/webslides/WebSlides.git synced 2025-08-25 14:10:42 +02:00

New test: has slides

This commit is contained in:
Luis
2017-04-23 18:04:58 +02:00
parent 17cb40e21b
commit 98717b15a4

View File

@@ -24,19 +24,25 @@ test.serial("Page loaded", async t => {
test.serial('#webslides exits', async t => {
await page_
.evaluate( () => document.querySelector('#webslides') != null )
.then( ws => { t.truthy(ws); } );
.then( ok => { t.truthy(ok); } );
});
test.serial('WebSlides object exits', async t => {
await page_
.evaluate( () => window.ws != null )
.then( ws => { t.truthy(ws); } );
.then( ok => { t.truthy(ok); } );
});
test.serial('Has slides', async t => {
await page_
.evaluate( () => window.ws.slides.length > 0 )
.then( ok => { t.truthy(ok); } );
});
test.serial('First slide visible', async t => {
await page_
.evaluate( () => window.ws.slides[0].el.style.display != 'none' )
.then( ws => { t.truthy(ws); } );
.evaluate( () => window.ws.slides[0].el.style.display != 'none' )
.then( ok => { t.truthy(ok); } );
});
/**