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

Fix multiple Sanity failures in 2.6 #1158

Merged
merged 9 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,14 @@ Add Spawner Environment Variable
[Documentation] Adds a new environment variables based on the ${env_var} ${env_var_value} arguments
[Arguments] ${env_var} ${env_var_value}
Click Button Add more variables
#Input Text xpath://input[@id="---NO KEY---"] ${env_var}
Input Text xpath://input[contains(@id,"-NO KEY-")][1] ${env_var}
Element Attribute Value Should Be xpath:${KFNBC_ENV_VAR_NAME_PRE}//input[contains(@id,"-${env_var}")] value ${env_var}
#Input Text xpath://input[@id="${env_var}-value"] ${env_var_value}
Input Text xpath://input[contains(@id, "-${env_var}-value")] ${env_var_value}
#Element Attribute Value Should Be xpath://input[@id="${env_var}-value"] value ${env_var_value}
Element Attribute Value Should Be xpath://input[contains(@id, "-${env_var}-value")] value ${env_var_value}
${elements} = Get Element Count ${KFNBC_ENV_VAR_NAME_PRE}
${rows} = Evaluate $elements-${1}
Input Text xpath://input[contains(@id,"-NO KEY-")][1] ${env_var}
Element Attribute Value Should Be
... xpath:${KFNBC_ENV_VAR_NAME_PRE}//input[contains(@id,"environment-variable-row-${rows}-0-${env_var}")] value
... ${env_var}
Input Text xpath://input[contains(@id, "-${env_var}-value")] ${env_var_value}
Element Attribute Value Should Be xpath://input[contains(@id, "-${env_var}-value")] value ${env_var_value}

Remove All Spawner Environment Variables
[Documentation] Removes all existing environment variables in the Spawner
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -625,14 +625,14 @@ Delete Custom Image
[Arguments] ${image_name}
Click Button xpath://td[@data-label="Name"]/div/div/div[.="${image_name} "]/../../../../td[last()]//button
${image_name_id} = Replace String ${image_name} ${SPACE} -
Click Element xpath://td[@data-label="Name"]/div/div/div[.="${image_name} "]/../../../../td[last()]//button/..//li[@id="custom-${image_name_id}-delete-button"] # robocop: disable
Click Element xpath://td[@data-label="Name"]/div/div/div[.="${image_name} "]/../../../../td[last()]//button/..//button[@id="custom-${image_name_id}-delete-button"] # robocop: disable
Handle Deletion Confirmation Modal ${image_name} notebook image

Open Edit Menu For Custom Image
[Documentation] Opens the edit view for a specific custom image
[Arguments] ${image_name}
Click Button xpath://td[.="${image_name}"]/../td[last()]//button
Click Element xpath://td[.="${image_name}"]/../td[last()]//button/..//li[@id="${image_name}-edit-button"]
Click Element xpath://td[.="${image_name}"]/../td[last()]//button/..//button[@id="${image_name}-edit-button"]
Wait Until Page Contains Delete Notebook Image

Expand Custom Image Details
Expand Down
8 changes: 5 additions & 3 deletions ods_ci/tests/Tests/500__jupyterhub/custom-image.robot
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,19 @@ Verify Custom Image Can Be Added

Test Duplicate Image
[Documentation] Test adding two images with the same name (should fail)
... ProductBug - https://github.com/opendatahub-io/odh-dashboard/issues/2186
... ProductBug - https://issues.redhat.com/browse/RHOAIENG-1192
[Tags] Sanity Tier1 ExcludeOnDisconnected
... ODS-1368
... ProductBug
Sleep 1
Create Custom Image
Sleep 1
Import New Custom Image ${IMG_URL} ${IMG_NAME} ${IMG_DESCRIPTION}
... software=${IMG_SOFTWARE}
... packages=${IMG_PACKAGES}
Wait Until Page Contains Unable to add notebook image: ${IMG_NAME}
# Workaround for https://issues.redhat.com/browse/RHOAIENG-1192
# To be removed ASAP
Wait Until Page Contains Unable to add notebook image: HTTP request failed
lugi0 marked this conversation as resolved.
Show resolved Hide resolved
Log Unable to add second image with error message "Unable to add notebook image: HTTP request failed" due to RHOAIENG-1192 level=WARN # robocop: disable
# 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
19 changes: 13 additions & 6 deletions ods_ci/tests/Tests/500__jupyterhub/test-jupyterlab-git.robot
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,14 @@ Verify Updating Project With Changes From Git Repository
Clone Git Repository And Open ${REPO_URL} ${FILE_PATH}
Sleep 1s
Open New Notebook
Add And Run JupyterLab Code Cell In Active Notebook
... import os;path="/opt/app-root/src/ODS-QE-Github-Test";os.chdir(path)
${commit_msg1}= Get Last Commit Message
Add And Run JupyterLab Code Cell In Active Notebook ! mkdir ../folder/
Add And Run JupyterLab Code Cell In Active Notebook !mkdir ../folder/
Add And Run JupyterLab Code Cell In Active Notebook !git config --global user.name "${GITHUB_USER.USERNAME}"
Add And Run JupyterLab Code Cell In Active Notebook !git config --global user.email ${GITHUB_USER.EMAIL}
Sleep 2s
Open Folder or File folder

${randnum}= Generate Random String 9 [NUMBERS]
${commit_message}= Catenate ${COMMIT_MSG} ${randnum}
Push Some Changes to Repo
Expand Down Expand Up @@ -119,10 +122,14 @@ Commit Changes
Set Staging Status ON
END
Click Button xpath=//div[contains(@class, "CommitBox")]//button[.="Commit"]
Wait Until Page Contains Who is committing? timeout=10s
Input Text xpath=//input[@placeholder="Name"] ${name}
Input Text xpath=//input[@placeholder="Email"] ${email_id}
Click Element xpath=//button[.="OK"]
${identity} = Run Keyword And Return Status Wait Until Page Contains Who is committing? timeout=10s
Dismissed Show dismissed Hide dismissed
IF ${identity}
Input Text xpath=//input[@placeholder="Name"] ${name}
Input Text xpath=//input[@placeholder="Email"] ${email_id}
Click Element xpath=//button[.="OK"]
ELSE
Page Should Contain Element xpath=//button[@title="Disabled: No files are staged for commit"]
END

Push Changes To Remote
[Documentation] Push changes to remote directory
Expand Down
Loading