Skip to content

feat(tests): Add dataTest attributes to audio, video, and presentation components for enabling sample plugin tests - #23388

Merged
ramonlsouza merged 7 commits into
bigbluebutton:v3.0.x-releasefrom
antonbsa:sample-tests-addition
Jul 15, 2025
Merged

ramonlsouza merged 7 commits into
bigbluebutton:v3.0.x-releasefrom
antonbsa:sample-tests-addition

Conversation

@antonbsa

@antonbsa antonbsa commented Jun 13, 2025 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Additionally:

…n components for enabling sample plugin tests
@coderabbitai

coderabbitai Bot commented Jun 13, 2025 •

Copy link
Copy Markdown
Contributor

"""

Walkthrough

The changes update the automated test workflows by removing the trailing /api suffix from the BBB_URL environment variable and expanding the SAMPLES_WITH_TESTS variable to include four additional sample plugins. In the application code, the dataTest property is now passed from plugin-provided configuration objects to corresponding UI components in several places: audio controls dropdown options, presentation toolbar buttons, video provider dropdown actions, and action bar dropdown separators. The dependency version of bigbluebutton-html-plugin-sdk is updated from "0.0.84" to "0.0.87". The Playwright test setup was enhanced with environment variable validation for BBB_SECRET and BBB_URL. Additionally, API call URLs in tests were adjusted to include the /api/ path segment, and hostname extraction from BBB_URL was centralized.

Sequence Diagram(s)

sequenceDiagram
    participant Plugin as Plugin
    participant UIComponent as UI Component (Audio/Toolbar/Video/Actions)
    participant TestFramework as Test Framework

    Plugin->>UIComponent: Provide config object with dataTest property
    UIComponent->>UIComponent: Render UI element with dataTest attribute
    TestFramework->>UIComponent: Query UI by dataTest attribute
Loading

Suggested labels

test Firefox

Suggested reviewers

  • GuiLeme
    """

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3d52fe7 and 4321a44.

