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

refactors espresso base robot classes #5323

Merged
merged 7 commits into from
Feb 19, 2025
Merged

Conversation

Williamrai
Copy link
Collaborator

@Williamrai Williamrai commented Feb 14, 2025

What does this do?

refactors espresso base robot classes

Why is this needed?

The BaseRobot class was becoming too large as it contained all the functions needed by various robot classes. As we will continue adding more functions, this will only grow bigger. So in order to manage this, I decided to separate the functions into different classes based on their actions:

  1. ClickActions - Handles general click related functions
  2. InputActions - Manages input actions like typeTextInEditText
  3. ListActions - Contains all list related functions
  4. ScrollActions - Handles scroll events
  5. SystemActions - Manage system related operations
  6. VerificationActions - Includes all verification functions
  7. WebActions - all web related operations
    Each of these will be initialized as protected variables within the BaseRobot class, allowing all child robot classes to access them.

@Williamrai Williamrai added the WIP Work in progress label Feb 14, 2025
# Conflicts:
#	app/src/androidTest/java/org/wikipedia/base/BaseRobot.kt
@Williamrai Williamrai added Ready to merge PR passed design signoff and ready to be merged. and removed WIP Work in progress labels Feb 14, 2025
@cooltey
Copy link
Collaborator

cooltey commented Feb 15, 2025

Please provide a more detailed explanation of the refactoring performed and the rationale behind it.

@Williamrai
Copy link
Collaborator Author

Please provide a more detailed explanation of the refactoring performed and the rationale behind it.

I have added it, apologies for not adding the explanation earlier.

@cooltey cooltey merged commit 0db8c5c into main Feb 19, 2025
1 check passed
@cooltey cooltey deleted the espreso-base-robot-refactor branch February 19, 2025 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready to merge PR passed design signoff and ready to be merged.
Development

Successfully merging this pull request may close these issues.

2 participants