Skip to content

Commit

Permalink
ci: Fixed e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CSantosM committed Aug 1, 2024
1 parent 2c3bcba commit 3e16ddd
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 13 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/openvidu-call-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
prepare_openvidu_components_angular:
name: Prepare openvidu-angular
name: Prepare openvidu-components-angular
runs-on: ubuntu-latest
steps:
- env:
Expand Down Expand Up @@ -80,12 +80,12 @@ jobs:
sleep 5
done
- name: Serve openvidu-call
env:
CALL_PRIVATE_ACCESS: true
run: node openvidu-call-back/dist/server.js &
- name: Run tests
env:
LAUNCH_MODE: CI
CALL_PRIVATE_ACCESS: true

run: npm run e2e:auth --prefix openvidu-call-front

home_e2e_test:
Expand Down Expand Up @@ -218,4 +218,4 @@ jobs:
env:
LAUNCH_MODE: CI
CALL_PRIVATE_ACCESS: false
run: npm run e2e:recording --prefix openvidu-call-front
run: npm run e2e:recordings --prefix openvidu-call-front
26 changes: 17 additions & 9 deletions openvidu-call-front/e2e/recording.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('Testing recordings', () => {
await utils.checkRecordingIsStarting();
await utils.checkRecordingIsStarted();

await browser.sleep(2000);
await browser.sleep(5000);

await utils.stopRecordingFromPanel();
await utils.checkRecordingIsStopped();
Expand Down Expand Up @@ -67,18 +67,26 @@ describe('Testing recordings', () => {
});

it('should be able to play a recording', async () => {
await connectStartAndStopRecording();
try {
await connectStartAndStopRecording();

await utils.waitForElement('.recording-item');
expect(await utils.getNumberOfElements('.recording-item')).equals(1);
await utils.waitForElement('.recording-item');
expect(await utils.getNumberOfElements('.recording-item')).equals(1);

await utils.playRecording();

await utils.playRecording();
await browser.sleep(2000);
await utils.waitForElement('app-recording-dialog');

await browser.sleep(1000);
await utils.waitForElement('app-recording-dialog');
await browser.sleep(2000);

// participant video and recording video
expect(await utils.getNumberOfElements('video')).equals(2);
// participant video and recording video
expect(await utils.getNumberOfElements('video')).equals(2);
} catch (error) {
// If the test fails, we will take a screenshot
const screenshot = await browser.takeScreenshot();
console.log('data:image/png;base64,' + screenshot);
}
});

// it('should be able to download a recording', async () => {});
Expand Down
1 change: 1 addition & 0 deletions openvidu-call-front/e2e/selenium.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const chromeArguments = [
'--use-fake-device-for-media-stream'
];
const chromeArgumentsCI = [
'--window-size=1300,1000',
'--headless',
'--no-sandbox',
'--disable-gpu',
Expand Down

0 comments on commit 3e16ddd

Please sign in to comment.