From 4bf657cba363ccef915d416b24bbbe4132237229 Mon Sep 17 00:00:00 2001 From: Ismail Jniah <36990177+IsmailJniah@users.noreply.github.com> Date: Thu, 21 Sep 2023 19:44:21 +0200 Subject: [PATCH] Update openvidu-react-web-tutorial.spec.js --- tests/openvidu-react-web-tutorial.spec.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/openvidu-react-web-tutorial.spec.js b/tests/openvidu-react-web-tutorial.spec.js index ec36f494..8fed74bb 100644 --- a/tests/openvidu-react-web-tutorial.spec.js +++ b/tests/openvidu-react-web-tutorial.spec.js @@ -18,27 +18,27 @@ const browser = await chromium.launch({ headless: true , deviceScaleFactor: 1, await page1.click('#join input[type="submit"]'); await page1.waitForSelector('#session', { visible: true }); - await page1.waitForTimeout(5000); - //const page2 = await context.newPage(); - //await page2.goto('http://localhost:3000'); + const page2 = await context.newPage(); + + await page2.goto('http://localhost:3000'); //await page2.fill('#sessionId', 'SessionS'); - //await page2.click('#join input[type="submit"]'); - //await page2.waitForSelector('#session', { visible: true }); - //await page2.waitForTimeout(5000); + await page2.click('#join input[type="submit"]'); + await page2.waitForSelector('#session', { visible: true }); + await page2.waitForTimeout(5000); - //await page2.screenshot({ path: 'page2.png' }); + await page2.screenshot({ path: 'page2.png' }); await page1.screenshot({ path: 'page1.png' }); // Buscar los elementos HTML que contienen los streams de video - const videoElements = await page1.$$('video'); + const videoElements = await page2.$$('video'); // Comprobar que hay exactamente dos elementos encontrados expect(videoElements.length).toEqual(3); // Cerrar las páginas y el navegador. - await Promise.all([page1.close()]); + await Promise.all([page1.close(), page2.close()]); await browser.close(); });