Skip to content

Commit

Permalink
Actualizando configuraciones y reorganizando pruebas de tutoriales en…
Browse files Browse the repository at this point in the history
… directorio de pruebas.
  • Loading branch information
IsmailJniah committed Apr 24, 2024
1 parent 87047e4 commit 70ba4c9
Show file tree
Hide file tree
Showing 20 changed files with 41 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/openvidu-angular-tutorial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
run: npm install @playwright/test

- name: Runing Test
working-directory: tests
working-directory: tests/tutorialtests
run: |
npx playwright test openvidu-angular-web-tutorial.spec.js
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/openvidu-getaroom-tutorial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
run: npm install @playwright/test

- name: Runing Test
working-directory: tests
working-directory: tests/tutorialtests
run: |
npx playwright test openvidu-getaroom-test.spec.js
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/openvidu-hello-world-tutorial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: npm install @playwright/test

- name: Runing Test
working-directory: tests
working-directory: tests/tutorialtests
run: |
npx playwright test openvidu-hello-world-test.spec.js
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/openvidu-iframe-tutorial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
run: npm install @playwright/test

- name: Runing Test
working-directory: tests
working-directory: tests/tutorialtests
run: |
npx playwright test tests/openvidu-iframe-tutorial.spec.js
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/openvidu-js-screen-share-tutorial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: npm install @playwright/test

- name: Runing Test
working-directory: tests
working-directory: tests/tutorialtests
run: |
npx playwright test tests/openvidu-js-screen-share-tutorial.spec.js
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/openvidu-js-tutorial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
run: npm install @playwright/test

- name: Runing Test
working-directory: tests
working-directory: tests/tutorialtests
run: |
npx playwright test openvidu-js-web-tutorial.spec.js
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/openvidu-react-tutorial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
run: npm install @playwright/test

- name: Runing Test
working-directory: tests
working-directory: tests/tutorialtests
run: |
npx playwright test openvidu-react-web-tutorial.spec.js
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/openvidu-recording-java-tutorial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
run: npm install @playwright/test

- name: Runing Test
working-directory: tests
working-directory: tests/tutorialtests
run: |
npx playwright test tests/openvidu-recording-java-tutorial.spec.js
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/openvidu-recording-node-tutorial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
run: npm install @playwright/test

- name: Runing Test
working-directory: tests
working-directory: tests/tutorialtests
run: |
npx playwright test tests/openvidu-recording-node-tutorial.spec.js
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/openvidu-vue-tutorial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
run: npm install @playwright/test

- name: Runing Test
working-directory: tests
working-directory: tests/tutorialtests
run: |
npx playwright test openvidu-vue-tutorial.spec.js
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { test, expect, chromium } = require('@playwright/test');
test('Checking for the presence of two active webcams in an OpenVidu session', async () => {
// Launch a headless Chromium browser with specific settings.
const browser = await chromium.launch({
headless: true,
headless: false,
deviceScaleFactor: 1,
userAgent: 'Chrome/88.0.4324.182', // Specify the user agent
args: ["--use-fake-ui-for-media-stream", "--use-fake-device-for-media-stream"]
Expand All @@ -29,9 +29,18 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a
await page1.waitForTimeout(5000);

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

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

for (const videoElement of videoElements) {

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

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

}


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

Expand All @@ -48,8 +57,28 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a

// Find HTML elements containing video streams on page2 and check if 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);

}

var isMuted = await videoElements[1].evaluate(video => video.muted);

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

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

isMuted = await videoElements[1].evaluate(video => video.muted);

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


// Close the pages and the browser.
await Promise.all([page1.close(), page2.close()]);
await browser.close();
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 70ba4c9

Please sign in to comment.