-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
Refactored Design and Implementation Smells #147
base: master
Are you sure you want to change the base?
Conversation
Refactor implementation smells
Refactor design smells
|
PR Description updated to latest commit (970fc60)
|
PR Review
✨ Review tool usage guide:Overview: The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
See the review usage page for a comprehensive guide on using this tool. |
PR Code Suggestions
✨ Improve tool usage guide:Overview:
See the improve usage page for a comprehensive guide on using this tool. |
User description
I have refactored Design Smells and Implementation Smells to improve code readability and code quality
Type
enhancement, bug_fix
Description
ProxyConfigurationManager
to manage proxy configurations, enhancing code modularity and readability.HtmlUnitDriver
to use aWebClient
instance directly, improving the design.HtmlUnitKeyboard
andHtmlUnitWebElement
, removing unused code and enhancing readability.HtmlUnitTargetLocator
for better maintainability.KeyboardModifiersState
.Changes walkthrough
HtmlUnitDriver.java
Refactor WebClient and Proxy Configuration Management
src/main/java/org/openqa/selenium/htmlunit/HtmlUnitDriver.java
WebClient
andProxyConfigurationManager
instances to manageweb client and proxy configurations.
setProxySettings
method and related proxy configurationmethods.
ProxyConfigurationManager
.HtmlUnitKeyboard.java
Simplify Keyboard Interaction and Remove Unused Code
src/main/java/org/openqa/selenium/htmlunit/HtmlUnitKeyboard.java
sendKeys
method logic forHtmlFileInput
and generalelements.
addToKeyboard
method, replaced its functionalitywith
modifiersState_.addToKeyboard
.HtmlUnitTargetLocator.java
Improve Alert Lock Handling with Constants
src/main/java/org/openqa/selenium/htmlunit/HtmlUnitTargetLocator.java
HtmlUnitWebElement.java
Clean Up WebElement Focus and Attribute Handling
src/main/java/org/openqa/selenium/htmlunit/HtmlUnitWebElement.java
shouldSwitchFocus
method to clean up focus switching logic.getAttribute
method forHtmlInput
elements.KeyboardModifiersState.java
Enhance Modifier Keys State Management
src/main/java/org/openqa/selenium/htmlunit/KeyboardModifiersState.java
addToKeyboard
method to manage keyboard interactions withmodifier keys.
ProxyConfigurationManager.java
Introduce ProxyConfigurationManager for Proxy Settings
src/main/java/org/openqa/selenium/htmlunit/ProxyConfigurationManager.java
ProxyConfigurationManager
class to encapsulate proxyconfiguration logic.
HtmlUnitProxyTest.java
Update Proxy Tests to Use ProxyConfigurationManager
src/test/java/org/openqa/selenium/htmlunit/HtmlUnitProxyTest.java
ProxyConfigurationManager
.