Skip to content

Commit

Permalink
cambios en Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
IsmailJniah committed Apr 24, 2024
1 parent d06dfdb commit d495374
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 33 deletions.
2 changes: 0 additions & 2 deletions Tests/TutorialTests/openvidu-getaroom-test.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a

}

expect(videoElements.length).toEqual(1);

// Capture a screenshot of page1 and save it to a file.
await page1.screenshot({ path: '../results/screenshots/page1_screenshot.png' });

Expand Down
1 change: 1 addition & 0 deletions Tests/TutorialTests/openvidu-iframe-tutorial.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a

expect(videoElements.length).toEqual(1);


for (const videoElement of videoElements) {

const isPaused = await videoElement.evaluate(video => video.paused);
Expand Down
18 changes: 4 additions & 14 deletions Tests/TutorialTests/openvidu-js-screen-share-tutorial.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a

var videoElements = await page1.$$('video');

expect(videoElements.length).toEqual(1);

expect(videoElements.length).toEqual(2);
for (const videoElement of videoElements) {

const isPaused = await videoElement.evaluate(video => video.paused);
Expand All @@ -40,7 +40,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a

}

expect(videoElements.length).toEqual(2);


// Capture a screenshot of page1 and save it to 'results/screenshot/page1.png'.
await page1.screenshot({ path: '../results/screenshots/page1.png' });
Expand All @@ -58,17 +58,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a


// Find HTML elements within page2 that contain video streams.
videoElements = await page2.$$('video');

expect(videoElements.length).toEqual(2);

for (const videoElement of videoElements) {

const isPaused = await videoElement.evaluate(video => video.paused);

expect(isPaused).not.toBe(true);

}
videoElements = await page2.$$('video');

// Check that there are exactly four elements found.
expect(videoElements.length).toEqual(4);
Expand Down
4 changes: 2 additions & 2 deletions Tests/TutorialTests/openvidu-js-web-tutorial.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a

var videoElements = await page1.$$('video');

expect(videoElements.length).toEqual(1);
expect(videoElements.length).toEqual(2);

for (const videoElement of videoElements) {

Expand All @@ -46,7 +46,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a

}

expect(videoElements.length).toEqual(2);


// Capture a screenshot of page1 and save it to a specific location.
await page1.screenshot({ path: '../results/screenshots/page1.png' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a
expect(isPaused).not.toBe(true);

}
expect(videoElements.length).toEqual(1);


// Capture a screenshot of the first page and save it to a file.
await page1.screenshot({ path: '../results/screenshots/page1_screenshot.png' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a
expect(isPaused).not.toBe(true);

}
expect(videoElements.length).toEqual(1);


// Capture a screenshot of the first page and save it to a file.
await page1.screenshot({ path: '../results/screenshots/page1_screenshot.png' });
Expand Down
16 changes: 3 additions & 13 deletions Tests/TutorialTests/openvidu-vue-tutorial.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a
// Find video elements on page 1 and verify there are exactly two of them.
var videoElements = await page1.$$('video');

expect(videoElements.length).toEqual(1);
expect(videoElements.length).toEqual(2);

for (const videoElement of videoElements) {

Expand All @@ -41,7 +41,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a
expect(isPaused).not.toBe(true);

}
expect(videoElements.length).toEqual(2);


// Capture a screenshot of page 1 and save it to a file.
await page1.screenshot({ path: '../results/screenshots/page1_screenshot.png' });
Expand All @@ -54,17 +54,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a
await page2.waitForTimeout(5000);

// Find video elements on page 2 and verify there are exactly two of them.
videoElements = await page2.$$('video');

expect(videoElements.length).toEqual(2);

for (const videoElement of videoElements) {

const isPaused = await videoElement.evaluate(video => video.paused);

expect(isPaused).not.toBe(true);

}
videoElements = await page2.$$('video');
expect(videoElements.length).toEqual(3);

// Capture a screenshot of page 2 and save it to a file.
Expand Down

0 comments on commit d495374

Please sign in to comment.