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): Grid, FF and iframeAPI tests. #15372

Merged
merged 22 commits into from
Dec 10, 2024
Merged

feat(tests): Grid, FF and iframeAPI tests. #15372

merged 22 commits into from
Dec 10, 2024

Conversation

damencho
Copy link
Member

@damencho damencho commented Dec 9, 2024

No description provided.

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 or requires further evaluation. 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.

✅ Jacques 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.

Some small comments. Impressive work!

await this.driver.url(url);
// workaround for https://github.com/webdriverio/webdriverio/issues/13956
if (url.startsWith('file://')) {
// eslint-disable-next-line @typescript-eslint/no-empty-function
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 let it throw if there is an exception?

Copy link
Member Author

Choose a reason for hiding this comment

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

It fails the test because it comes with a timeout. But the problem is fixed and will be available on the next release. I will update it once it is out.

Copy link
Member

Choose a reason for hiding this comment

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

👍

await p.switchInPage();

if (await p.isInMuc()) {
return Promise.resolve();
Copy link
Member

Choose a reason for hiding this comment

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

Just return, this is an async function.

* Parse a JID string.
* @param str the string to parse.
*/
export function parseJid(str: string): {
Copy link
Member

Choose a reason for hiding this comment

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

There was a Strophe helper to do this, wasn't there? Do we want to use it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I was thinking the same ... but was wondering about the dependencies ... but the change will be only in dev dependencies ... I will give it a shot.

Copy link
Member

Choose a reason for hiding this comment

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

Ah good point. Never mind, keep it as is.

async addEventListener(eventName: string) {
return this.participant.driver.executeAsync((event, prefix, done) => {
console.log(`${new Date().toISOString()} ${prefix} Adding listener for event: ${event}`);
window.jitsiAPI.addListener(event, evt => {
Copy link
Member

Choose a reason for hiding this comment

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

what's with the date?

Copy link
Member Author

Choose a reason for hiding this comment

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

To make the logs look the same way as the js client logs.

2024-12-09T23:08:07.278Z [modules/UI/videolayout/LargeVideoManager.js] scheduleLargeVideoUpdate: Remote track RemoteTrack[userID: 23f85c98, type: video, ssrc: 2134074178, p2p: false, sourceName: 23f85c98-v0, status: {readyState: live, muted: false, enabled: true}], isVideoMuted=false, streamingStatusActive=true, isVideoRenderable=true, showAvatar=false
2024-12-09T23:08:09.659Z [MeetTest]  Adding listener for event: participantRoleChanged

Copy link
Member

Choose a reason for hiding this comment

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

Ah gotcha!

</head>
<body>
<script>
const blacklist = [ '__proto__', 'constructor', 'prototype' ];
Copy link
Member

Choose a reason for hiding this comment

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

This is copied from somewhere, right? Maybe put a comment about where it comes from?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

To put in comments that it comes from jitsi-meet-torture?

Copy link
Member

Choose a reason for hiding this comment

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

Yes please.

// wdio.dev.conf.ts
// extends te main configuration file for the development environment (make dev)
// it will connect to the webpack-dev-server running locally on port 8080
import { deepmerge } from 'deepmerge-ts';
Copy link
Member

Choose a reason for hiding this comment

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

I assume we somehow already have this dependency? It's not listed as a direct dependency, which it probably should. Or, use lodash's merge?

Copy link
Member Author

Choose a reason for hiding this comment

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

ok, I will give it a shot. This was copied from webdriverio site.
https://webdriver.io/docs/organizingsuites#inherit-from-main-config-file

* Parse a JID string.
* @param str the string to parse.
*/
export function parseJid(str: string): {
Copy link
Member

Choose a reason for hiding this comment

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

I think you did well not introducing the extra dependency, sorry for the noise. I'd undo this.

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.

🔥

@damencho damencho merged commit b901717 into master Dec 10, 2024
11 checks passed
@damencho damencho deleted the more-tests1 branch December 10, 2024 17:22
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