Skip to content

Conversation

@shivani1211
Copy link
Contributor

@shivani1211 shivani1211 commented May 8, 2025

COMPLETES #https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-656461

This pull request addresses

adding move to lobby receivers side API code.

by making the following changes

added a function that will call control api to locus with correct payload when move to lobby is clicked in cantina.

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

< ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >

I certified that

  • I have read and followed contributing guidelines

  • I discussed changes with code owners prior to submitting this pull request

  • I have not skipped any automated checks

  • All existing and new tests passed

  • I have updated the documentation accordingly

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI
    on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
  • [ ]Github Copilot
  • Other - Please Specify

This PR is related to

  • Feature
  • Defect fix
  • Tech Debt
  • Automation

Make sure to have followed the contributing guidelines before submitting.

@shivani1211 shivani1211 requested review from a team as code owners May 8, 2025 08:35
@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 8, 2025

📝 Walkthrough

Walkthrough

The changes introduce support for moving meeting participants to the lobby in the Webex meetings plugin. A new display hint MOVE_TO_LOBBY is added to the constants. The IInMeetingActions interface and InMeetingActions class are extended with a canMoveToLobby property, which is set in the Meeting class by checking user display hints via a new utility method MeetingUtil.canMoveToLobby. The Members class gains a public moveToLobby method that validates parameters and calls a new moveToLobbyMember method in MembersRequest. Supporting utility methods are added to generate request bodies and request parameters for the lobby-move operation. Corresponding unit tests are added or updated to cover these new features.

Possibly related PRs

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ast-grep (0.38.1)
packages/@webex/plugin-meetings/test/unit/spec/meeting/index.js
🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

