From 0c834b041d2e2623584b65e84be4b363dccc1e23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ramos?= <86117268+nico-ramos@users.noreply.github.com> Date: Tue, 27 Dec 2022 14:55:03 -0300 Subject: [PATCH] Fix/puppeteer tests (#209) * Increased puppeteer timeout * Changed puppeteer to use docker container * Test github action * Changed github action * Increased puppeteer timeout * Removed github action test config --- .../tests/features/step-definitions/Puppeteer.steps.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/millicast-sdk/tests/features/step-definitions/Puppeteer.steps.js b/packages/millicast-sdk/tests/features/step-definitions/Puppeteer.steps.js index 33487fb2..f9624285 100644 --- a/packages/millicast-sdk/tests/features/step-definitions/Puppeteer.steps.js +++ b/packages/millicast-sdk/tests/features/step-definitions/Puppeteer.steps.js @@ -18,7 +18,7 @@ afterEach(async () => { defineFeature(feature, test => { test('Load example page with Puppeteer', ({ given, when, then }) => { given('i have a browser opened', async () => { - browser = await puppeteer.launch() + browser = await puppeteer.launch({ args: ['--no-sandbox'] }) }) when('i open a new page and go to the example web', async () => { @@ -29,13 +29,13 @@ defineFeature(feature, test => { then('the web page title says "PuppeteerJest"', async () => { await expect(page.title()).resolves.toMatch('PuppeteerJest') }) - }) + }, 100000) test('SDK loaded', ({ given, when, then }) => { let millicastModule = null given('i have a browser opened and an example page with the Millicast SDK', async () => { - browser = await puppeteer.launch() + browser = await puppeteer.launch({ args: ['--no-sandbox'] }) page = await browser.newPage() await page.goto(`file:${path.join(__dirname, '../../PuppeteerJest.html')}`) }) @@ -47,5 +47,5 @@ defineFeature(feature, test => { then('returns an instance of "millicast"', () => { expect(millicastModule).toBeDefined() }) - }) + }, 100000) })