⛔ Files ignored due to path filters (1)
  • bigbluebutton-html5/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • .github/workflows/automated-tests.yml (4 hunks)
  • bigbluebutton-html5/imports/ui/components/audio/audio-graphql/audio-controls/input-stream-live-selector/buttons/LiveSelection.tsx (1 hunks)
  • bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/component.jsx (1 hunks)
  • bigbluebutton-html5/package.json (1 hunks)
  • bigbluebutton-tests/playwright/fixtures.js (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
  • bigbluebutton-html5/package.json
  • bigbluebutton-html5/imports/ui/components/audio/audio-graphql/audio-controls/input-stream-live-selector/buttons/LiveSelection.tsx
  • bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/component.jsx
  • .github/workflows/automated-tests.yml
  • bigbluebutton-tests/playwright/fixtures.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: build-package (bbb-freeswitch)
  • GitHub Check: build-package (bbb-html5)
  • GitHub Check: build-package (others)
  • GitHub Check: build-package (bbb-web)
  • GitHub Check: build-package (bbb-playback-record)
  • GitHub Check: build-package (bbb-graphql-server)
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions

Copy link
Copy Markdown

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🔭 Outside diff range comments (1)
bigbluebutton-html5/imports/ui/components/video-provider/video-button/component.tsx (1)

173-180: 🛠️ Refactor suggestion

Missing lint / ts-expect pragma for new field

dataTest was added but the surrounding // @ts-expect-error pragmas were not updated.
If the SDK types already include dataTest, the existing pragmas for label, onClick, icon can be removed entirely; if not, add one for dataTest too to keep the build green.

-          // @ts-expect-error -> Plugin-related.
-          label: plugin.label,
+          // @ts-expect-error -> Plugin-related.
+          label: plugin.label,
+          // @ts-expect-error -> Plugin-related.
+          dataTest: plugin.dataTest,

Cleaning up these pragmas will surface real type issues in the future.

🧹 Nitpick comments (1)
bigbluebutton-html5/imports/ui/components/audio/audio-graphql/audio-controls/input-stream-live-selector/buttons/LiveSelection.tsx (1)

309-313: Icon side inconsistent with other dropdowns

Here you map the plugin-provided icon to the right slot:

iconRight: audioSettingsDropdownOption.icon,

Whereas in the video dropdown (video-button/component.tsx) the same field is passed as icon, which renders on the left.
Unless the design intentionally differs between audio and video menus, consider unifying:

-          iconRight: audioSettingsDropdownOption.icon,
+          icon: audioSettingsDropdownOption.icon,

so plugin authors don’t have to special-case each area.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 684328f and a9b0eb2.

⛔ Files ignored due to path filters (1)
  • bigbluebutton-html5/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • .github/workflows/automated-tests.yml (1 hunks)
  • bigbluebutton-html5/imports/ui/components/audio/audio-graphql/audio-controls/input-stream-live-selector/buttons/LiveSelection.tsx (1 hunks)
  • bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/component.jsx (1 hunks)
  • bigbluebutton-html5/imports/ui/components/video-provider/video-button/component.tsx (1 hunks)
  • bigbluebutton-html5/package.json (1 hunks)
🔇 Additional comments (4)
bigbluebutton-html5/package.json (1)

60-60: Lock-file drift / reproducibility check

bigbluebutton-html-plugin-sdk is now referenced through a GitHub tarball.
Please make sure you also:

  1. Regenerate both package-lock.json and any workspace lock files – otherwise CI will fetch the old 0.0.82 version and the build will silently diverge.
  2. Verify that the commit hash 4c1b8a9acd5d… is signed / trusted and won’t be garbage-collected (a forced-push would break every downstream npm ci).

If you want immutable & checksum-validated installs, consider:

-"bigbluebutton-html-plugin-sdk": "https://codeload.github.com/bigbluebutton/bigbluebutton-html-plugin-sdk/tar.gz/4c1b8a9acd5db0a9762e0f6ebcf46a11314f67be",
+"bigbluebutton-html-plugin-sdk": "github:bigbluebutton/bigbluebutton-html-plugin-sdk#4c1b8a9acd5db0a9762e0f6ebcf46a11314f67be",

The github: spec keeps npm-level integrity hashes in the lock file and survives GitHub changing its tarball layout.

.github/workflows/automated-tests.yml (1)

192-193: CI scope expanded – looks good

Adding the four extra sample plugins (audio-settings, camera-settings, custom-subscription, data-channel) to SAMPLES_WITH_TESTS is straightforward and should increase coverage without affecting other jobs.
No further action required.

bigbluebutton-html5/imports/ui/components/audio/audio-graphql/audio-controls/input-stream-live-selector/buttons/LiveSelection.tsx (1)

311-311: Type completeness

dataTest propagation is a welcome addition. Double-check that AudioSettingsDropdownOption in the SDK has the new field; otherwise TypeScript will complain unless you extend the local menu item type.

bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/component.jsx (1)

254-255: Good addition – enables e2e selectors

Passing dataTest through to the generic Button keeps plugin toolbar buttons test-friendly and aligns with the rest of the codebase.

@antobinary antobinary added this to the Release 3.0 milestone Jun 18, 2025
@antonbsa
antonbsa force-pushed the sample-tests-addition branch from fd36c86 to b2c9681 Compare June 23, 2025 14:19
@antonbsa
antonbsa force-pushed the sample-tests-addition branch from cc72d7d to e77bc77 Compare July 3, 2025 13:15
- validate server variables before running tests
- .env.template and README updated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
bigbluebutton-tests/playwright/README.md (1)

17-17: Minor style improvement: Reduce repetitive language.

The sentence uses "you need" twice in close proximity. Consider rephrasing for better readability.

-To run these tests with an existing BigBlueButton server, you need to find the server's URL and secret (can be done with `bbb-conf --secret` command). You need to put them into the `.env` file inside `bigbluebutton-tests/playwright` folder (variables `BBB_URL` and `BBB_SECRET`).
+To run these tests with an existing BigBlueButton server, you need to find the server's URL and secret (can be done with `bbb-conf --secret` command). Then put them into the `.env` file inside `bigbluebutton-tests/playwright` folder (variables `BBB_URL` and `BBB_SECRET`).
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e77bc77 and c58deb2.

📒 Files selected for processing (9)
  • .github/workflows/automated-tests.yml (4 hunks)
  • bigbluebutton-tests/playwright/.env.template (1 hunks)
  • bigbluebutton-tests/playwright/README.md (1 hunks)
  • bigbluebutton-tests/playwright/connectionFailure/util.js (1 hunks)
  • bigbluebutton-tests/playwright/core/helpers.js (3 hunks)
  • bigbluebutton-tests/playwright/core/parameters.js (1 hunks)
  • bigbluebutton-tests/playwright/fixtures.js (2 hunks)
  • bigbluebutton-tests/playwright/package.json (1 hunks)
  • bigbluebutton-tests/playwright/reconnection/util.js (1 hunks)
✅ Files skipped from review due to trivial changes (4)
  • bigbluebutton-tests/playwright/.env.template
  • bigbluebutton-tests/playwright/connectionFailure/util.js
  • bigbluebutton-tests/playwright/reconnection/util.js
  • bigbluebutton-tests/playwright/core/helpers.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/automated-tests.yml
🧰 Additional context used
🧠 Learnings (2)
bigbluebutton-tests/playwright/package.json (1)
Learnt from: prlanzarin
PR: bigbluebutton/bigbluebutton#21891
File: bbb-webrtc-sfu.placeholder.sh:1-1
Timestamp: 2024-12-12T17:57:29.161Z
Learning: In the `bbb-webrtc-sfu.placeholder.sh` script, adding a shebang and error handling is not necessary.
bigbluebutton-tests/playwright/README.md (2)
Learnt from: prlanzarin
PR: bigbluebutton/bigbluebutton#21891
File: bbb-webrtc-sfu.placeholder.sh:1-1
Timestamp: 2024-12-12T17:57:29.161Z
Learning: In the `bbb-webrtc-sfu.placeholder.sh` script, adding a shebang and error handling is not necessary.
Learnt from: kepstin
PR: bigbluebutton/bigbluebutton#22200
File: docs/src/components/APITableComponent/index.tsx:79-80
Timestamp: 2025-02-05T20:23:17.109Z
Learning: In the BigBlueButton documentation site components, React key properties are not required for mapped elements as the pages are statically generated and don't require runtime reconciliation.
🪛 Biome (1.9.4)
bigbluebutton-tests/playwright/core/parameters.js

[error] 3-3: A global variable should not be reassigned.

Assigning to a global variable can override essential functionality.

(lint/suspicious/noGlobalAssign)

🪛 LanguageTool
bigbluebutton-tests/playwright/README.md

[style] ~17-~17: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...h an existing BigBlueButton server, you need to find the server's URL and secret (can b...

(REP_NEED_TO_VB)


[style] ~17-~17: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ... with bbb-conf --secret command). You need to put them into the .env file inside `b...

(REP_NEED_TO_VB)

⏰ Context from checks skipped due to timeout of 90000ms (10)
  • GitHub Check: build-package (bbb-playback-record)
  • GitHub Check: build-package (bbb-learning-dashboard)
  • GitHub Check: build-package (bbb-graphql-server)
  • GitHub Check: build-package (others)
  • GitHub Check: build-package (bbb-freeswitch)
  • GitHub Check: build-package (bbb-fsesl-akka)
  • GitHub Check: build-package (bbb-etherpad)
  • GitHub Check: build-package (bbb-apps-akka)
  • GitHub Check: build-package (bbb-web)
  • GitHub Check: build-package (bbb-html5)
🔇 Additional comments (6)
bigbluebutton-tests/playwright/core/parameters.js (2)

1-1: Good practice: Centralizing environment variable access.

Extracting the environment variable to a local constant improves code organization and makes it easier to refactor URL handling in the future.


10-10: Well-implemented hostname extraction with proper error handling.

The hostname extraction correctly handles the case where bbbUrl might be undefined, preventing potential runtime errors.

bigbluebutton-tests/playwright/fixtures.js (2)

19-25: Excellent addition of environment variable validation.

The beforeAll hook provides early validation of required environment variables, preventing test failures from propagating. The regex pattern correctly enforces the new BBB_URL format standard.


20-20: Regex pattern verification passed

All valid BigBlueButton URLs match and all invalid cases are correctly rejected by the pattern. No changes required.

bigbluebutton-tests/playwright/README.md (1)

17-17: Good update: Removing outdated URL format documentation.

The removal of the specific URL format note aligns with the standardization effort and prevents confusion about the expected format.

bigbluebutton-tests/playwright/package.json (1)

4-4: Correct removal of /api suffix handling.

The modification to the test:ssh script correctly removes the sed command that was appending "api" to the BBB_URL, aligning with the new URL format standard enforced by the validation logic.

@github-actions

github-actions Bot commented Jul 9, 2025

Copy link
Copy Markdown

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

Automated tests Summary

✅ All the CI tests have passed!

@GuiLeme GuiLeme left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@ramonlsouza
ramonlsouza merged commit bc36930 into bigbluebutton:v3.0.x-release Jul 15, 2025
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.

4 participants