yarn install v1.22.22
[1/4] Resolving packages...
(node:13485) [DEP0169] DeprecationWarning: url.parse() behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for url.parse() vulnerabilities.
(Use node --trace-deprecation ... to show where the warning was created)
warning [email protected]: This version is no longer supported. Please see https://eslint.org/version-support for other options.
warning eslint > @humanwhocodes/[email protected]: Use @eslint/config-array instead
warning eslint > @humanwhocodes/config-array > @humanwhocodes/[email protected]: Use @eslint/object-schema instead
warning eslint > file-entry-cache > flat-cache > [email protected]: Rimraf versions prior to v4 are no longer supported
warning eslint > file-entry-cache > flat-cache > rimraf > [email protected]: Glob versions prior to v9 are no longer supported
warning eslint > file-entry-cache > flat-cache > rimraf > glob > [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
warning eslint-import-resolver-typescript > [email protected]: Glob versions prior to v9 are no longer supported
warning [email protected]: Glob versions prior to v9 are no longer supported
warning intern > [email protected]: Glob versions prior to v9 are no longer supported
warning intern > glob > [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
warning jasmine > [email protected]: Glob versions prior to v9 are no longer supported
warning jest > @jest/core > jest-config > [email protected]: Glob versions prior to v9 are no longer supported
warning jest > @jest/core > jest-runtime > [email protected]: Glob versions prior to v9 are no longer supported
warning jest > @jest/core > @jest/reporters > [email protected]: Glob versions prior to v9 are no longer supported
warning jest > @jest/core > @jest/transform > babel-plugin-istanbul > test-exclude > [email protected]: Glob versions prior to v9 are no longer supported
warning mocha > [email protected]: Glob versions prior to v9 are no longer supported
warning mocha > glob > [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
warning [email protected]: 16.1.1
warning sinon > @sinonjs/samsam > [email protected]: This package is deprecated. Use the optional chaining (?.) operator instead.
warning wd > archiver > [email protected]: Glob versions prior to v9 are no longer supported
warning wd > [email protected]: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.

(For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
warning wd > [email protected]: request has been deprecated, see request/request#3142
warning wd > archiver > archiver-utils > [email protected]: Glob versions prior to v9 are no longer supported
warning wd > request > [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
warning wd > request > [email protected]: this library is no longer supported
warning @babel/cli > [email protected]: Glob versions prior to v9 are no longer supported
warning @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-async-generator-functions instead.
warning @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
warning @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-export-namespace-from instead.
warning @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.
warning @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.
warning @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.
warning @babel/[email protected]: 🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information.
warning @babel/polyfill > [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
warning @babel/runtime-corejs2 > [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
warning babel-plugin-lodash > [email protected]: Glob versions prior to v9 are no longer supported
warning workspace-aggregator-9fcdd531-8ab2-4e47-9de0-a28ba962bb4a > [email protected]: This version is no longer supported. Please see https://eslint.org/version-support for other options.
warning workspace-aggregator-9fcdd531-8ab2-4e47-9de0-a28ba962bb4a > [email protected]: Glob versions prior to v9 are no longer supported
warning workspace-aggregator-9fcdd531-8ab2-4e47-9de0-a28ba962bb4a > [email protected]: 16.1.1
warning workspace-aggregator-9fcdd531-8ab2-4e47-9de0-a28ba962bb4a > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-async-generator-functions instead.
warning workspace-aggregator-9fcdd531-8ab2-4e47-9de0-a28ba962bb4a > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
warning workspace-aggregator-9fcdd531-8ab2-4e47-9de0-a28ba962bb4a > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-export-namespace-from instead.
warning workspace-aggregator-9fcdd531-8ab2-4e47-9de0-a28ba962bb4a > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.
warning workspace-aggregator-9fcdd531-8ab2-4e47-9de0-a28ba962bb4a > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.
warning workspace-aggregator-9fcdd531-8ab2-4e47-9de0-a28ba962bb4a > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.
warning workspace-aggregator-9fcdd531-8ab2-4e47-9de0-a28ba962bb4a > @babel/[email protected]: 🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information.
[2/4] Fetching packages...
error [email protected]: The engine "node" is incompatible with this module. Expected version "^14 || ^16 || ^17 || ^18 || ^19". Got "24.0.2"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 57781bf and 94a2d63.

📒 Files selected for processing (6)
  • packages/@webex/plugin-meetings/src/constants.ts (1 hunks)
  • packages/@webex/plugin-meetings/src/meeting/index.ts (1 hunks)
  • packages/@webex/plugin-meetings/src/members/index.ts (1 hunks)
  • packages/@webex/plugin-meetings/src/members/request.ts (1 hunks)
  • packages/@webex/plugin-meetings/test/unit/spec/meeting/index.js (3 hunks)
  • packages/@webex/plugin-meetings/test/unit/spec/members/request.js (9 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/@webex/plugin-meetings/test/unit/spec/meeting/index.js
🚧 Files skipped from review as they are similar to previous changes (5)
  • packages/@webex/plugin-meetings/src/constants.ts
  • packages/@webex/plugin-meetings/src/members/index.ts
  • packages/@webex/plugin-meetings/test/unit/spec/members/request.js
  • packages/@webex/plugin-meetings/src/meeting/index.ts
  • packages/@webex/plugin-meetings/src/members/request.ts
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Build Packages
✨ 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.

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 3

🧹 Nitpick comments (1)
packages/@webex/plugin-meetings/src/meeting/util.ts (1)

582-583: Consider adding JSDoc and explicit TS typing for canMoveToLobby.

To align with other MeetingUtil methods, adding a brief JSDoc and a TypeScript signature can improve readability:

-  canMoveToLobby: (displayHints) => displayHints.includes(DISPLAY_HINTS.MOVE_TO_LOBBY),
+  /**
+   * Checks if "move back to lobby" is allowed based on display hints.
+   * @param {string[]} displayHints - Array of display hint identifiers.
+   * @returns {boolean} `true` if MOVE_TO_LOBBY hint is present.
+   */
+  canMoveToLobby(displayHints: string[]): boolean {
+    return displayHints.includes(DISPLAY_HINTS.MOVE_TO_LOBBY);
+  },
🛑 Comments failed to post (3)
packages/@webex/plugin-meetings/src/members/index.ts (1)

889-912: ⚠️ Potential issue

Incorrect error message in parameter validation.

The error message for the memberId validation refers to "raise/lower the hand of the member" instead of "move the member to the lobby". This copy-paste error should be fixed.

-  return Promise.reject(
-    new ParameterError('The member id must be defined to raise/lower the hand of the member.')
-  );
+  return Promise.reject(
+    new ParameterError('The member id must be defined to move the member to the lobby.')
+  );
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

  /**
   * @param {String} memberId
   * @param {boolean} [raise] - to raise hand (=true) or lower (=false), default: true
   * @returns {Promise}
   * @public
   * @memberof Members
   */
  public moveToLobby(memberId: string) {
    if (!this.locusUrl) {
      return Promise.reject(
        new ParameterError(
          'The associated locus url for this meetings members object must be defined.'
        )
      );
    }
    if (!memberId) {
-      return Promise.reject(
-        new ParameterError('The member id must be defined to raise/lower the hand of the member.')
-      );
+      return Promise.reject(
+        new ParameterError('The member id must be defined to move the member to the lobby.')
+      );
    }
    const options = MembersUtil.getMoveMemberToLobbyRequestOptions(memberId);

    return this.membersRequest.moveToLobbyMember({locusUrl: this.locusUrl, memberId}, options);
  }
packages/@webex/plugin-meetings/src/member/util.ts (1)

107-121: 🛠️ Refactor suggestion

Role-based utility functions are implemented correctly.

Both utility functions correctly implement the business logic:

  1. canBeMovedToLobby: Returns true when participant is neither a cohost nor a moderator
  2. canMoveToLobby: Returns true when participant is either a cohost or a moderator

The parameter validation is consistent with other utility functions.

However, the TypeScript type for the participant parameter is missing. This should be added for type safety.

-MemberUtil.canBeMovedToLobby = (participant): boolean => {
+MemberUtil.canBeMovedToLobby = (participant: ParticipantWithRoles): boolean => {
   if (!participant) {
     throw new ParameterError('Move to lobby could not be processed, participant is undefined.');
   }

   return !MemberUtil.hasCohost(participant) && !MemberUtil.hasModerator(participant);
 };

-MemberUtil.canMoveToLobby = (participant): boolean => {
+MemberUtil.canMoveToLobby = (participant: ParticipantWithRoles): boolean => {
   if (!participant) {
     throw new ParameterError('Move to lobby could not be processed, participant is undefined.');
   }

   return MemberUtil.hasCohost(participant) || MemberUtil.hasModerator(participant);
 };
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

MemberUtil.canBeMovedToLobby = (participant: ParticipantWithRoles): boolean => {
  if (!participant) {
    throw new ParameterError('Move to lobby could not be processed, participant is undefined.');
  }

  return !MemberUtil.hasCohost(participant) && !MemberUtil.hasModerator(participant);
};

MemberUtil.canMoveToLobby = (participant: ParticipantWithRoles): boolean => {
  if (!participant) {
    throw new ParameterError('Move to lobby could not be processed, participant is undefined.');
  }

  return MemberUtil.hasCohost(participant) || MemberUtil.hasModerator(participant);
};
packages/@webex/plugin-meetings/src/members/request.ts (1)

132-146: 🛠️ Refactor suggestion

Missing JSDoc documentation for the moveToLobbyMember method.

Unlike other methods in the class, moveToLobbyMember lacks proper JSDoc documentation and is using an eslint-disable comment instead. Add appropriate documentation to maintain consistency and code quality.

-  // eslint-disable-next-line require-jsdoc
-  moveToLobbyMember(
+  /**
+   * Sends a request to move a member to the lobby
+   * @param {Object} options
+   * @param {String} options.locusUrl
+   * @param {String} options.memberId ID of member to move to lobby
+   * @param {Object} body
+   * @param {Object} body.moveToLobby
+   * @param {Array<String>} body.moveToLobby.participantIds Array of participant IDs to move to lobby
+   * @returns {Promise}
+   */
+  moveToLobbyMember(
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

  /**
   * Sends a request to move a member to the lobby
   * @param {Object} options
   * @param {String} options.locusUrl
   * @param {String} options.memberId ID of member to move to lobby
   * @param {Object} body
   * @param {Object} body.moveToLobby
   * @param {Array<String>} body.moveToLobby.participantIds Array of participant IDs to move to lobby
   * @returns {Promise}
   */
  moveToLobbyMember(
    options: {locusUrl: string; memberId: string},
    body: {moveToLobby: {participantIds: string[]}}
  ) {
    if (!options || !options.locusUrl || !options.memberId) {
      throw new ParameterError(
        'memberId must be defined, and the associated locus url for this meeting object must be defined.'
      );
    }

    const requestParams = MembersUtil.getMoveMemberToLobbyRequestParams(options, body);

    return this.locusDeltaRequest(requestParams);
  }

@aws-amplify-us-east-2
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-4248.d3m3l2kee0btzx.amplifyapp.com

Copy link
Contributor

@stanjiawang stanjiawang left a comment

Choose a reason for hiding this comment

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

Looks good! But need test. Great work! Thanks!

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

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)
packages/@webex/plugin-meetings/test/unit/spec/members/request.js (1)

425-425: Remove commented-out code.

This commented-out line // await membersRequest.lowerAllHandsMember(options); appears to be leftover from development and should be removed.

- // await membersRequest.lowerAllHandsMember(options);
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 83cabc1 and 9af9931.

📒 Files selected for processing (8)
  • packages/@webex/plugin-meetings/src/members/index.ts (1 hunks)
  • packages/@webex/plugin-meetings/src/members/request.ts (1 hunks)
  • packages/@webex/plugin-meetings/test/unit/spec/meeting/in-meeting-actions.ts (2 hunks)
  • packages/@webex/plugin-meetings/test/unit/spec/meeting/index.js (4 hunks)
  • packages/@webex/plugin-meetings/test/unit/spec/meeting/utils.js (1 hunks)
  • packages/@webex/plugin-meetings/test/unit/spec/members/index.js (16 hunks)
  • packages/@webex/plugin-meetings/test/unit/spec/members/request.js (9 hunks)
  • packages/@webex/plugin-meetings/test/unit/spec/members/utils.js (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/@webex/plugin-meetings/test/unit/spec/meeting/index.js
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/@webex/plugin-meetings/src/members/index.ts
  • packages/@webex/plugin-meetings/src/members/request.ts
🧰 Additional context used
🧬 Code Graph Analysis (1)
packages/@webex/plugin-meetings/test/unit/spec/members/utils.js (1)
packages/@webex/plugin-meetings/src/constants.ts (3)
  • PARTICIPANT (59-59)
  • CONTROLS (22-22)
  • HTTP_VERBS (581-587)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: AWS Amplify Console Web Preview
🔇 Additional comments (13)
packages/@webex/plugin-meetings/test/unit/spec/meeting/utils.js (2)

796-800: New test suite looks good.

The test for canMoveToLobby properly validates both the positive case (when 'MOVE_TO_LOBBY' is present) and negative case (empty array), following the same pattern as other display hint utility tests.


792-793: Code formatting improvement.

Good consolidation of the assertion into a single line for better readability.

packages/@webex/plugin-meetings/test/unit/spec/meeting/in-meeting-actions.ts (2)

102-102: Properly added new property to expected values.

The canMoveToLobby property is correctly initialized with null in the expected values object, consistent with other action properties.


208-208: Correctly included new property in test cases.

The canMoveToLobby property is properly added to the list of properties being tested for getter/setter behavior, ensuring complete test coverage.

packages/@webex/plugin-meetings/test/unit/spec/members/utils.js (2)

361-370: Good test for getMoveMemberToLobbyRequestOptions.

The test properly validates that the function returns an object with the expected structure, containing the member ID in the participantIds array.


372-392: Well-structured test for getMoveMemberToLobbyRequestParams.

This test thoroughly verifies all aspects of the request parameters:

  1. The HTTP method is PATCH
  2. The URI is correctly constructed
  3. The request body contains the proper structure with participant IDs

The test follows the established pattern for testing request parameter utility functions.

packages/@webex/plugin-meetings/test/unit/spec/members/request.js (3)

68-69: Good refactoring of the checkRequest helper.

Simplifying the assertion with the merge function improves code readability and maintainability.


411-437: Well-implemented test for moveToLobbyMember.

The test thoroughly verifies the request parameters and utility function calls for the new method.


97-101: Formatting improvements.

The comma and whitespace fixes throughout the file improve code style consistency.

Also applies to: 406-409

packages/@webex/plugin-meetings/test/unit/spec/members/index.js (4)

987-1056: Well-implemented test suite for the new moveToLobby functionality!

The test suite for the #moveToLobby method follows good testing practices by:

  1. Testing parameter validation (rejecting when member ID or locus URL is missing)
  2. Verifying correct utility and request method calls
  3. Following the same pattern as other similar test methods in the file

This ensures the new lobby movement functionality is properly tested.


367-374: Consistent formatting improvement.

The code structure for stubbing error and success cases has been improved with better indentation and consistent use of trailing commas, which enhances readability.


385-393: Added proper parameter formatting for error checking.

Parameters are now properly aligned and consistently formatted, making the code more readable and maintainable.


670-683: Enhanced lowerAllHands test to support roles parameter.

The checkValid function and associated tests have been updated to correctly handle the optional roles parameter, improving test coverage for the function's capabilities.

Copy link
Contributor

@stanjiawang stanjiawang left a comment

Choose a reason for hiding this comment

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

LGTM! Just a small naming issue.

@robstax robstax enabled auto-merge (squash) May 13, 2025 19:03
@shivani1211 shivani1211 added the validated If the pull request is validated for automation. label May 13, 2025
Copy link
Contributor

@sreenara sreenara left a comment

Choose a reason for hiding this comment

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

@shivani1211 please update the PR description with all details along with the testing done.

Copy link
Contributor

@sreenara sreenara left a comment

Choose a reason for hiding this comment

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

Please see the comments. Also, please add the Generative AI section into the PR description.

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Other - Please Specify
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

@robstax robstax merged commit 3a6bf62 into webex:next May 20, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

validated If the pull request is validated for automation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants