mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-11 19:00:00 +01:00
jest.setTimeout(30000);
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
const timeout = process.env.SLOWMO ? 30000 : 10000;
|
||||
jest.setTimeout(30000);
|
||||
jest.useFakeTimers('legacy');
|
||||
|
||||
const fs = require('fs');
|
||||
@@ -19,49 +19,49 @@ describe('Clear and Delete Steps', () => {
|
||||
const Length1 = await page.evaluate(() => document.querySelectorAll('.step').length);
|
||||
expect(Length).toBe(1);
|
||||
expect(Length1).toBe(2);
|
||||
}, timeout);
|
||||
});
|
||||
|
||||
test('Brightness Module is added', async () => {
|
||||
|
||||
await page.click('[data-value=\'brightness\']');
|
||||
const Length2 = await page.evaluate(() => document.querySelectorAll('.step').length);
|
||||
expect(Length2).toBe(3);
|
||||
}, timeout);
|
||||
});
|
||||
|
||||
test('Contrast Module is added', async () => {
|
||||
|
||||
await page.click('[data-value=\'contrast\']');
|
||||
const Length3 = await page.evaluate(() => document.querySelectorAll('.step').length);
|
||||
expect(Length3).toBe(4);
|
||||
}, timeout);
|
||||
});
|
||||
|
||||
test('Saturation Module is added', async () => {
|
||||
|
||||
await page.click('[data-value=\'saturation\']');
|
||||
const Length4 = await page.evaluate(() => document.querySelectorAll('.step').length);
|
||||
expect(Length4).toBe(5);
|
||||
}, timeout);
|
||||
});
|
||||
|
||||
test('Rotate Module is added', async () => {
|
||||
|
||||
await page.click('[data-value=\'rotate\']');
|
||||
const Length5 = await page.evaluate(() => document.querySelectorAll('.step').length);
|
||||
expect(Length5).toBe(6);
|
||||
}, timeout);
|
||||
});
|
||||
|
||||
test('Crop Module is added', async () => {
|
||||
|
||||
await page.click('[data-value=\'crop\']');
|
||||
const Length6 = await page.evaluate(() => document.querySelectorAll('.step').length);
|
||||
expect(Length6).toBe(7);
|
||||
}, timeout);
|
||||
});
|
||||
|
||||
test('Delete step is pressed', async () => {
|
||||
|
||||
await page.evaluate(() => { document.querySelectorAll('.remove')[1].click(); });
|
||||
const Length7 = await page.evaluate(() => document.querySelectorAll('.step').length);
|
||||
expect(Length7).toBe(6);
|
||||
}, timeout);
|
||||
});
|
||||
|
||||
test('Clear Step is pressed', async () => {
|
||||
|
||||
@@ -77,11 +77,5 @@ describe('Clear and Delete Steps', () => {
|
||||
catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}, timeout);
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user