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

Add dashboard automation support #4249

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

NamrathaRao24
Copy link

Description

Please include Automation development guidelines. Source of Test case - New Feature/Regression Test/Close loop of customer BZs

click to expand checklist
  • Create a test case in Polarion reviewed and approved.
  • Create a design/automation approach doc. Optional for tests with similar tests already automated.
  • Review the automation design
  • Implement the test script and perform test runs
  • Submit PR for code review and approve
  • Update Polarion Test with Automation script details and update automation fields
  • If automation is part of Close loop, update BZ flag qe-test_coverage “+” and link Polarion test

@NamrathaRao24 NamrathaRao24 force-pushed the add-dashboard-browser branch 2 times, most recently from 2f9dd87 to d9ef3e0 Compare November 27, 2024 12:43
@@ -0,0 +1,66 @@
from selenium.common.exceptions import TimeoutException, WebDriverException
Copy link
Contributor

Choose a reason for hiding this comment

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

Please revisit the imports, I can see same imports in different files. See if those can be added to the base class or file. Please revisit this logic



class Dashboard:
def __init__(self, driver):
Copy link
Contributor

Choose a reason for hiding this comment

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

instead of driver, accept the browser type

f"Unsupported browser type: {browser_type}. Supported types are 'chrome' and 'firefox'."
)

def open(self, url: str):
Copy link
Contributor

Choose a reason for hiding this comment

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

as open and close is already part of dashboard, please remove it from here

except TimeoutException:
return False

def click(self, element_id: str, timeout: int = 10):
Copy link
Contributor

Choose a reason for hiding this comment

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

add support to handle different types of element identifiers. currenlty its only using .byID, we need support for others like, name ,class, xpath, css etc.

Copy link
Contributor

@pranavprakash20 pranavprakash20 left a comment

Choose a reason for hiding this comment

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

@NamrathaRao24 Please have a look at the changes requested.

@psathyan psathyan changed the base branch from master to main December 19, 2024 05:11
Copy link

github-actions bot commented Jan 3, 2025

This Pull request has been automatically marked as STALE due to inactivity for 15 days and will be CLOSED on further inactivity on the PR for another 15 days.

Copy link
Contributor

@pranavprakash20 pranavprakash20 left a comment

Choose a reason for hiding this comment

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

LGTM

@openshift-ci openshift-ci bot added the lgtm Add this label when the PR is good to be merged label Jan 8, 2025
@psathyan
Copy link
Contributor

psathyan commented Jan 8, 2025

I am unable to find selenium module installed as part of cephci requirements. This module is being referenced in the code. Are we missing something?

Copy link
Contributor

@MohitBis MohitBis left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

openshift-ci bot commented Jan 13, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: MohitBis, NamrathaRao24, pranavprakash20

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@NamrathaRao24
Copy link
Author

PRs under review, and the following points need to be addressed:

  • Move the open and close methods to browser.py.
  • Add only dashboard-specific methods, such as login, to dashboard.py instead of keeping them under operations.py, as they are more relevant in dashboard.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ceph-dashboard For Ceph dashboard GUI Automation lgtm Add this label when the PR is good to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants