From 42b3c5ea2081e0df15b6903f4ae8cb6bd16bb8b8 Mon Sep 17 00:00:00 2001 From: ismail Date: Wed, 24 Apr 2024 14:39:06 +0200 Subject: [PATCH] =?UTF-8?q?Actualizando=20flujo=20de=20trabajo=20y=20prueb?= =?UTF-8?q?as=20para=20el=20tutorial=20de=20grabaci=C3=B3n=20en=20Java=20d?= =?UTF-8?q?e=20OpenVidu.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/openvidu-recording-java-tutorial.yml | 2 -- .../openvidu-angular-web-tutorial.spec.js | 8 ++++---- Tests/TutorialTests/openvidu-getaroom-test.spec.js | 8 ++++---- Tests/TutorialTests/openvidu-hello-world-test.spec.js | 8 ++++---- Tests/TutorialTests/openvidu-iframe-tutorial.spec.js | 8 ++++---- .../openvidu-js-screen-share-tutorial.spec.js | 10 +++++----- Tests/TutorialTests/openvidu-js-web-tutorial.spec.js | 8 ++++---- .../TutorialTests/openvidu-react-web-tutorial.spec.js | 8 ++++---- .../openvidu-recording-java-tutorial.spec.js | 10 +++++----- .../openvidu-recording-node-tutorial.spec.js | 10 +++++----- Tests/TutorialTests/openvidu-vue-tutorial.spec.js | 8 ++++---- 11 files changed, 43 insertions(+), 45 deletions(-) diff --git a/.github/workflows/openvidu-recording-java-tutorial.yml b/.github/workflows/openvidu-recording-java-tutorial.yml index 5beaa228..e49fa714 100644 --- a/.github/workflows/openvidu-recording-java-tutorial.yml +++ b/.github/workflows/openvidu-recording-java-tutorial.yml @@ -44,8 +44,6 @@ jobs: - name: Install dependencies run: npm ci - - - name: Install Playwright Browsers run: npx playwright install diff --git a/Tests/TutorialTests/openvidu-angular-web-tutorial.spec.js b/Tests/TutorialTests/openvidu-angular-web-tutorial.spec.js index 9ed53c59..d525966b 100644 --- a/Tests/TutorialTests/openvidu-angular-web-tutorial.spec.js +++ b/Tests/TutorialTests/openvidu-angular-web-tutorial.spec.js @@ -45,7 +45,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 file. - await page1.screenshot({ path: '../results/screenshots/page1_screenshot.png' }); + await page1.screenshot({ path: '../../results/screenshots/page1_screenshot.png' }); // Navigate to the specified URL on page2. await page2.goto('http://localhost:4200'); @@ -58,7 +58,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a // Capture a screenshot of page2 and save it to a file. - await page2.screenshot({ path: '../results/screenshots/page2_screenshot.png' }); + await page2.screenshot({ path: '../../results/screenshots/page2_screenshot.png' }); // Find HTML elements that contain video streams on page2. videoElements = await page2.$$('video'); @@ -81,8 +81,8 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a await browser.close(); } catch (error) { // In case of an error, capture screenshots and log the error. - await page1.screenshot({ path: '../results/screenshots/error_page1_screenshot.png' }); - await page2.screenshot({ path: '../results/screenshots/error_page2_screenshot.png' }); + await page1.screenshot({ path: '../../results/screenshots/error_page1_screenshot.png' }); + await page2.screenshot({ path: '../../results/screenshots/error_page2_screenshot.png' }); throw error; // Rethrow the error to make the test fail. } }); diff --git a/Tests/TutorialTests/openvidu-getaroom-test.spec.js b/Tests/TutorialTests/openvidu-getaroom-test.spec.js index 1115800a..66c36f31 100644 --- a/Tests/TutorialTests/openvidu-getaroom-test.spec.js +++ b/Tests/TutorialTests/openvidu-getaroom-test.spec.js @@ -49,7 +49,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a } // Capture a screenshot of page1 and save it to a file. - await page1.screenshot({ path: '../results/screenshots/page1_screenshot.png' }); + await page1.screenshot({ path: '../../results/screenshots/page1_screenshot.png' }); // Navigate to the URL extracted from 'inputValue' on page2. await page2.goto(inputValue); @@ -60,7 +60,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a // Capture a screenshot of page2 and save it to a file. - await page2.screenshot({ path: '../results/screenshots/page2_screenshot.png' }); + await page2.screenshot({ path: '../../results/screenshots/page2_screenshot.png' }); // Find HTML elements that contain video streams on page2. videoElements = await page2.$$('video'); @@ -81,8 +81,8 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a } catch (error) { // In case of an error or timeout, capture a screenshot. - await page1.screenshot({ path: '../results/screenshots/error_page1_screenshot.png' }); - await page2.screenshot({ path: '../results/screenshots/error_page2_screenshot.png' }); + await page1.screenshot({ path: '../../results/screenshots/error_page1_screenshot.png' }); + await page2.screenshot({ path: '../../results/screenshots/error_page2_screenshot.png' }); // Rethrow the error to make the test fail. throw error; diff --git a/Tests/TutorialTests/openvidu-hello-world-test.spec.js b/Tests/TutorialTests/openvidu-hello-world-test.spec.js index 25cc02cf..3c27974c 100644 --- a/Tests/TutorialTests/openvidu-hello-world-test.spec.js +++ b/Tests/TutorialTests/openvidu-hello-world-test.spec.js @@ -43,7 +43,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a // Capture a screenshot of page1 and save it to a file. - await page1.screenshot({ path: '../results/screenshots/page1_screenshot.png' }); + await page1.screenshot({ path: '../../results/screenshots/page1_screenshot.png' }); // Navigate to a specific URL on page 1. await page2.goto('http://localhost:8080'); @@ -54,7 +54,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a await page2.waitForTimeout(5000); // Capture a screenshot of page2 and save it to a file. - await page2.screenshot({ path: '../results/screenshots/page2_screenshot.png' }); + await page2.screenshot({ path: '../../results/screenshots/page2_screenshot.png' }); // Find HTML elements containing video streams on page2 and check if there are exactly two of them. videoElements = await page2.$$('video'); @@ -77,8 +77,8 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a } catch (error) { // In case of an error, capture screenshots and log the error. - await page1.screenshot({ path: '../results/screenshots/error_page1_screenshot.png' }); - await page2.screenshot({ path: '../results/screenshots/error_page2_screenshot.png' }); + await page1.screenshot({ path: '../../results/screenshots/error_page1_screenshot.png' }); + await page2.screenshot({ path: '../../results/screenshots/error_page2_screenshot.png' }); throw error; // Rethrow the error to make the test fail. } }); diff --git a/Tests/TutorialTests/openvidu-iframe-tutorial.spec.js b/Tests/TutorialTests/openvidu-iframe-tutorial.spec.js index 6089e441..3647c869 100644 --- a/Tests/TutorialTests/openvidu-iframe-tutorial.spec.js +++ b/Tests/TutorialTests/openvidu-iframe-tutorial.spec.js @@ -44,7 +44,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a } - await page1.screenshot({ path: '../results/screenshots/page1_screenshot.png' }); + await page1.screenshot({ path: '../../results/screenshots/page1_screenshot.png' }); // Navigate to the specified URL on page2. await page2.goto('http://localhost:8081/'); @@ -57,7 +57,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a await frame.waitForTimeout(5000); // Capture a screenshot of page2 and save it to 'pr.png'. - await page2.screenshot({ path: '../results/screenshots/page2_screensho.png' }); + await page2.screenshot({ path: '../../results/screenshots/page2_screensho.png' }); // Find HTML elements within the frame that contain video streams. videoElements = await frame.$$('video'); @@ -79,8 +79,8 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a } catch (error) { // In case of an error or timeout, capture screenshots. - await page1.screenshot({ path: '../results/screenshots/error_page1_screenshot.png' }); - await page2.screenshot({ path: '../results/screenshots/error_page2_screenshot.png' }); + await page1.screenshot({ path: '../../results/screenshots/error_page1_screenshot.png' }); + await page2.screenshot({ path: '../../results/screenshots/error_page2_screenshot.png' }); // Rethrow the error to make the test fail. throw error; diff --git a/Tests/TutorialTests/openvidu-js-screen-share-tutorial.spec.js b/Tests/TutorialTests/openvidu-js-screen-share-tutorial.spec.js index 587b448e..be6037e2 100644 --- a/Tests/TutorialTests/openvidu-js-screen-share-tutorial.spec.js +++ b/Tests/TutorialTests/openvidu-js-screen-share-tutorial.spec.js @@ -40,9 +40,9 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a expect(isPaused).not.toBe(true); } - + // Capture a screenshot of page1 and save it to 'results/screenshot/page1.png'. - await page1.screenshot({ path: '../results/screenshots/page1.png' }); + await page1.screenshot({ path: '../../results/screenshots/page1.png' }); // Navigate to the specified URL on page2. await page2.goto('http://localhost:8080'); @@ -72,15 +72,15 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a } // Capture a screenshot of page2 and save it to 'results/screenshot/page2.png'. - await page2.screenshot({ path: '../results/screenshots/page2.png' }); + await page2.screenshot({ path: '../../results/screenshots/page2.png' }); // Close the pages and the browser. await Promise.all([page1.close(), page2.close()]); await browser.close(); } catch (error) { // In case of an error or timeout, capture screenshots. - await page1.screenshot({ path: '../results/screenshots/error_page1_screenshot.png' }); - await page2.screenshot({ path: '../results/screenshots/error_page2_screenshot.png' }); + await page1.screenshot({ path: '../../results/screenshots/error_page1_screenshot.png' }); + await page2.screenshot({ path: '../../results/screenshots/error_page2_screenshot.png' }); // Rethrow the error to make the test fail. throw error; diff --git a/Tests/TutorialTests/openvidu-js-web-tutorial.spec.js b/Tests/TutorialTests/openvidu-js-web-tutorial.spec.js index f14b6099..3bd89bf8 100644 --- a/Tests/TutorialTests/openvidu-js-web-tutorial.spec.js +++ b/Tests/TutorialTests/openvidu-js-web-tutorial.spec.js @@ -49,7 +49,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a // Capture a screenshot of page1 and save it to a specific location. - await page1.screenshot({ path: '../results/screenshots/page1.png' }); + await page1.screenshot({ path: '../../results/screenshots/page1.png' }); @@ -63,7 +63,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a await page2.waitForTimeout(5000); // Capture a screenshot of page2 and save it to a specific location. - await page2.screenshot({ path: '../results/screenshots/page2.png' }); + await page2.screenshot({ path: '../../results/screenshots/page2.png' }); // Find HTML elements within page2 that contain video streams. videoElements = await page2.$$('video'); @@ -86,8 +86,8 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a await browser.close(); } catch (error) { // In case of an error or timeout, capture screenshots. - await page1.screenshot({ path: '../results/screenshots/error_page1_screenshot.png' }); - await page2.screenshot({ path: '../results/screenshots/error_page2_screenshot.png' }); + await page1.screenshot({ path: '../../results/screenshots/error_page1_screenshot.png' }); + await page2.screenshot({ path: '../../results/screenshots/error_page2_screenshot.png' }); // Rethrow the error to make the test fail. throw error; diff --git a/Tests/TutorialTests/openvidu-react-web-tutorial.spec.js b/Tests/TutorialTests/openvidu-react-web-tutorial.spec.js index 13a9ff51..2b3dce03 100644 --- a/Tests/TutorialTests/openvidu-react-web-tutorial.spec.js +++ b/Tests/TutorialTests/openvidu-react-web-tutorial.spec.js @@ -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' }); + await page1.screenshot({ path: '../../results/screenshots/page1.png' }); // Navigate to a specific URL on page2. await page2.goto('http://localhost:3000'); @@ -58,7 +58,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a await page2.waitForTimeout(10000); // Capture a screenshot of page2 and save it to a specific location. - await page2.screenshot({ path: '../results/screenshots/page2.png' }); + await page2.screenshot({ path: '../../results/screenshots/page2.png' }); // Find HTML elements within page2 that contain video streams. videoElements = await page2.$$('video'); @@ -81,8 +81,8 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a await browser.close(); } catch (error) { // In case of an error or timeout, capture screenshots. - await page1.screenshot({ path: '../results/screenshots/error_page1_screenshot.png' }); - await page2.screenshot({ path: '../results/screenshots/error_page2_screenshot.png' }); + await page1.screenshot({ path: '../../results/screenshots/error_page1_screenshot.png' }); + await page2.screenshot({ path: '../../results/screenshots/error_page2_screenshot.png' }); // Rethrow the error to make the test fail. throw error; diff --git a/Tests/TutorialTests/openvidu-recording-java-tutorial.spec.js b/Tests/TutorialTests/openvidu-recording-java-tutorial.spec.js index 92e63c0c..a4691968 100644 --- a/Tests/TutorialTests/openvidu-recording-java-tutorial.spec.js +++ b/Tests/TutorialTests/openvidu-recording-java-tutorial.spec.js @@ -46,7 +46,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a // Capture a screenshot of the first page and save it to a file. - await page1.screenshot({ path: '../results/screenshots/page1_screenshot.png' }); + await page1.screenshot({ path: '../../results/screenshots/page1_screenshot.png' }); // Navigate to a specific URL on the second page. await page2.goto('https://localhost:5000'); @@ -56,11 +56,11 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a await page2.waitForSelector('#session', { visible: true }); await page2.click('#buttonStartRecording'); await page2.click('#buttonGetRecording'); - await page2.screenshot({ path: '../results/screenshots/page2_startrecording_screenshot.png' }); + await page2.screenshot({ path: '../../results/screenshots/page2_startrecording_screenshot.png' }); await page2.waitForTimeout(5000); await page2.click('#buttonStopRecording'); await page2.click('#buttonGetRecording'); - await page2.screenshot({ path: '../results/screenshots/page2_stoprecording_screenshot.png' }); + await page2.screenshot({ path: '../../results/screenshots/page2_stoprecording_screenshot.png' }); // Find video elements on the second page and verify there are exactly two. videoElements = await page2.$$('video'); @@ -80,8 +80,8 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a } catch (error) { // In case of error, capture screenshots and log the error. - await page1.screenshot({ path: '../results/screenshots/error_page1_screenshot.png' }); - await page2.screenshot({ path: '../results/screenshots/error_page2_screenshot.png' }); + await page1.screenshot({ path: '../../results/screenshots/error_page1_screenshot.png' }); + await page2.screenshot({ path: '../../results/screenshots/error_page2_screenshot.png' }); throw error; // Rethrow the error to make the test fail } }); diff --git a/Tests/TutorialTests/openvidu-recording-node-tutorial.spec.js b/Tests/TutorialTests/openvidu-recording-node-tutorial.spec.js index 6fce7114..22c7ec10 100644 --- a/Tests/TutorialTests/openvidu-recording-node-tutorial.spec.js +++ b/Tests/TutorialTests/openvidu-recording-node-tutorial.spec.js @@ -46,7 +46,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a // Capture a screenshot of the first page and save it to a file. - await page1.screenshot({ path: '../results/screenshots/page1_screenshot.png' }); + await page1.screenshot({ path: '../../results/screenshots/page1_screenshot.png' }); // Navigate to a specific URL on the second page. await page2.goto('https://localhost:5000'); @@ -57,10 +57,10 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a await page2.click('#buttonStartRecording'); await page2.click('#buttonGetRecording'); await page2.waitForTimeout(5000); - await page2.screenshot({ path: '../results/screenshots/page2_startrecording_screenshot.png' }); + await page2.screenshot({ path: '../../results/screenshots/page2_startrecording_screenshot.png' }); await page2.click('#buttonStopRecording'); await page2.click('#buttonGetRecording'); - await page2.screenshot({ path: '../results/screenshots/page2_stoprecording_screenshot.png' }); + await page2.screenshot({ path: '../../results/screenshots/page2_stoprecording_screenshot.png' }); // Find video elements on the second page and verify there are exactly two. videoElements = await page2.$$('video'); @@ -81,8 +81,8 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a } catch (error) { // In case of error, capture screenshots and log the error. - await page1.screenshot({ path: '../results/screenshots/error_page1_screenshot.png' }); - await page2.screenshot({ path: '../results/screenshots/error_page2_screenshot.png' }); + await page1.screenshot({ path: '../../results/screenshots/error_page1_screenshot.png' }); + await page2.screenshot({ path: '../../results/screenshots/error_page2_screenshot.png' }); throw error; // Rethrow the error to make the test fail } }); diff --git a/Tests/TutorialTests/openvidu-vue-tutorial.spec.js b/Tests/TutorialTests/openvidu-vue-tutorial.spec.js index 0075e2ac..f4539731 100644 --- a/Tests/TutorialTests/openvidu-vue-tutorial.spec.js +++ b/Tests/TutorialTests/openvidu-vue-tutorial.spec.js @@ -44,7 +44,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a // Capture a screenshot of page 1 and save it to a file. - await page1.screenshot({ path: '../results/screenshots/page1_screenshot.png' }); + await page1.screenshot({ path: '../../results/screenshots/page1_screenshot.png' }); // Navigate to a specific URL on page 2 and perform similar actions to page 1. await page2.goto('http://localhost:8080'); @@ -67,7 +67,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a } // Capture a screenshot of page 2 and save it to a file. - await page2.screenshot({ path: '../results/screenshots/page2_screenshot.png' }); + await page2.screenshot({ path: '../../results/screenshots/page2_screenshot.png' }); // Close the pages and the browser. await Promise.all([page1.close(), page2.close()]); @@ -75,8 +75,8 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a } catch (error) { // In case of error, capture screenshots and log the error. - await page1.screenshot({ path: '../results/screenshots/error_page1_screenshot.png' }); - await page2.screenshot({ path: '../results/screenshots/error_page2_screenshot.png' }); + await page1.screenshot({ path: '../../results/screenshots/error_page1_screenshot.png' }); + await page2.screenshot({ path: '../../results/screenshots/error_page2_screenshot.png' }); throw error; // Rethrow the error to make the test fail. } });