Skip to content

Commit

Permalink
Update openvidu-react-web-tutorial.spec.js
Browse files Browse the repository at this point in the history
  • Loading branch information
IsmailJniah authored Sep 21, 2023
1 parent 3e9511b commit 47211a4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/openvidu-react-web-tutorial.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,26 @@ const browser = await chromium.launch({ headless: true , deviceScaleFactor: 1,
await page1.click('#join input[type="submit"]');
await page1.waitForSelector('#session', { visible: true });

const page2 = await context.newPage();
//const page2 = await context.newPage();

await page2.goto('http://localhost:3000');
//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 page2.$$('video');
const videoElements = await page1.$$('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(), page2.close()]);
await Promise.all([page1.close()]);
await browser.close();
});

0 comments on commit 47211a4

Please sign in to comment.