1
0
mirror of https://github.com/webslides/WebSlides.git synced 2025-08-25 22:20:46 +02:00

New test: goPrev

This commit is contained in:
Luis
2017-04-26 18:35:07 +02:00
parent 7299f5a6dd
commit 0d1769d920

View File

@@ -87,6 +87,24 @@ test.serial('goNext', async t => {
test.serial('Has only one slide visible', onlyOneVisible);
test.serial('goPrev', async t => {
// First needs to execute the function
page_
.evaluate( () => {
window.ws.goPrev();
return true;
});
// Then wait
await timeout(600);
// Finally test
await page_
.evaluate( () => window.ws.slides[0].el.style.display != 'none' )
.then( ok => { t.true(ok); } );
});
test.serial('Has only one slide visible', onlyOneVisible);
/**
* Last test
*/