diff --git a/packages/vue/examples/__tests__/commits.spec.ts b/packages/vue/examples/__tests__/commits.spec.ts index 96a31505..d48a1957 100644 --- a/packages/vue/examples/__tests__/commits.spec.ts +++ b/packages/vue/examples/__tests__/commits.spec.ts @@ -1,5 +1,5 @@ import path from 'path' -import { setupPuppeteer } from './e2eUtils' +import { setupPuppeteer, E2E_TIMEOUT } from './e2eUtils' import mocks from './commits.mock' describe('e2e: commits', () => { @@ -46,11 +46,19 @@ describe('e2e: commits', () => { expect(await count('li .message')).toBe(3) } - test('classic', async () => { - await testCommits('classic') - }) + test( + 'classic', + async () => { + await testCommits('classic') + }, + E2E_TIMEOUT + ) - test('composition', async () => { - await testCommits('composition') - }) + test( + 'composition', + async () => { + await testCommits('composition') + }, + E2E_TIMEOUT + ) }) diff --git a/packages/vue/examples/__tests__/e2eUtils.ts b/packages/vue/examples/__tests__/e2eUtils.ts index 153b5660..db79a9c5 100644 --- a/packages/vue/examples/__tests__/e2eUtils.ts +++ b/packages/vue/examples/__tests__/e2eUtils.ts @@ -1,5 +1,7 @@ import puppeteer from 'puppeteer' +export const E2E_TIMEOUT = 30 * 1000 + const puppeteerOptions = process.env.CI ? { args: ['--no-sandbox', '--disable-setuid-sandbox'] } : {} diff --git a/packages/vue/examples/__tests__/grid.spec.ts b/packages/vue/examples/__tests__/grid.spec.ts index abb7c00d..fe57806b 100644 --- a/packages/vue/examples/__tests__/grid.spec.ts +++ b/packages/vue/examples/__tests__/grid.spec.ts @@ -1,5 +1,5 @@ import path from 'path' -import { setupPuppeteer } from './e2eUtils' +import { setupPuppeteer, E2E_TIMEOUT } from './e2eUtils' interface TableData { name: string @@ -103,11 +103,19 @@ describe('e2e: grid', () => { expect(await count('p')).toBe(1) } - test('classic', async () => { - await testGrid('classic') - }) + test( + 'classic', + async () => { + await testGrid('classic') + }, + E2E_TIMEOUT + ) - test('composition', async () => { - await testGrid('composition') - }) + test( + 'composition', + async () => { + await testGrid('composition') + }, + E2E_TIMEOUT + ) }) diff --git a/packages/vue/examples/__tests__/markdown.spec.ts b/packages/vue/examples/__tests__/markdown.spec.ts index 6b248cb5..3f257015 100644 --- a/packages/vue/examples/__tests__/markdown.spec.ts +++ b/packages/vue/examples/__tests__/markdown.spec.ts @@ -1,5 +1,5 @@ import path from 'path' -import { setupPuppeteer } from './e2eUtils' +import { setupPuppeteer, E2E_TIMEOUT } from './e2eUtils' describe('e2e: markdown', () => { const { page, isVisible, value, html } = setupPuppeteer() @@ -26,11 +26,19 @@ describe('e2e: markdown', () => { ) } - test('classic', async () => { - await testMarkdown('classic') - }) + test( + 'classic', + async () => { + await testMarkdown('classic') + }, + E2E_TIMEOUT + ) - test('composition', async () => { - await testMarkdown('composition') - }) + test( + 'composition', + async () => { + await testMarkdown('composition') + }, + E2E_TIMEOUT + ) }) diff --git a/packages/vue/examples/__tests__/svg.spec.ts b/packages/vue/examples/__tests__/svg.spec.ts index b340601b..5ba9202c 100644 --- a/packages/vue/examples/__tests__/svg.spec.ts +++ b/packages/vue/examples/__tests__/svg.spec.ts @@ -1,5 +1,5 @@ import path from 'path' -import { setupPuppeteer } from './e2eUtils' +import { setupPuppeteer, E2E_TIMEOUT } from './e2eUtils' declare const globalStats: { label: string @@ -66,11 +66,19 @@ describe('e2e: svg', () => { await assertStats(6) } - test('classic', async () => { - await testSvg('classic') - }) + test( + 'classic', + async () => { + await testSvg('classic') + }, + E2E_TIMEOUT + ) - test('composition', async () => { - await testSvg('composition') - }) + test( + 'composition', + async () => { + await testSvg('composition') + }, + E2E_TIMEOUT + ) }) diff --git a/packages/vue/examples/__tests__/todomvc.spec.ts b/packages/vue/examples/__tests__/todomvc.spec.ts index a9df1dd5..de551023 100644 --- a/packages/vue/examples/__tests__/todomvc.spec.ts +++ b/packages/vue/examples/__tests__/todomvc.spec.ts @@ -1,5 +1,5 @@ import path from 'path' -import { setupPuppeteer } from './e2eUtils' +import { setupPuppeteer, E2E_TIMEOUT } from './e2eUtils' describe('e2e: todomvc', () => { const { @@ -169,11 +169,19 @@ describe('e2e: todomvc', () => { expect(await count('.todo:not(.completed)')).toBe(3) } - test('classic', async () => { - await testTodomvc('classic') - }) + test( + 'classic', + async () => { + await testTodomvc('classic') + }, + E2E_TIMEOUT + ) - test('composition', async () => { - await testTodomvc('composition') - }) + test( + 'composition', + async () => { + await testTodomvc('composition') + }, + E2E_TIMEOUT + ) }) diff --git a/packages/vue/examples/__tests__/tree.spec.ts b/packages/vue/examples/__tests__/tree.spec.ts index e8c6eb5b..c8095b0a 100644 --- a/packages/vue/examples/__tests__/tree.spec.ts +++ b/packages/vue/examples/__tests__/tree.spec.ts @@ -1,5 +1,5 @@ import path from 'path' -import { setupPuppeteer } from './e2eUtils' +import { setupPuppeteer, E2E_TIMEOUT } from './e2eUtils' describe('e2e: tree', () => { const { page, click, count, text, children, isVisible } = setupPuppeteer() @@ -97,11 +97,19 @@ describe('e2e: tree', () => { ) } - test('classic', async () => { - await testTree('classic') - }) + test( + 'classic', + async () => { + await testTree('classic') + }, + E2E_TIMEOUT + ) - test('composition', async () => { - await testTree('composition') - }) + test( + 'composition', + async () => { + await testTree('composition') + }, + E2E_TIMEOUT + ) })