-
Notifications
You must be signed in to change notification settings - Fork 82
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
Fix Dashboard Tests for ODH and RHOAI 2.9 #1308
Fix Dashboard Tests for ODH and RHOAI 2.9 #1308
Conversation
@@ -133,7 +133,7 @@ | |||
... None | |||
... Returns: | |||
... dashboard_pods_info(list(dict)): Dashboard pods selected by label and namespace | |||
@{dashboard_pods_info} = Oc Get kind=Pod api_version=v1 namespace=${APPLICATIONS_NAMESPACE} label_selector=app=rhods-dashboard | |||
@{dashboard_pods_info} = Oc Get kind=Pod api_version=v1 namespace=${APPLICATIONS_NAMESPACE} label_selector=app=${DASHBOARD_APP_NAME} |
Check warning
Code scanning / Robocop
The assignment sign is not consistent within the file. Expected '{{ expected_sign }}' but got '{{ actual_sign }}' instead Warning test
@@ -750,7 +744,7 @@ | |||
|
|||
Get Dashboard Pods Names | |||
[Documentation] Retrieves the names of dashboard pods | |||
${dash_pods}= Oc Get kind=Pod namespace=${APPLICATIONS_NAMESPACE} label_selector=app=rhods-dashboard | |||
${dash_pods}= Oc Get kind=Pod namespace=${APPLICATIONS_NAMESPACE} label_selector=app=${DASHBOARD_APP_NAME} |
Check warning
Code scanning / Robocop
Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test
@@ -761,7 +755,7 @@ | |||
Get Dashboard Pod Logs | |||
[Documentation] Fetches the logs from one dashboard pod | |||
[Arguments] ${pod_name} | |||
${pod_logs}= Oc Get Pod Logs name=${pod_name} namespace=${APPLICATIONS_NAMESPACE} container=rhods-dashboard | |||
${pod_logs}= Oc Get Pod Logs name=${pod_name} namespace=${APPLICATIONS_NAMESPACE} container=${DASHBOARD_APP_NAME} |
Check warning
Code scanning / Robocop
Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test
@@ -73,6 +73,7 @@ | |||
${RHODS_VERSION}= Get RHODS Version ${force_fetch} | |||
Set Global Variable ${RHODS_VERSION} | |||
Set Prometheus Variables | |||
Set Global Variable ${DASHBOARD_APP_NAME} ${PRODUCT.lower()}-dashboard |
Check notice
Code scanning / Robocop
{{ set_variable_keyword }} can be replaced with VAR Note test
Sort Resources By name | ||
${list_of_tile_ids} = Get List Of Ids Of Tiles | ||
Verify Star Icons Are Clickable ${list_of_tile_ids} | ||
|
||
${favorite_ids} = Get Slice From List ${list_of_tile_ids} ${27} ${48} | ||
${favorite_ids} = Get Slice From List ${list_of_tile_ids} ${2} ${7} |
Check warning
Code scanning / Robocop
The assignment sign is not consistent within the file. Expected '{{ expected_sign }}' but got '{{ actual_sign }}' instead Warning test
@@ -299,7 +311,7 @@ | |||
[Tags] Sanity | |||
... Tier1 | |||
... ODS-374 | |||
${pod_names} Get POD Names ${APPLICATIONS_NAMESPACE} app=rhods-dashboard | |||
${pod_names} Get POD Names ${APPLICATIONS_NAMESPACE} app=${DASHBOARD_APP_NAME} |
Check warning
Code scanning / Robocop
The assignment sign is not consistent within the file. Expected '{{ expected_sign }}' but got '{{ actual_sign }}' instead Warning test
Should Be Equal ${not_clicked} odh-dashboard__favorite | ||
Click Element //*[@id="${id}"]/div[1]/span | ||
${card_star_button}= Set Variable //*[@id="${id}" and contains(@class, "odh-tourable-card")]//button | ||
${not_clicked} = Get Element Attribute ${card_star_button} aria-label |
Check warning
Code scanning / Robocop
The assignment sign is not consistent within the file. Expected '{{ expected_sign }}' but got '{{ actual_sign }}' instead Warning test
Should Be Equal ${clicked} odh-dashboard__favorite m-is-favorite | ||
Click Element //*[@id="${id}"]/div[1]/span | ||
${card_star_button}= Set Variable //*[@id="${id}" and contains(@class, "odh-tourable-card")]//button | ||
${clicked} = Get Element Attribute ${card_star_button} aria-label |
Check warning
Code scanning / Robocop
The assignment sign is not consistent within the file. Expected '{{ expected_sign }}' but got '{{ actual_sign }}' instead Warning test
@@ -480,18 +494,15 @@ | |||
Close Browser | |||
|
|||
RHODS Dahsboard Pod Should Contain OauthProxy Container | |||
${list_of_pods} = Search Pod namespace=${APPLICATIONS_NAMESPACE} pod_start_with=rhods-dashboard | |||
${list_of_pods} = Search Pod namespace=${APPLICATIONS_NAMESPACE} pod_regex=${DASHBOARD_APP_NAME} |
Check warning
Code scanning / Robocop
The assignment sign is not consistent within the file. Expected '{{ expected_sign }}' but got '{{ actual_sign }}' instead Warning test
Robot Results
|
@@ -67,6 +67,7 @@ | |||
Set Global Variable ${OPERATOR_NAMESPACE} openshift-operators | |||
Set Global Variable ${NOTEBOOKS_NAMESPACE} opendatahub | |||
END | |||
Set Global Variable ${DASHBOARD_APP_NAME} ${PRODUCT.lower()}-dashboard |
Check notice
Code scanning / Robocop
{{ set_variable_keyword }} can be replaced with VAR Note
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comments
ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDashboardSettingsRuntimes.resource
Show resolved
Hide resolved
ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDashboardSettingsRuntimes.resource
Show resolved
Hide resolved
10ec841
to
5d10308
Compare
@@ -49,7 +49,7 @@ | |||
Maybe Skip Tour | |||
[Documentation] If we are in the openshift web console, maybe skip the first time | |||
... tour popup given to users, otherwise RETURN. | |||
${should_cont} = Is Current Domain Equal To https://console-openshift-console | |||
${should_cont} = Does Current Sub Domain Start With https://console-openshift-console |
Check warning
Code scanning / Robocop
The assignment sign is not consistent within the file. Expected '{{ expected_sign }}' but got '{{ actual_sign }}' instead Warning test
Includes: - Change `Is Current Domain Equal To` KW to support either "oauth-openshift" or "oauth" Subdomain. - Add `Wait For Dashboard Page Title` KW to get page title that could reside inside h1 child element. - `Search Pod` KW returns a list of pods match regular expression. (It is required when installing ODH, and verifying Dashboard pods that includes "dashboard", instead of "rhods-dashboard"). - Setting global var $DASHBOARD_APP_NAME according to product, for those dependent KWs that uses app = "odh-dashboard" or "rhods-dashboard". Signed-off-by: manosnoam <[email protected]>
Signed-off-by: manosnoam <[email protected]>
Signed-off-by: manosnoam <[email protected]>
Signed-off-by: manosnoam <[email protected]>
Signed-off-by: manosnoam <[email protected]>
Signed-off-by: manosnoam <[email protected]>
Signed-off-by: manosnoam <[email protected]>
Signed-off-by: manosnoam <[email protected]>
Signed-off-by: manosnoam <[email protected]>
- Fix `Upload Serving Runtime Template` in ODHDashboard Settings - Verify that the color of the Jupyter Card code block is gray Signed-off-by: manosnoam <[email protected]> Verify that the color of the Jupyter Card code block is gray Signed-off-by: manosnoam <[email protected]>
Also fix Camel-Case of `Wait for RHODS Dashboard to Load` Signed-off-by: manosnoam <[email protected]>
Quality Gate passedIssues Measures |
@@ -97,21 +98,25 @@ | |||
Click Element xpath://a[.="Log out"] | |||
Wait Until Page Contains Log in with OpenShift | |||
|
|||
Wait for RHODS Dashboard to Load | |||
Wait For RHODS Dashboard To Load |
Check warning
Code scanning / Robocop
Missing documentation in '{{ name }}' keyword Warning test
[Documentation] Wait until the visible title (h1) of the current Dashboard page is '${page_title}' | ||
[Arguments] ${page_title} ${timeout}=10s | ||
${page_title_element}= Set Variable //*[@data-testid="app-page-title"] | ||
Wait Until Element is Visible ${page_title_element} timeout=${timeout} |
Check warning
Code scanning / Robocop
Keyword name '{{ keyword_name }}' does not follow case convention Warning test
Execute Javascript arguments[0].click(); ARGUMENTS ${element} | ||
${status}= Run Keyword and Return Status Wait Until Page Contains Element xpath://div[contains(@class,'pf-v5-c-drawer__panel-main')] | ||
Click Element ${card_locator} | ||
${status}= Run Keyword and Return Status Wait Until Page Contains Element xpath://div[contains(@class,'pf-v5-c-drawer__panel-main')] |
Check warning
Code scanning / Robocop
Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test
Execute Javascript arguments[0].click(); ARGUMENTS ${element} | ||
${status}= Run Keyword and Return Status Wait Until Page Contains Element xpath://div[contains(@class,'pf-v5-c-drawer__panel-main')] | ||
Click Element ${card_locator} | ||
${status}= Run Keyword and Return Status Wait Until Page Contains Element xpath://div[contains(@class,'pf-v5-c-drawer__panel-main')] |
Check warning
Code scanning / Robocop
{{ bad_indent_msg }} Warning test
Execute Javascript arguments[0].click(); ARGUMENTS ${element} | ||
${status}= Run Keyword and Return Status Wait Until Page Contains Element xpath://div[contains(@class,'pf-v5-c-drawer__panel-main')] | ||
Click Element ${card_locator} | ||
${status}= Run Keyword and Return Status Wait Until Page Contains Element xpath://div[contains(@class,'pf-v5-c-drawer__panel-main')] |
Check warning
Code scanning / Robocop
Keyword name '{{ keyword_name }}' does not follow case convention Warning test
Thanks @jstourac , I squashed the commits. |
JFTR - the commits aren't squashed (and I like it since they are well structured and thus can be merged as they are from my point of view). What was squashed/fixed-up was the change discrepancy - inadvertent change in first commit was fixed in a different commit - now this has been removed from the original commit directly and thus makes the commit history clean. Thank you. |
I'd vote for squashing anyway, it makes the overall history cleaner, if everybody starts merging new 10 commits or more it becomes difficult. |
I guess I wouldn't squash. The individual commits have meaningful commit messages, so it would help with git blames and later investigations to keep them separate. |
in case of regression it can become a hunt for the commits you need to revert. Even squashing you can see who edited a line with git blame. What's the problem? |
GitHub webui gives you option to revert entire PR. And I guess I now see yet another good use of merging with merge commits. In git blame, I like to be able to go to commit message and see whats the message associated with each change. Usually it's obvious but sometimes it isn't and then it's useful info to have. |
Including fixing dependent KW and tests:
Verify RHODS Display Name and Version
for ODHVerify Favorite Resource Cards
testSort Resources By
KWVerify Jupyter Card CSS Style
KWUpload Serving Runtime Template
in ODHDashboard Settings