Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tests): First test from torture to meet. #15298

Merged
merged 24 commits into from
Nov 15, 2024
Merged

feat(tests): First test from torture to meet. #15298

merged 24 commits into from
Nov 15, 2024

Conversation

damencho
Copy link
Member

No description provided.

@damencho damencho requested a review from saghul November 14, 2024 04:07
Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 This pull request has been sent to HackerOne's PullRequest review team because our automation detected one or more changes with potential security impact. Experts are now being assigned to this review based on relevant expertise and will validate or dismiss any security findings accordingly and post their feedback as comments within this pull request.


Check the status or cancel this secure code review here.

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Jacob reviewed all the included code changes and associated automation findings and determined that there were no immediately actionable security flaws. Note that they will continue to be notified of any new commits or comments and follow up as needed throughout the duration of this pull request's lifecycle.

Copy link
Member

@saghul saghul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments. YOU ARE THE MAN! Thanks for getting the ball rolling! ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️

tests/helpers/Participant.ts Show resolved Hide resolved
tests/helpers/Participant.ts Show resolved Hide resolved
* The driver it uses.
*/
get driver() {
return browser.getInstance(this._name);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto.

tests/helpers/Participant.ts Outdated Show resolved Hide resolved
console.log(`lib-jitsi-meet version: ${JitsiMeetJS.version} sessionId: ${sessionId}`);
}, this._name, driver.sessionId));

// disable the blur effect in firefox as it has some performance issues
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not disable it everywhere? It has no impact in tests, does it?

* Generate a random room name.
*/
function generateRandomRoomName(): string {
return `jitsimeettorture-${Math.round(Math.random() * 1000000000)}`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return `jitsimeettorture-${Math.round(Math.random() * 1000000000)}`;
return `jitsimeettorture-${crypto.randomUUID()}`;

* Clicks audio mute button.
*/
async clickAudioMuteButton() {
await this.participant.driver.execute(() => console.log('Clicking on: Audio Mute Button'));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps the Participant class should offer a log method?

logInfo(activeSpeaker.driver, 'Unmuting in testActiveSpeaker');

// Unmute
await new Toolbar(activeSpeaker).clickAudioUnmuteButton();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than having to do new Toolbar(participant).foo(), how about: partifipant.getToolbar().foo() ?

}
if (process.env.HEADLESS === 'true') {
chromeArgs.push('--headless');
chromeArgs.push('--window-size=1400,600');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the weird resolution? Why not 1080p?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷 I will change it, this is what torture runs today.

],
maxInstances: 1,

baseUrl: 'https://alpha.jitsi.net/torture',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make this overridable via env var pl?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a very simple way to override stuff from configs. I wanted to leave it so it is a working one without any modifications, the way we have it for make dev.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://webdriver.io/docs/organizingsuites#inherit-from-main-config-file
I will use the same to introduce the Firefox tests. And different environments will be overriding stuff and excluding tests if they need to ... and change the deployment URL.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can take an env var and have a default for it, WDYT?

@damencho
Copy link
Member Author

To efficiently use the browser instances we need to have this merged, released and used here: webdriverio/webdriverio#13878
Right now it will create 4 sessions per test, where it may use just one.

@damencho damencho marked this pull request as draft November 14, 2024 16:12
@@ -1,3 +1,5 @@
/* global process, browser, Buffer */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this runs with node you can import process and Buffer. Perhaps even browser too, but that's from wdio.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think browser is special they inject ... you cannot import ... maybe

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will see

@damencho damencho marked this pull request as ready for review November 14, 2024 21:09
saghul
saghul previously approved these changes Nov 14, 2024
Copy link
Member

@saghul saghul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a couple of comments.

'extends': [
'../.eslintrc.js',
'@jitsi/eslint-config/jsdoc',
'@jitsi/eslint-config/react'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this one?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to keep the jsdoc one? I was fixing the docs because of it. Keeps code consistent, but I'm not sure it is needed for tests. WDYT?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant the react one but yeah, we can remove both

testing: {
testMode: true
},
disableAEC: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird that AGC is also not disabled, is that intentional?

disableAP disables them all

@damencho damencho merged commit 5cd7b9b into master Nov 15, 2024
9 checks passed
@damencho damencho deleted the tests1 branch November 15, 2024 12:26
iospro pushed a commit to iospro/jitsi-meet that referenced this pull request Nov 22, 2024
…nfig

* mobile-24.6: (367 commits)
  feat(prejoin): fix join meeting from external/calendar link while in another meeting (jitsi#15310)
  chore(apps, version): bump to 24.6.0
  chore(sdk, version): bump to 10.3.0
  fix(connection): Detects tenant hyphen and length problems and show notification.
  fix(connection): Shows notification instead of reload on conference request failed.
  feat(conference): revert fix for background app state (jitsi#15308)
  feat(tests): First test from torture to meet. (jitsi#15298)
  lang: update German translation
  chore(deps) lib-jitsi-meet@latest
  fix(local-recording) handle repeated values
  fix(ci) use macOS 15 to run iOS tests
  Update main-tr.json
  feat(reactions): Added heart reaction
  feat(ns) update Krisp to latest version
  feat(Video): Handle .play() errors.
  tr language updates
  fix(visitors): Fixes detection of turning of subtitles by visitor.
  fix(base/icons): error regarding default props
  fix(prejoin): Device indicator.
  chore(deps) lib-jitsi-meet@latest
  ...

# Conflicts:
#	android/gradle.properties
#	android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetOngoingConferenceService.java
#	ios/app/broadcast-extension/Info.plist
#	ios/app/src/Info.plist
#	ios/app/watchos/app/Info.plist
#	ios/app/watchos/extension/Info.plist
#	ios/sdk/src/Info.plist
#	ios/sdk/src/Lite-Info.plist
#	react-native-sdk/package.json
#	react/features/keyboard-shortcuts/actions.web.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants