ov-components: update E2E test names and add chat feature tests

master
Carlos Santos 2025-05-20 17:38:06 +02:00
parent 920bba1bf3
commit 1cba6761bb
3 changed files with 19 additions and 30 deletions

View File

@ -204,7 +204,7 @@ jobs:
uses: ./.github/actions/setup-openvidu-call-backend uses: ./.github/actions/setup-openvidu-call-backend
- name: Build and Serve openvidu-components-angular Testapp - name: Build and Serve openvidu-components-angular Testapp
uses: ./.github/actions/build-and-serve-components-testapp uses: ./.github/actions/build-and-serve-components-testapp
- name: Run Webcomponent E2E - name: Run Tests
env: env:
LAUNCH_MODE: CI LAUNCH_MODE: CI
run: npm run e2e:lib-directives --prefix openvidu-components-angular run: npm run e2e:lib-directives --prefix openvidu-components-angular
@ -212,9 +212,9 @@ jobs:
if: always() if: always()
uses: ./.github/actions/cleanup uses: ./.github/actions/cleanup
webcomponent_e2e_chat: e2e_chat:
needs: test_setup needs: test_setup
name: Webcomponent chat name: Chat E2E
if: false if: false
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -236,26 +236,12 @@ jobs:
uses: ./.github/actions/setup-local-deployment uses: ./.github/actions/setup-local-deployment
- name: Setup OpenVidu Call Backend - name: Setup OpenVidu Call Backend
uses: ./.github/actions/setup-openvidu-call-backend uses: ./.github/actions/setup-openvidu-call-backend
- name: Install dependencies - name: Build and Serve openvidu-components-angular Testapp
run: | uses: ./.github/actions/build-and-serve-components-testapp
cd openvidu-components-angular - name: Run Tests
npm install
- name: Build openvidu-angular
run: npm run lib:build --prefix openvidu-components-angular
- name: Build openvidu-webcomponent
run: npm run webcomponent:testing-build --prefix openvidu-components-angular
- name: Serve Webcomponent Testapp
run: npm run webcomponent:serve-testapp --prefix openvidu-components-angular &
- name: Wait for openvidu-components-angular Testapp
run: |
until curl -s -f -o /dev/null http://localhost:8080; do
echo "Waiting for openvidu-components-angular Testapp to be ready..."
sleep 5
done
- name: Run Webcomponent E2E
env: env:
LAUNCH_MODE: CI LAUNCH_MODE: CI
run: npm run e2e:webcomponent-chat --prefix openvidu-components-angular run: npm run e2e:lib-chat --prefix openvidu-components-angular
- name: Cleanup - name: Cleanup
if: always() if: always()
uses: ./.github/actions/cleanup uses: ./.github/actions/cleanup

View File

@ -1,9 +1,8 @@
import { Builder, WebDriver } from 'selenium-webdriver'; import { Builder, WebDriver } from 'selenium-webdriver';
import { OPENVIDU_CALL_SERVER } from '../config'; import { TestAppConfig } from './selenium.conf';
import { WebComponentConfig } from '../selenium.conf'; import { OpenViduComponentsPO } from './utils.po.test';
import { OpenViduComponentsPO } from '../utils.po.test';
const url = `${WebComponentConfig.appUrl}?OV_URL=${OPENVIDU_CALL_SERVER}`; const url = TestAppConfig.appUrl;
describe('Testing CHAT features', () => { describe('Testing CHAT features', () => {
let browser: WebDriver; let browser: WebDriver;
@ -11,10 +10,10 @@ describe('Testing CHAT features', () => {
async function createChromeBrowser(): Promise<WebDriver> { async function createChromeBrowser(): Promise<WebDriver> {
return await new Builder() return await new Builder()
.forBrowser(WebComponentConfig.browserName) .forBrowser(TestAppConfig.browserName)
.withCapabilities(WebComponentConfig.browserCapabilities) .withCapabilities(TestAppConfig.browserCapabilities)
.setChromeOptions(WebComponentConfig.browserOptions) .setChromeOptions(TestAppConfig.browserOptions)
.usingServer(WebComponentConfig.seleniumAddress) .usingServer(TestAppConfig.seleniumAddress)
.build(); .build();
} }
@ -24,6 +23,10 @@ describe('Testing CHAT features', () => {
}); });
afterEach(async () => { afterEach(async () => {
try {
// leaving room if connected
await utils.leaveRoom();
} catch (error) {}
await browser.quit(); await browser.quit();
}); });

View File

@ -90,8 +90,8 @@
"e2e:nested-events": "tsc --project ./e2e && npx jasmine --fail-fast ./e2e/dist/nested-components/events.test.js", "e2e:nested-events": "tsc --project ./e2e && npx jasmine --fail-fast ./e2e/dist/nested-components/events.test.js",
"e2e:nested-structural-directives": "tsc --project ./e2e && npx jasmine --fail-fast ./e2e/dist/nested-components/structural-directives.test.js", "e2e:nested-structural-directives": "tsc --project ./e2e && npx jasmine --fail-fast ./e2e/dist/nested-components/structural-directives.test.js",
"e2e:nested-attribute-directives": "tsc --project ./e2e && npx jasmine --fail-fast ./e2e/dist/nested-components/attribute-directives.test.js", "e2e:nested-attribute-directives": "tsc --project ./e2e && npx jasmine --fail-fast ./e2e/dist/nested-components/attribute-directives.test.js",
"e2e:lib-directives": "tsc --project ./e2e && npx jasmine --fail-fast ./e2e/dist/api-directives.test.js", "e2e:lib-directives": "tsc --project ./e2e && npx jasmine --fail-fast ./e2e/dist/api-directives.test.js",
"e2e:lib-chat": "tsc --project ./e2e && npx jasmine --fail-fast ./e2e/dist/chat.test.js",
"e2e:webcomponent-all": "tsc --project ./e2e && npx jasmine --fail-fast ./e2e/dist/webcomponent-e2e/**/*.test.js", "e2e:webcomponent-all": "tsc --project ./e2e && npx jasmine --fail-fast ./e2e/dist/webcomponent-e2e/**/*.test.js",
"e2e:webcomponent-captions": "tsc --project ./e2e && npx jasmine --fail-fast ./e2e/dist/webcomponent-e2e/captions.test.js", "e2e:webcomponent-captions": "tsc --project ./e2e && npx jasmine --fail-fast ./e2e/dist/webcomponent-e2e/captions.test.js",