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
- name: Build and Serve openvidu-components-angular Testapp
uses: ./.github/actions/build-and-serve-components-testapp
- name: Run Webcomponent E2E
- name: Run Tests
env:
LAUNCH_MODE: CI
run: npm run e2e:lib-directives --prefix openvidu-components-angular
@ -212,9 +212,9 @@ jobs:
if: always()
uses: ./.github/actions/cleanup
webcomponent_e2e_chat:
e2e_chat:
needs: test_setup
name: Webcomponent chat
name: Chat E2E
if: false
runs-on: ubuntu-latest
steps:
@ -236,26 +236,12 @@ jobs:
uses: ./.github/actions/setup-local-deployment
- name: Setup OpenVidu Call Backend
uses: ./.github/actions/setup-openvidu-call-backend
- name: Install dependencies
run: |
cd openvidu-components-angular
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
- name: Build and Serve openvidu-components-angular Testapp
uses: ./.github/actions/build-and-serve-components-testapp
- name: Run Tests
env:
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
if: always()
uses: ./.github/actions/cleanup

View File

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