Skip to content

Commit

Permalink
[fix] tests for the BYON feature
Browse files Browse the repository at this point in the history
The field IDs changed in the RHOAI 2.17 so this updates them in our
tests. Probably related to the changes [1,2].

* [1] opendatahub-io/odh-dashboard#3457
* [2] https://issues.redhat.com/browse/RHOAIENG-14746
  • Loading branch information
jstourac committed Jan 15, 2025
1 parent dc83836 commit 7d593c4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDashboard.robot
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,8 @@ Import New Custom Image
Sleep 1
Open Custom Image Import Popup
Input Text xpath://input[@id="byon-image-location-input"] ${repo}
Input Text xpath://input[@id="byon-image-name-input"] ${name}
Input Text xpath://input[@id="byon-image-description-input"] ${description}
Input Text xpath://input[@id="byon-image-name"] ${name}
Input Text xpath://*[@id="byon-image-description"] ${description}
# No button present anymore?
#Add Softwares To Custom Image ${software}
#Add Packages To Custom Image ${packages}
Expand Down Expand Up @@ -631,15 +631,15 @@ Delete Custom Image
${custom_image_kebab_btn}= Set Variable //td[.="${image_name}"]/../td[last()]//button
Click Button xpath:${custom_image_kebab_btn}
${image_name_id}= Replace String ${image_name} ${SPACE} -
Click Element xpath:${custom_image_kebab_btn}/..//button[@id="custom-${image_name_id}-delete-button"] # robocop: disable
Click Element xpath://button[@id="${image_name_id}-delete-button"]
Handle Deletion Confirmation Modal ${image_name} notebook image
# Wait for the image to disappear from the list
Wait Until Page Does Not Contain Element xpath:${custom_image_kebab_btn} timeout=10s
# Assure that the actual ImageStream is also removed
${rc} ${out}= Run And Return Rc And Output
... oc wait --for=delete --timeout=10s imagestream -n ${APPLICATIONS_NAMESPACE} custom-${image_name_id}
... oc wait --for=delete --timeout=10s imagestream -n ${APPLICATIONS_NAMESPACE} ${image_name_id}
IF ${rc} != ${0}
Fail msg=The ImageStream 'custom-${image_name_id}' wasn't deleted from cluster in timeout.
Fail msg=The ImageStream '${image_name_id}' wasn't deleted from cluster in timeout.
END


Expand All @@ -649,7 +649,7 @@ Open Edit Menu For Custom Image
${custom_image_kebab_btn}= Set Variable //td[.="${image_name}"]/../td[last()]//button
Click Button xpath:${custom_image_kebab_btn}
${image_name_id}= Replace String ${image_name} ${SPACE} -
Click Element xpath:${custom_image_kebab_btn}/..//button[@id="custom-${image_name_id}-edit-button"]
Click Element xpath:${custom_image_kebab_btn}/..//button[@id="${image_name_id}-edit-button"]
Wait Until Page Contains Delete Notebook Image

Expand Custom Image Details
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Test Duplicate Image
... packages=${IMG_PACKAGES}
# Assure that the expected error message is shown in the modal window
${image_name_id}= Replace String ${IMG_NAME} ${SPACE} -
Wait Until Page Contains Unable to add notebook image: imagestreams.image.openshift.io "custom-${image_name_id}" already exists
Wait Until Page Contains Unable to add notebook image: imagestreams.image.openshift.io "${image_name_id}" already exists
# Since the image cannot be created, we need to cancel the modal window now
Click Button ${GENERIC_CANCEL_BTN_XP}
[Teardown] Duplicate Image Teardown
Expand Down Expand Up @@ -201,4 +201,4 @@ Get Standard Data Science Local Registry URL
[Documentation] Fetches the local URL for the SDS image
${registry} = Run oc get imagestream s2i-generic-data-science-notebook -n ${APPLICATIONS_NAMESPACE} -o json | jq '.status.dockerImageRepository' | sed 's/"//g' # robocop: disable
${tag} = Run oc get imagestream s2i-generic-data-science-notebook -n ${APPLICATIONS_NAMESPACE} -o json | jq '.status.tags[-1].tag' | sed 's/"//g' # robocop: disable
RETURN ${registry}:${tag}
RETURN ${registry}:${tag}

0 comments on commit 7d593c4

Please sign in to comment.