mirror of
https://github.com/webslides/WebSlides.git
synced 2025-08-23 05:14:29 +02:00
Fixing zoom test
This commit is contained in:
@@ -15,7 +15,8 @@ const simulateKeyEvent = (el, code) => {
|
|||||||
|
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
const slides = '12345'.replace(/(\d)/g,
|
const slides = '12345'.replace(/(\d)/g,
|
||||||
'<div id="section-$1" class="slide"><div>Slide $1</div></div>');
|
'<div id="section-$1" class="slide"><div>Slide $1</div></div>')
|
||||||
|
.replace('section-1" class="', 'section-1" class="current ');
|
||||||
document.body.innerHTML = `<div id="webslides">${slides}</div>`;
|
document.body.innerHTML = `<div id="webslides">${slides}</div>`;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -50,7 +51,7 @@ test('Zoom utility', () => {
|
|||||||
expect(zws.style.display).toBe('');
|
expect(zws.style.display).toBe('');
|
||||||
|
|
||||||
// Wait until next execution
|
// Wait until next execution
|
||||||
jest.runTimersToTime(401);
|
jest.runTimersToTime(500);
|
||||||
expect(disable.mock.calls.length).toBe(1);
|
expect(disable.mock.calls.length).toBe(1);
|
||||||
expect(enable.mock.calls.length).toBe(0);
|
expect(enable.mock.calls.length).toBe(0);
|
||||||
expect(goto.mock.calls.length).toBe(0);
|
expect(goto.mock.calls.length).toBe(0);
|
||||||
|
Reference in New Issue
Block a user