CI presettings: part 1 - set page.viewPort && export visual regressions testing media files (#11422)

* add viewPort to page.js

* clone and import media and visual regressions files to the right directories

* change repo link to official bbb-ci-test-resources.git

* remove execution of import-tests-ci-resources.sh from tests/puppeteer/run.sh

* updates the import directory of the ci testing files

* correct imported repo folder name
This commit is contained in:
Mohamed Amine Ben Salah 2021-02-26 14:49:52 -03:00 committed by GitHub
parent d20479d7c4
commit 11a82d1524
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 1 deletions

View File

@ -157,7 +157,7 @@ class Page {
// Get the default arguments for creating a page
static getArgs() {
const args = ['--no-sandbox', '--use-fake-ui-for-media-stream', '--lang=en-US'];
const args = ['--no-sandbox', '--use-fake-ui-for-media-stream', '--window-size=1280,720', '--lang=en-US'];
return { headless: true, args };
}
@ -167,6 +167,7 @@ class Page {
'--no-sandbox',
'--use-fake-ui-for-media-stream',
'--use-fake-device-for-media-stream',
'--window-size=1280,720',
'--lang=en-US',
];
return {
@ -178,6 +179,7 @@ class Page {
'--no-sandbox',
'--use-fake-ui-for-media-stream',
'--use-fake-device-for-media-stream',
'--window-size=1280,720',
`--use-file-for-fake-audio-capture=${path.join(__dirname, '../media/audio.wav')}`,
'--allow-file-access',
'--lang=en-US',
@ -194,6 +196,7 @@ class Page {
'--no-sandbox',
'--use-fake-ui-for-media-stream',
'--use-fake-device-for-media-stream',
'--window-size=1280,720',
'--lang=en-US',
];
return {
@ -205,6 +208,7 @@ class Page {
'--no-sandbox',
'--use-fake-ui-for-media-stream',
'--use-fake-device-for-media-stream',
'--window-size=1280,720',
`--use-file-for-fake-video-capture=${path.join(__dirname, '../media/video_rgb.y4m')}`,
'--allow-file-access',
'--lang=en-US',
@ -221,6 +225,7 @@ class Page {
'--no-sandbox',
'--use-fake-ui-for-media-stream',
'--use-fake-device-for-media-stream',
'--window-size=1280,720',
'--lang=en-US',
];
return {
@ -232,6 +237,7 @@ class Page {
'--no-sandbox',
'--use-fake-ui-for-media-stream',
'--use-fake-device-for-media-stream',
'--window-size=1280,720',
`--use-file-for-fake-audio-capture=${path.join(__dirname, '../media/audio.wav')}`,
`--use-file-for-fake-video-capture=${path.join(__dirname, '../media/video_rgb.y4m')}`,
'--allow-file-access',

View File

@ -0,0 +1,19 @@
#!/bin/bash -e
testDir=$PWD/tests/puppeteer/;
echo "Cloning bbb-ci-tests-resources repo...";
git clone https://github.com/bigbluebutton/bbb-ci-test-resources.git;
echo "bbb-ci-tests-resources has been imported.";
sleep 2;
echo "Importing browser media files...";
mv -f bbb-ci-test-resources/2.3/media $testDir;
if [[ $REGRESSION_TESTING = true ]]; then
echo "Importing Visual Regressions Testing Files...";
sleep 1;
mv -f bbb-ci-test-resources/2.3/__image_snapshots__ $testDir;
echo "Visual Regressions Testing Files has been imported."
fi
rm -rf bbb-ci-test-resources;

View File

@ -52,6 +52,8 @@ main() {
exit 1
fi
echo "Test is starting in 5 seconds..." && sleep 5;echo $Test " Test has started."
env $(cat tests/puppeteer/.env | xargs) jest $TEST.test.js --color --detectOpenHandles --forceExit
}