mirror of
https://github.com/webslides/WebSlides.git
synced 2025-08-26 14:34:27 +02:00
New test: goPrev
This commit is contained in:
@@ -87,6 +87,24 @@ test.serial('goNext', async t => {
|
|||||||
test.serial('Has only one slide visible', onlyOneVisible);
|
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
|
* Last test
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user