Closed pujagani closed 3 weeks ago
โฑ๏ธ Estimated effort to review [1-5] | 2, because the changes are localized to specific functionalities related to user prompt events in a JavaScript codebase. The modifications are straightforward and involve adding new classes and handling logic for these events. |
๐งช Relevant tests | Yes |
โก Possible issues | Possible Bug: The new event handling for 'UserPromptOpened' and 'UserPromptClosed' might not work as expected in Chrome and Edge due to a noted discrepancy in how these browsers handle browsing context IDs. This could lead to failed assertions as noted in the test comments. |
๐ Security concerns | No |
Category | Suggestion | Score |
Maintainability |
Use a
___
**To improve readability and maintainability, consider using a | 7 |
Possible issue |
Add a timeout to the
___
**To ensure the test cases are more robust and handle potential asynchronous issues, | 6 |
Best practice |
Add default values for the
___
**To ensure consistency and avoid potential issues, consider adding default values for the | 5 |
The test failures are due to connection errors and not due to the changes. Locally, it is working as expected.
User description
Thanks for contributing to Selenium! A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines. Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
Add user prompt types for events "UserPromptOpened" and "UserPromptClosed". Else it was defaulting to the wrong type.
Motivation and Context
Types of changes
Checklist
PR Type
Enhancement, Tests
Description
UserPromptOpened
andUserPromptClosed
events inbrowsingContextInspector.js
.UserPromptOpened
andUserPromptClosed
inbrowsingContextTypes.js
.UserPromptOpened
andUserPromptClosed
events inbrowsingcontext_inspector_test.js
.Changes walkthrough ๐
browsingContextInspector.js
Add handling for user prompt events in browsing context inspector
javascript/node/selenium-webdriver/bidi/browsingContextInspector.js
UserPromptOpened
andUserPromptClosed
.UserPromptOpened
andUserPromptClosed
events.browsingContextTypes.js
Define classes for user prompt events
javascript/node/selenium-webdriver/bidi/browsingContextTypes.js
UserPromptOpened
class.UserPromptClosed
class.browsingcontext_inspector_test.js
Add tests for user prompt events in browsing context inspector
javascript/node/selenium-webdriver/test/bidi/browsingcontext_inspector_test.js
UserPromptOpened
event.UserPromptClosed
event.